forked from docs/virtual-private-cloud
30 KiB
30 KiB
- original_name
vpc_sharebandwidth_0001.html
Assigning a Shared Bandwidth
Function
This API is used to assign a shared bandwidth.
URI
POST /v2.0/{project_id}/bandwidths
Table 1 <vpc_sharebandwidth_0001__table40002310>
describes the parameters.
Request Message
Request parameter
Table 2 Request header parameter Parameter Mandatory Type Description X-Auth-Token Yes String Specifies the user token. The token can be obtained by calling the IAM API used for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Table 3 Request parameter Name Mandatory Type Description bandwidth Yes bandwidth <vpc_sharebandwidth_0001__table11041789>
objectSpecifies the bandwidth objects. For details, see Table 4 <vpc_sharebandwidth_0001__table11041789>
.Example request
POST https://{Endpoint}/v2.0/{project_id}/bandwidths { "bandwidth": { "name": "bandwidth123", "size": 10, "enterprise_project_id":"b261ac1f-2489-4bc7-b31b-c33c3346a439" } }
Response Message
Response parameter
Table 5 Response parameter Name Type Description bandwidth bandwidth <vpc_sharebandwidth_0001__table60972066>
objectSpecifies the bandwidth objects. For details, see Table 6 <vpc_sharebandwidth_0001__table60972066>
.Example response
{ "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" } }
Status Code
See Status Codes <vpc_api_0002>
.
Error Code
See Error Codes <vpc_api_0003>
.