更新路由规则
更新时间:2024-12-30
接口描述
更新路由规则,目前仅支持更新单线路由规则。
请求结构
                Plain Text
                
            
            1 PUT /v{version}/route/rule/{routeRuleId}?clientToken={clientToken} HTTP/1.1     
2 Host: bcc.bj.baidubce.com
3 Authorization: authorization string 
4 {
5    "sourceAddress": "192.168.0.0/20",
6    "destinationAddress": "0.0.0.0/0",
7    "nexthopId": "nat-bdidwhwfwc6p",
8    "description": "this is a route rule"
9 }      
            请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必选 | 参数位置 | 描述 | 
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号,当前取值为1 | 
| clientToken | String | 否 | Query参数 | 幂等性Token,是一个长度不超过64位的ASCII字符串,详见ClientToken幂等性 | 
| routeRuleId | String | 是 | URL参数 | 待更新的路由规则ID | 
| sourceAddress | String | 否 | Request Body 参数 | 源网段,CIDR格式,可填全部网段0.0.0.0/0、VPC内已有子网网段或子网范围内网段 | 
| destinationAddress | String | 否 | Request Body 参数 | 目标网段,CIDR格式,可以是0.0.0.0/0,否则目的地址不能与本VPC cidr重叠(目的网段或本VPC cidr为0.0.0.0/0时例外) | 
| nexthopId | String | 否 | Request Body 参数 | 下一跳ID | 
| description | String | 否 | Request Body 参数 | 描述,不超过200字符 | 
返回头域
除公共头域,无其它特殊头域。
返回参数
无特殊返回参数
请求示例
                Plain Text
                
            
            1 PUT /v1/route/rule/rr-rbn5yyz6rtn8?clientToken=8257tf9d-b98n-3r6n-a93m-297ng49io149 HTTP/1.1     
2 Host: bcc.bj.baidubce.com     
3 Content-Type: application/json;charset=UTF-8     
4 Authorization: bce-auth-v1/5a6f0606bf5e48f29dd132aa76aa5182/2017-06-12T13:13:05Z/1800/content-type;host;x-bce-date/8baeafe6bfc35b0cf6205e87e4ce6c0dbb442375951ace4d16e6c7a4dab95943     
5 {
6    "sourceAddress": "192.168.0.0/20",
7    "destinationAddress": "0.0.0.0/0",
8    "nexthopId": "nat-bdidwhwfwc6p",
9    "description": "this is a route rule"
10 }
            返回示例
                Plain Text
                
            
            1 HTTP/1.1 200 OK     
2 x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3 Fri, 17 Mar 2017 13:22:21 GMT 
4 Content-Type: application/json;charset=UTF-8
5 Server: BWS
            