Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com> Co-authored-by: fanqinying <fanqinying@huawei.com> Co-committed-by: fanqinying <fanqinying@huawei.com>
105 KiB
Adding EIPs to a Shared Bandwidth in Batches
Function
This API is used to add multiple EIPs to a shared bandwidth.
URI
POST /v3/{project_id}/eip/publicips/attach-share-bandwidth
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID. Minimum length: 32 Maximum length: 32 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
publicips |
Yes |
Array of BatchAttachSharebwDict objects |
Array length: 1 to 50 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
publicips |
Array of BatchPublicipResp objects |
EIPs. |
request_id |
String |
Request ID. |
Parameter |
Type |
Description |
|---|---|---|
statusCode |
Integer |
Status code |
publicip |
PublicipResp object |
EIP. |
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 the dedicated EIP pool, see the APIs about publcip_pool. |
alias |
String |
|
public_border_group |
String |
Example Request
If multiple EIPs are added to the same shared bandwidth, the bandwidth ID of these EIPs must be the same.
POST /v3/{project_id}/eip/publicips/attach-share-bandwidth
{
"publicips" : [ {
"bandwidth_id" : "e6af636c-ea79-4c20-ba2f-402057ba7886",
"publicip_id" : "99c8a2df-9e90-48df-9132-e2216e659459"
}, {
"bandwidth_id" : "e6af636c-ea79-4c20-ba2f-402057ba7886",
"publicip_id" : "7b484d78-550a-4e92-8363-a34b5194ddcb"
} ]
}
Example Response
Status code: 200
Normal response to POST requests
{
"publicips" : [ {
"statusCode" : 200,
"publicip" : {
"alias" : "test",
"associate_instance_id" : null,
"associate_instance_type" : null,
"bandwidth" : {
"id" : "e6af636c-ea79-4c20-ba2f-402057ba7886",
"size" : 5,
"share_type" : "WHOLE",
"charge_mode" : "traffic",
"name" : "bandwidth-b8ff",
"billing_info" : ""
},
"billing_info" : null,
"created_at" : "2020-07-10T10:10:18Z",
"description" : "",
"enterprise_project_id" : "0",
"id" : "99c8a2df-9e90-48df-9132-e2216e659459",
"ip_version" : 4,
"lock_status" : null,
"project_id" : "8d53f081ea24444aa95e2bfa942ef6ee",
"public_border_group" : "center",
"public_ip_address" : "10.246.165.44",
"public_ipv6_address" : null,
"publicip_pool_id" : "ece62314-858c-4793-a768-346efca42131",
"publicip_pool_name" : "5_bgp",
"status" : "ACTIVE",
"type" : "EIP",
"updated_at" : "2020-07-11T05:03:25Z",
"vnic" : {
"device_id" : "cc03e7f7-b820-4a2e-b243-8022daabf0cf",
"device_owner" : "compute:br-iaas-odin1a",
"instance_id" : "",
"instance_type" : "",
"mac" : "fa:16:3e:7a:5f:db",
"port_id" : "fb68a8e1-b93e-4100-8735-6d6b0a6a0eb5",
"port_profile" : "",
"private_ip_address" : "192.168.3.222",
"vni" : "435405",
"vpc_id" : "ac17491b-0769-4d96-b883-6d6295f6afad",
"vtep" : "18.8.152.158",
"port_vif_details" : "{\"primary_interface\": true}"
}
}
}, {
"statusCode" : 200,
"publicip" : {
"alias" : "test",
"associate_instance_id" : null,
"associate_instance_type" : null,
"bandwidth" : {
"id" : "e6af636c-ea79-4c20-ba2f-402057ba7886",
"size" : 5,
"share_type" : "WHOLE",
"charge_mode" : "traffic",
"name" : "bandwidth-b8ff",
"billing_info" : ""
},
"billing_info" : null,
"created_at" : "2020-07-10T10:10:18Z",
"description" : "",
"enterprise_project_id" : "0",
"id" : "7b484d78-550a-4e92-8363-a34b5194ddcb",
"ip_version" : 4,
"lock_status" : null,
"project_id" : "8d53f081ea24444aa95e2bfa942ef6ee",
"public_border_group" : "center",
"public_ip_address" : "10.246.165.45",
"public_ipv6_address" : null,
"publicip_pool_id" : "ece62314-858c-4793-a768-346efca42131",
"publicip_pool_name" : "5_bgp",
"status" : "ACTIVE",
"type" : "EIP",
"updated_at" : "2020-07-11T05:03:25Z",
"vnic" : {
"device_id" : "cc03e7f7-b820-4a2e-b243-8022daabf0dd",
"device_owner" : "compute:br-iaas-odin1a",
"instance_id" : "",
"instance_type" : "",
"mac" : "fa:16:3e:7a:5f:cc",
"port_id" : "fb68a8e1-b93e-4100-8735-6d6b0a6a0eb6",
"port_profile" : "",
"private_ip_address" : "192.168.3.221",
"vni" : "435405",
"vpc_id" : "ac17491b-0769-4d96-b883-6d6295f6afad",
"vtep" : "18.8.152.158",
"port_vif_details" : "{\"primary_interface\": true}"
}
}
} ],
"request_id" : "db4b975a79d1da86dda3d02054f11e16"
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Normal response to POST requests |
Error Codes
See Error Codes.