Create IP address set
Updated at:2025-10-16
Description
This API is used to create IP address groups.
Request structure
Plain Text
1POST /v{version}/ipSet?clientToken={clientToken} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "name":{name},
6 "ipVersion":{ipVersion},
7 "ipAddressInfo":[
8 {
9 "ipAddress":{ipAddress},
10 "description":{description}
11 }
12 ],
13 "description":{description}
14}
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 | API version number, with current value being 1. |
| name | String | Yes | RequestBody | IP address group name, which supports uppercase and lowercase letters, numbers, and special characters such as -, _, / and ., starting with a letter or Chinese character, with a length of 1-65. |
| ipVersion | String | Yes | RequestBody | ipVersion, value: IPv4 or IPv6 |
| ipAddressInfo | List<[TemplateIpAddressInfo](VPC/API Reference/Appendix.md#TemplateIpAddressInfo)> | Yes | RequestBody | Parameter template IP address information, with a maximum of 10 entries per operation |
| description | String | No | RequestBody | IP address group description, with a maximum length of 255 characters |
| clientToken | String | No | Query | Idempotence Token, which is an ASCII string with a length not exceeding 64 bits, see details in [ClientToken IdempotenceSupport](VPC/API Reference/General Description.md#Idempotence). |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| ipSetId | String | ID of the IP address group |
Request example
Plain Text
1POST /v1/ipSet?clientToken=a0ba59e3-2f21-4372-a01e-4eb9db5e180c HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/c3119080364d11e8912505e5e0ae9978/2018-04-02T08:14:25Z/3600/host;x-bce-account;x-bce-client-ip;x-bce-date;x-bce-request-id;x-bce-security-token/6b93bfd5ca2328fcb5560fa57f56253d80a629f6aac9c9cb74adf9a055fceb53
4{
5 "name":"ipSet_test",
6 "ipVersion":"IPv4",
7 "ipAddressInfo": [{
8 "ipAddress": "10.101.151.17",
9 "description": "ip address description"
10 }],
11 "description":"desc"
12}
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 7e789a40-adac-414a-8bd4-916d6be61112
3Date: Mon, 02 Apr 2019 08:14:25 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
6{
7 "ipSetId":"ips-zq8i7q57ubxd"
8}
