更新ACL规则
更新时间:2024-12-30
描述
更新ACL规则信息。
请求结构
                Plain Text
                
            
            1PUT /v{version}/acl/rule/{aclRuleId}?clientToken={clientToken}  HTTP/1.1     
2Host: bcc.bj.baidubce.com     
3Authorization: authorization string     
4{
5    "description":"",
6    "protocol":"tcp",
7    "sourceIpAddress":"192.168.0.0",
8    "destinationIpAddress":"192.168.0.0/20",
9    "sourcePort":"1-65535",
10    "destinationPort":"443",
11    "position":2,
12    "action":"allow"
13}
            请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 | 
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号,当前取值为1 | 
| clientToken | String | 否 | Query参数 | 幂等性Token,是一个长度不超过64位的ASCII字符串,详见ClientToken幂等性 | 
| aclRuleId | String | 是 | URL参数 | ACL规则ID | 
| description | String | 否 | RequestBody参数 | 备注 | 
| protocol | String | 否 | RequestBody参数 | 协议,包括all/tcp/udp/icmp | 
| sourceIpAddress | String | 否 | RequestBody参数 | 源IP | 
| destinationIpAddress | String | 否 | RequestBody参数 | 目的IP | 
| sourcePort | String | 否 | RequestBody参数 | 源端口 | 
| destinationPort | String | 否 | RequestBody参数 | 目的端口 | 
| position | Integer | 否 | RequestBody参数 | 优先级 1-5000且不能与已有条目重复;数值越小,优先级越高,规则匹配顺序为按优先级由高到低匹配 | 
| action | String | 否 | RequestBody参数 | 策略,包括allow和deny | 
返回头域
除公共头域,无其它特殊头域。
返回参数
无特殊返回参数。
请求示例
                Plain Text
                
            
            1PUT /v1/acl/rule/ar-f6ze0s95drra?clientToken=cecad37a-5a1e-4135-a1bc-b1a105d12dec HTTP/1.1
2Host: bcc.bj.baidubce.com
3Content-Type: application/json;charset=UTF-8
4Authorization: bce-auth-v1/c98fb9a1366011e8912505e5e0ae9978/2018-04-02T10:54:32Z/3600/host;x-bce-account;x-bce-client-ip;x-bce-date;x-bce-  request-id;x-bce-security-token/e66be5966b6d6728d8f0431b0cd10558e8a69989cbddfc5e9211371fe05fa7e9
5{
6  "description" : "",
7  "protocol" : "tcp",
8  "sourceIpAddress" : "192.168.0.0",
9  "destinationIpAddress" : "192.168.0.0/20",
10  "sourcePort" : "1-65535",
11  "destinationPort" : "22",
12  "position" : 334,
13  "action" : "allow"
14}
            返回示例
                Plain Text
                
            
            1HTTP/1.1 200 OK     
2x-bce-request-id: 9d3e5721-d77f-4984-9fff-3092fa4e31a3     
3Date:Fri, 17 Mar 2017 13:22:21 GMT     
4Content-Type: application/json;charset=UTF-8     
5Server: BWS
            