You need to enable JavaScript to run this app.
导航
更新自定义路由规则 UpdateCustomRoute
最近更新时间:2025.10.28 11:22:52首次发布时间:2025.07.01 16:02:29
复制全文
我的收藏
有用
有用
无用
无用

该接口用于修改一条已存在的自定义路由规则的配置。
您可以通过指定路由 ID(CustomRouteId)来更新其一个或多个属性。未在请求中提供的参数,其值将保持不变。

注意事项

本接口的单用户 QPS 限制为 50 次/秒。超过限制,API 调用会被限流。

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com?Action=UpdateCustomRoute&Version=2025-05-01

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

Query

参数类型是否必选示例值描述
ActionStringUpdateCustomRoute接口名称。当前 API 的名称为 UpdateCustomRoute
VersionString2025-05-01接口版本。当前 API 的版本为 2025-05-01

Body

参数类型是否必选示例值描述
ProductIdString1749281594201xxxxxx业务 ID,用于指定目标规则生效的业务。
CustomRouteIdStringcr-xxxx自定义路由规则 ID,可通过 ListCustomRoute接口获取。
CustomRouteNameStringcustom_route_test新的规则名称。
DstIPString172.12.34.5代理服务器 IP 地址。

ProxyProtocol

String

ss

新的代理协议类型。当前支持以下协议:

  • ss:Shadowsocks 协议。
  • socks5:SOCKS5 协议。
ProxyPortInteger1086新的代理服务端口。

ProxyUserName

String

user1

新的代理认证用户名。

  • ProxyProtocol 设为 ss 时无需填写。
  • ProxyProtocol 设为 socks5 时选填,填写您的 SOCKS5 服务器的用户名。

ProxyPassword

String

paasword

新的代理认证密码。

  • ProxyProtocol 设为 ss 时必填,请提供与您 Shadowsocks 服务端配置一致的连接密码;
  • ProxyProtocol 设为 socks5 时选填,填写您的 SOCKS5 服务器的密码。

ProxyCipher

String

chacha20-ietf-poly1305

新的代理加密算法。当 ProxyProtocol 为 ss 时,此项为必填;对于 SOCKS5 协议,此项无需填写。您选择的加密算法必须与 Shadowsocks 服务端配置完全一致。支持的算法列表如下:

  • aes-128-gcm
  • aes-192-gcm
  • aes-256-gcm
  • chacha20-ietf-poly1305
  • xchacha20-ietf-poly1305
  • aes-128-cfb
  • aes-192-cfb
  • aes-256-cfb
  • aes-128-ctr
  • aes-192-ctr
  • aes-256-ctr
  • rc4-md5
  • chacha20
  • chacha20-ietf
  • xchacha20

返回参数

本接口无特有的返回参数。更多信息请见返回结构

请求示例

POST https://open.volcengineapi.com?Action=UpdateCustomRoute&Version=2025-05-01
{
    "ProductId": "1749281594201xxxxxx",
    "CustomRouteId": "cr-xxxx",
    "CustomRouteName": "custom_route_test",
    "DstIP": "172.12.34.5",
    "ProxyProtocol": "ss",
    "ProxyPort": 1086,
    "ProxyUserName": "user1",
    "ProxyPassword": "paasword",
    "ProxyCipher": "chacha20-ietf-poly1305"
}

返回示例

{
    "ResponseMetadata": {
        "Action": "UpdateCustomRoute",
        "Region": "cn-north-1",
        "Service": "ACEP",
        "Version": "2025-05-01",
        "RequestId": "20230604110420****100232280022D31"
    }
}

错误码

您可访问公共错误码,获取更多错误码信息。