Calls DescribeBandwidthLimitation to query the maximum public bandwidth that can be purchased, upgraded, or downgraded for different instance types.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeBandwidthLimitation |
get |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the target region. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| InstanceChargeType |
string |
No |
The billing method of the instance. For more information, see Billing overview. Valid values:
Default value: PostPaid. |
PostPaid |
| SpotStrategy |
string |
No |
The bidding strategy for pay-as-you-go instances. Valid values:
Default value: NoSpot. Note
The SpotStrategy parameter takes effect only when the InstanceChargeType parameter is set to PostPaid. |
NoSpot |
| InstanceType |
string |
Yes |
The instance type. For more information, see Instance families. |
ecs.g5.large |
| ResourceId |
string |
No |
The resource ID. Note
When you set the OperationType parameter to Upgrade or Downgrade, the ResourceId parameter is required. |
i-bp67acfmxazb4ph*** |
| OperationType |
string |
No |
The operation type for querying public bandwidth limits. Valid values:
Default value: Create. |
Upgrade |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| Bandwidths |
object |
||
| Bandwidth |
array<object> |
The collection of maximum public bandwidth information. |
|
|
object |
The collection of maximum public bandwidth information. |
||
| InternetChargeType |
string |
The billing method for network usage. Valid values:
|
PayByTraffic |
| Max |
integer |
The maximum public bandwidth. |
100 |
| Min |
integer |
The minimum public bandwidth. |
0 |
| Unit |
string |
The unit of the public bandwidth. |
Mbps |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"Bandwidths": {
"Bandwidth": [
{
"InternetChargeType": "PayByTraffic",
"Max": 100,
"Min": 0,
"Unit": "Mbps"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid.InstanceChargeType | The specified InstanceChargeType is not valid. | The specified InstanceChargeType parameter is invalid. |
| 400 | InvalidParam | The input parameter DestinationResource that is mandatory for processing this request is not supplied. | |
| 400 | InvalidInstanceType.ValueNotSupported | The specified InstanceType beyond the permitted range. | |
| 400 | InvalidInstanceId.NotFound | The specified ecs instance not found. | |
| 404 | Invalid.ResourceType.NotFound | The ResourceType provided does not exist in our records. | |
| 404 | Invalid.NetworkCategory | The specified NetworkCategory is not valid. | The specified NetworkCategory parameter is invalid. |
| 404 | Invalid.SpotStrategy | The specified SpotStrategy is not valid. | The specified SpotStrategy parameter is invalid. |
| 404 | Invalid.IoOptimized | The specified IoOptimized is not valid. | The specified IoOptimized parameter is invalid. |
| 404 | Invalid.ResourceId | The specified ResourceId is not valid. | The specified ResourceId parameter is invalid. |
| 404 | Invalid.InstancePayType | The specified InstancePayType is not valid. | The specified InstanceChargeType parameter is invalid. |
| 404 | Invalid.OperationType | The specified OperationType is not valid. | The specified parameter OperationType is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.