更新地址组
功能介绍
更新地址组。
该接口在华北-北京一,华北-北京二,华北-北京四,华北-乌兰察布一,华东-上海一,华东-上海二,华南-广州,华南-深圳,西南-贵阳一,中国-香港,亚太-曼谷,亚太-新加坡,亚太-雅加达,土耳其-伊斯坦布尔,非洲-约翰内斯堡,拉美-墨西哥城一,拉美-墨西哥城二,拉美-圣保罗一,拉美-圣地亚哥区域上线。
调试
您可以在API Explorer中调试该接口。
URI
PUT /v3/{project_id}/vpc/address-groups/{address_group_id}
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
address_group_id |
是 |
String |
地址组的唯一标识。 |
project_id |
是 |
String |
项目ID。 获取方法请参见获取项目ID。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
dry_run |
否 |
Boolean |
|
address_group |
是 |
UpdateAddressGroupOption object |
更新地址组的请求体。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
name |
否 |
String |
|
description |
否 |
String |
|
ip_set |
否 |
Array of strings |
|
max_capacity |
否 |
Integer |
|
ip_extra_set |
否 |
Array of IpExtraSetOption objects |
|
请求示例
- 更新id为dd18a501-fcd5-4adc-acfe-b0e2384baf08的地址组,更新名称、ip地址集和描述。
"PUT https://{endpoint}/v3/b2782e6708b8475c993e6064bc456bf8/vpc/address-groups/dd18a501-fcd5-4adc-acfe-b0e2384baf08" { "address_group": { "name": "vkvgykvsvhjaaaa1", "ip_set": [ "192.168.3.2", "192.168.3.43", "192.168.3.20-192.168.3.100", "192.168.5.0/24" ], "description": "xxxxxxxxxx" } }
响应参数
状态码为 200 时:
参数 |
参数类型 |
描述 |
---|---|---|
request_id |
String |
请求ID。 |
address_group |
AddressGroup object |
更新地址组的响应体。 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
|
name |
String |
|
description |
String |
|
ip_set |
Array of strings |
|
ip_version |
Integer |
|
created_at |
String |
|
updated_at |
String |
|
tenant_id |
String |
|
max_capacity |
Integer |
|
enterprise_project_id |
String |
|
tags |
Array of ResourceTag objects |
IP地址组资源标签。 |
status |
String |
|
status_message |
String |
|
ip_extra_set |
Array of IpExtraSetRespOption objects |
|
参数 |
参数类型 |
描述 |
---|---|---|
key |
String |
|
value |
String |
|
参数 |
参数类型 |
描述 |
---|---|---|
ip |
String |
|
remarks |
String |
|
响应示例
状态码为 200 时:
{ "address_group": { "id": "dd18a501-fcd5-4adc-acfe-b0e2384baf08", "name": "vkvgykvsvhjaaaa1", "tenant_id": "b2782e6708b8475c993e6064bc456bf8", "ip_version": 4, "ip_set": [ "192.168.5.0/24", "192.168.3.20-192.168.3.100", "192.168.3.43", "192.168.3.2" ], "ip_extra_set": [{ "ip": "192.168.5.0/24", "remarks": null }, { "ip": "192.168.3.20-192.168.3.100", "remarks": null }, { "ip": "192.168.3.43", "remarks": null }, { "ip": "192.168.3.2", "remarks": null }], "created_at": "2019-06-28T02:06:38", "updated_at": "2019-06-28T02:14:01", "description": "xxxxxxxxxx", "enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2", "tags": [], "max_capacity": 20, "status": "NORMAL", "status_message": "" }, "request_id": "5bbd1640-fa68-4362-9a5c-30c4809958e0" }
状态码
请参见状态码。
错误码
请参见错误码。