Update VPC
Updated at:2025-10-16
Description
Modify the VPC details.
Request structure
Plain Text
1PUT /v{version}/vpc/{vpcId}?{action}&clientToken={clientToken}
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{
5 "name":"test",
6 "description":"this is a description",
7 "enableIpv6":true,
8 "secondaryCidr":["10.0.0.0/24"]
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 |
| vpcId | String | Yes | URL parameter | VPC ID |
| 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). |
| action | String | Yes | Query | Action performed, current value: modifyAttribute. |
| name | String | Yes | RequestBody | VPC name, which cannot be set as "default", must not exceed 65 characters, and may consist of numbers, letters, and underscores |
| description | String | No | RequestBody | VPC description, not exceeding 200 characters |
| enableIpv6 | Boolean | No | RequestBody | Whether to enable IPv6 segment, with true for “enable” and false for “disable”; omission indicates “no changes” |
| secondaryCidr | List |
No | RequestBody | List of CIDRs in VPC secondary segment, replacement-based update |
Response headers
No special headers are required beyond the standard ones.
Response parameters
No response parameters are available.
Request example
Plain Text
1PUT /v1/vpc/vpc-119bd69b?modifyAttribute&clientToken=cecad37a-5a1e-4135-a1bc-b1a105d12dec
2Host: bcc.bj.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-03-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5 "name":"test",
6 "description":"this is a description",
7 "enableIpv6":true,
8 "secondaryCidr":["10.0.0.0/24"]
9}
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Thu, 16 Mar 2017 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
