Update ACL rules
Updated at:2025-10-16
Description
Update information on ACL rules.
Request structure
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}
Request headers
There are no special headers required beyond the common headers.
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | For API version No., the current value is 1 |
| clientToken | String | No | Query | Idempotence token, which is an ASCII string with a length not exceeding 64 bits, see details in [ClientToken Idempotence Support](VPC/API Reference/General Description.md#Idempotence) |
| aclRuleId | String | Yes | URL parameter | ACL rule ID |
| description | String | No | RequestBody | Remarks |
| protocol | String | No | RequestBody | Protocol, including all/tcp/udp/icmp |
| sourceIpAddress | String | No | RequestBody | Source IP |
| destinationIpAddress | String | No | RequestBody | Destination IP |
| sourcePort | String | No | RequestBody | Source port |
| destinationPort | String | No | RequestBody | Destination port |
| position | Integer | No | RequestBody | The priority ranges from 1 to 5,000 and cannot duplicate with existing entries. The lower the value, the higher the priority. Rule matching follows a descending priority order |
| action | String | No | RequestBody | Policy, including allow and deny |
Response headers
No special headers are required beyond the standard ones.
Response parameters
No special response parameters are available.
Request example
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}
Response example
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
