Create high-availability virtual IP address
Updated at:2025-10-16
Description
This API allows you to create a high-availability virtual IP address.
- The specified intranet IP must be within the subnet of the high-availability virtual IP address and cannot be occupied
- The privateIpAddress of "" indicates automatic IP address allocation
Request structure
Plain Text
1POST /v{version}/havip?clientToken={clientToken} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "name":{name},
6 "subnetId":{subnetId},
7 "privateIpAddress":{privateIpAddress},
8 "description":{description}
9}
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 |
| name | String | Yes | RequestBody | High-availability virtual IP address 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. |
| subnetId | String | Yes | RequestBody | Subnet ID to which the high-availability virtual IP address belongs |
| privateIpAddress | String | Yes | RequestBody | Specified IP address, with "" indicating automatic IP address allocation |
| description | String | No | RequestBody | Description of high-availability virtual IP address |
| clientToken | String | No | Query | Idempotence Token, which is an ASCII string with a length not exceeding 64 bits. For details, refer to [ClientToken Idempotence Support](VPC/API Reference/General Description.md#Idempotence). |
Response headers
No special headers are required beyond the standard ones.
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| haVipId | String | High-availability virtual IP address ID |
Request example
Plain Text
1POST /v1/havip?clientToken=cecad37a-5a1e-4135-a1bc-b1a105d12dec 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":"havip_test",
6 "subnetId":"sbn-dk8gl9bc",
7 "privateIpAddress":"192.168.0.1",
8 "description":"desc"
9}
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 "haVipId":"havip-w2d4kgc3x0y1"
8}
