Assign an EIP.
POST /v3/{project_id}/eip/publicips
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
publicip |
Yes |
EIPAddDict object |
Request body for assigning an EIP |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
id |
No |
String |
Minimum: 36 Maximum: 36 |
ip_version |
No |
Integer |
Minimum: 4 Maximum: 6 |
alias |
No |
String |
Definition: EIP name Minimum: 0 Maximum: 255 |
type |
No |
String |
|
publicip_pool_name |
Yes |
String |
|
public_ip_address |
No |
String |
Minimum: 0 Maximum: 64 |
public_ipv6_address |
No |
String |
|
description |
No |
String |
|
enterprise_project_id |
No |
String |
Definition: Enterprise project ID. The value is 0 or a string that contains a maximum of 36 characters in the UUID format with hyphens (-). This is the ID of the enterprise project that you associate with the EIP when you assign the EIP. |
bandwidth |
Yes |
PublicipBandwidthInfo object |
Bandwidth bound to an EIP |
associate_instance_type |
No |
String |
|
associate_instance_id |
No |
String |
Minimum: 0 Maximum: 36 |
billing_info |
No |
String |
Definition: Order information. Minimum: 0 Maximum: 1024 |
cascade_delete_by_instance |
No |
Boolean |
This parameter is supported when the ECS is called. If the value is true, the EIP is released when the ECS is deleted. If the value is false, the EIP is not released when the ECS is deleted. Default: false |
associate_mode |
No |
String |
Minimum: 1 Maximum: 36 |
lock_infos |
No |
Array of strings |
Frozen status of an EIP. |
Status code: 201
Parameter |
Type |
Description |
|---|---|---|
publicip |
PublicipResp object |
EIP |
request_id |
String |
Request ID. |
Parameter |
Type |
Description |
|---|---|---|
id |
String |
|
project_id |
String |
|
ip_version |
Integer |
|
public_ip_address |
String |
|
public_ipv6_address |
String |
|
status |
String |
|
description |
String |
|
created_at |
String |
|
updated_at |
String |
|
type |
String |
|
vnic |
VnicResp object |
|
bandwidth |
BandwidthResp object |
|
enterprise_project_id |
String |
|
billing_info |
String |
|
lock_status |
String |
|
associate_instance_type |
String |
|
associate_instance_id |
String |
|
publicip_pool_id |
String |
|
publicip_pool_name |
String |
including public EIP pool (for example, 5_bgp or 5_sbgp) and dedicated EIP pool. For details about a dedicated EIP pool, see the APIs about publicip_pool. |
alias |
String |
|
public_border_group |
String |
Assign an IPv4 EIP with dedicated bandwidth.
POST https://{Endpoint}/v3/{project_id}/eip/publicips
{
"publicip" : {
"type" : "EIP",
"publicip_pool_name" : "5_telcom",
"bandwidth" : {
"size" : 300,
"share_type" : "PER",
"charge_mode" : "bandwidth",
"name" : "bandwidth-b556"
}
}
}
Status code: 201
Normal creation
{
"publicip" : {
"id" : "0c464dad-86f3-4953-8bd4-c22bb0eb0bde",
"project_id" : "b2782e6708b8475c993e6064bc456bf8",
"alias" : "test eip",
"ip_version" : 4,
"public_ip_address" : "100.64.0.253",
"publicip_pool_name" : "5_telcom",
"status" : "ACTIVE",
"description" : "description test",
"created_at" : "2018-12-25T10:07:24Z",
"updated_at" : "2018-12-25T10:07:24Z",
"type" : "EIP",
"vnic" : {
"private_ip_address" : "172.16.1.75",
"device_id" : "b61769a5-f8c4-448f-ae5b-2cbe1baa20ca",
"device_owner" : "compute:AZ1",
"vpc_id" : "1314cd0b-5dea-4697-b45a-a2304ff87e9c",
"port_id" : "b01795fc-a246-4e4c-b770-0e4d58101592",
"mac" : "fa:16:3e:ac:a8:0b"
},
"bandwidth" : {
"id" : "b01795fc-a246-4e4c-b770-0e4d58101592",
"size" : 300,
"share_type" : "PER",
"charge_mode" : "traffic",
"name" : "bandwidth-b556"
},
"enterprise_project_id" : "b261ac1f-2489-4bc7-b31b-c33c3346a439",
"associate_instance_type" : "PORT",
"associate_instance_id" : "b61769a5-f8c4-448f-ae5b-2cbe1baa20ca",
"public_border_group" : "CENTER"
},
"request_id" : "4a06c169-cc67-4d94-a786-2d70ef09b100"
}
Status Code |
Description |
|---|---|
201 |
Normal creation |
See Error Codes.