更新时间:2025-02-07 GMT+08:00
更新VPC
功能介绍
更新虚拟私有云。
请求参数
| 名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
| name | 否 | String |
|
| description | 否 | String |
|
| cidr | 否 | String |
|
| routes | 否 | Array of route objects |
|
请求示例
- 更新id为99d9d709-8478-4b46-9f3f-2206b1023fd3的vpc,将名称更新为vpc1,描述更新为test1,cidr更新为192.168.0.0/16。
PUT https://{Endpoint}/v1/{project_id}/vpcs/99d9d709-8478-4b46-9f3f-2206b1023fd3 { "vpc": { "name": "vpc1", "description": "test1", "cidr": "192.168.0.0/16" } }
响应参数
| 名称 | 参数类型 | 说明 |
|---|---|---|
| id | String | uuid形式的一个资源标识。 |
| name | String | 虚拟私有云名称。 |
| description | String |
|
| cidr | String |
|
| status | String |
|
| enterprise_project_id | String |
说明: |
| routes | Array of route objects |
|
| tenant_id | String |
|
| created_at | String |
|
| updated_at | String |
|
响应示例
{
"vpc": {
"id": "99d9d709-8478-4b46-9f3f-2206b1023fd3",
"name": "vpc1",
"description": "test1",
"cidr": "192.168.0.0/16",
"status": "OK",
"enterprise_project_id": "0",
"routes": [],
"tenant_id": "087679f0aa80d32a2f4ec0172f5e902b",
"created_at": "2022-12-15T02:25:11",
"updated_at": "2022-12-15T06:23:15"
}
} 状态码
请参见状态码。
错误码
请参考错误码。
父主题: VPC