This API is used to assign a shared bandwidth.
Name |
Mandatory |
Type |
Description |
|---|---|---|---|
bandwidth |
Yes |
bandwidth object |
Specifies the bandwidth objects. For details, see Table 3. |
Name |
Mandatory |
Type |
Description |
|---|---|---|---|
name |
Yes |
String |
Specifies the bandwidth name. The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). |
size |
Yes |
Integer |
|
enterprise_project_id |
No |
String |
NOTE:
This parameter is unsupported. Do not use it. |
POST https://{Endpoint}/v2.0/{project_id}/bandwidths
{
"bandwidth": {
"name": "bandwidth123",
"size": 10,
"enterprise_project_id":"b261ac1f-2489-4bc7-b31b-c33c3346a439"
}
}
Name |
Type |
Description |
|---|---|---|
bandwidth |
bandwidth object |
Specifies the bandwidth objects. For details, see Table 5. |
Name |
Type |
Description |
|---|---|---|
name |
String |
|
size |
Integer |
|
id |
String |
Specifies the bandwidth ID, which uniquely identifies the bandwidth. |
share_type |
String |
|
publicip_info |
Array of publicip_info objects |
|
tenant_id |
String |
Specifies the project ID. |
bandwidth_type |
String |
|
charge_mode |
String |
|
billing_info |
String |
Specifies the bill information. If billing_info is specified, the bandwidth is in yearly/monthly billing mode. |
enterprise_project_id |
String |
NOTE:
This parameter is unsupported. Do not use it. |
status |
String |
|
created_at |
String |
|
updated_at |
String |
|
Name |
Type |
Description |
|---|---|---|
publicip_id |
String |
Specifies the ID of the EIP that uses the bandwidth. |
publicip_address |
String |
Specifies the obtained EIP if only IPv4 EIPs are available. |
publicip_type |
String |
|
{
"bandwidth": {
"id": "1bffc5f2-ff19-45a6-96d2-dfdca49cc387",
"name": "bandwidth123",
"size": 10,
"share_type": "WHOLE",
"publicip_info": [],
"tenant_id": "26ae5181a416420998eb2093aaed84d9",
"bandwidth_type": "share",
"charge_mode": "traffic",
"billing_info": "",
"enterprise_project_id": "0",
"status": "NORMAL",
"created_at": "2020-04-21T07:58:02Z",
"updated_at": "2020-04-21T07:58:02Z"
}
}
See Status Codes.
See Error Codes.