更新时间:2024-04-15 GMT+08:00
更新子网
功能介绍
更新子网。
URI
PUT /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id}
请求参数
| 名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
| name | 是 | String |
|
| description | 否 | String |
|
| ipv6_enable | 否 | Boolean |
|
| dhcp_enable | 否 | Boolean |
|
| primary_dns | 否 | String |
|
| secondary_dns | 否 | String | |
| dnsList | 否 | Array of strings |
|
请求示例
- 更新id为4779ab1c-7c1a-44b1-a02e-93dfc361b32d的子网,名称更新为subnet02,更新dns和dhcp。
PUT https://{Endpoint}/v1/{project_id}/vpcs/{vpc_id}/subnets/4779ab1c-7c1a-44b1-a02e-93dfc361b32d { "subnet": { "name": "subnet02", "ipv6_enable": true, "dhcp_enable": false, "primary_dns": "114.xx.xx.115", "secondary_dns": "114.xx.xx.116" } }
响应参数
| 名称 | 参数类型 | 说明 |
|---|---|---|
| subnet | subnet object | subnet对象 |
响应示例
{
"subnet": {
"id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d",
"status": "ACTIVE"
}
} 状态码
请参见状态码。
错误码
请参考错误码。
父主题: 子网