更新弹性公网IP
功能介绍
更新弹性公网IP,将弹性公网IP跟一个网卡绑定或者解绑定,转换IP地址版本类型。
URI
PUT /v1/{project_id}/publicips/{publicip_id}
请求参数
| 名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
| port_id | 否 | String |
|
| ip_version | 否 | Integer |
|
| alias | 否 | String |
|
请求示例
- 请求样例1(EIP绑定一张网卡)
PUT https://{Endpoint}/v1/{project_id}/publicips/{publicip_id} { "publicip": { "port_id": "f588ccfa-8750-4d7c-bf5d-2ede24414706" } }
响应参数
| 名称 | 参数类型 | 说明 |
|---|---|---|
| id | String | 弹性公网IP唯一标识 |
| status | String |
|
| profile | profile object | 功能说明:额外参数,包括订单id、产品id等信息,详情请参见表6。 |
| type | String |
|
| public_ip_address | String | IPv4时是申请到的弹性公网IP地址。 |
| public_ipv6_address | String | IPv4时无此字段,IPv6时为申请到的弹性公网IP地址 |
| ip_version | Integer | IP版本信息,取值范围是4和6
|
| private_ip_address | String |
|
| port_id | String |
|
| tenant_id | String | 项目ID |
| create_time | String | 弹性公网IP申请时间(UTC) 格式:yyyy-MM-dd HH:mm:ss |
| bandwidth_id | String | 弹性公网IP对应带宽ID |
| bandwidth_size | Integer | 带宽大小,单位为Mbit/s。 |
| bandwidth_share_type | String |
|
| bandwidth_name | String | 带宽名称。 |
| alias | String | 弹性公网IP名称 |
| enterprise_project_id | String |
说明: 关于企业项目ID的获取及企业项目特性的详细信息,请参见《企业管理用户指南》 |
响应示例
- 响应样例(EIP绑定一张网卡)
{ "publicip": { "id": "f6318bef-6508-4ea5-a48f-6152b6b1a8fb", "status": "ACTIVE", "alias": "tom", "profile": {}, "type": "5_bgp", "port_id": "a135e9b8-1630-40d2-a6c5-eb534a61efbe", "public_ip_address": "10.xx.xx.162", "private_ip_address": "192.168.1.131", "tenant_id": "26ae5181a416420998eb2093aaed84d9", "create_time": "2019-03-27 01:33:18", "bandwidth_size": 7, "ip_version": 4, "bandwidth_name": "bandwidth-2aef", "enterprise_project_id": "0", "bandwidth_share_type": "PER", "bandwidth_id": "7a258fff-10d8-44b8-8124-c59079eb8f4c" } }
状态码
请参见状态码。
错误码
请参考错误码。