更新IP地址组的IP列表项
功能介绍
添加新的IP地址到IP地址组的IP列表信息,或更新已有IP地址的描述。
调用方法
请参见如何调用API。
URI
POST /v3/{project_id}/elb/ipgroups/{ipgroup_id}/iplist/create-or-update
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| project_id | 是 | String | 参数解释:项目ID。 |
| ipgroup_id | 是 | String | 参数解释:IP地址组ID。 |
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| X-Auth-Token | 否 | String | 参数解释:IAM鉴权Token。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| ipgroup | 否 | UpdateIpListOption object | 更新IP地址组IP列表请求参数。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| name | 否 | String | 参数解释:IP地址组的名称 |
| ip_list | 否 | Array of UpadateIpGroupIpOption objects | 参数解释:IP地址组中包含的IP列表。 |
| description | 否 | String | 参数解释:IP地址组的描述信息 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| ipgroup | IpGroup object | IP地址组信息。 |
| request_id | String | 参数解释:请求ID。 注:自动生成 。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| id | String | 参数解释:IP地址组的ID。 |
| name | String | 参数解释:IP地址组的名称。 |
| description | String | 参数解释:IP地址组的描述信息。 |
| ip_list | Array of IpInfo objects | 参数解释:IP地址组中包含的IP或网段列表。[]表示任意IP。 |
| listeners | Array of ListenerRef objects | 参数解释:与IP地址组关联的监听器的ID列表。 |
| project_id | String | 参数解释:IP地址组的项目ID。 |
| enterprise_project_id | String | 参数解释:IP地址组所在的企业项目ID。 |
| created_at | String | 参数解释:IP地址组的创建时间。 |
| updated_at | String | 参数解释:IP地址组的更新时间。 |
请求示例
更新IP地址组的IP列表
PUT https://{ELB_Endpoint}/v3/45977fa2dbd7482098dd68d0d8970117/elb/ipgroups/8722e0e0-9cc9-4490-9660-8c9a5732fbb0/iplist/create-or-update
{
"ipgroup" : {
"name" : "test_ipg",
"ip_list" : [ {
"ip" : "192.168.1.123",
"description" : "test"
}, {
"ip" : "192.168.1.120",
"description" : "test update ip0"
} ]
}
} 响应示例
状态码:200
操作正常返回。
{
"request_id" : "46d0dcbec23987f1429491731dce0feb",
"ipgroup" : {
"id" : "353d6c3b-aca0-40b7-a059-fad8b20419e7",
"name" : "test_ipg",
"project_id" : "060576798a80d5762fafc01a9b5eedc7",
"description" : "",
"ip_list" : [ {
"ip" : "192.168.1.120",
"description" : "test update ip0"
}, {
"ip" : "192.168.1.122",
"description" : "test update ip2"
}, {
"ip" : "192.168.1.123",
"description" : "test"
} ],
"listeners" : [ {
"id" : "acef0c4d-3bd5-4cd0-8d83-c53e5b1fd652"
}, {
"id" : "edb23879-5511-4412-8b7b-9574de7a1295"
} ],
"created_at" : "2021-11-29T10:40:30Z",
"updated_at" : "2022-12-05T13:14:01Z"
}
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | 操作正常返回。 |
错误码
请参见错误码。