Queries the maximum public bandwidth that can be purchased, upgraded, or downgraded for various Elastic Compute Service (ECS) instance types.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeBandwidthLimitation | The operation that you want to perform. Set the value to DescribeBandwidthLimitation. |
| RegionId | String | Yes | cn-hangzhou | The ID of the region. You can call the DescribeRegions operation to query the most recent region list. |
| InstanceChargeType | String | No | PostPaid | The billing method of the instance. For more information, see Billing overview. Valid values:
Default value: PostPaid. |
| SpotStrategy | String | No | NoSpot | The bidding policy for the pay-as-you-go instance. Valid values:
Default value: NoSpot. Note The SpotStrategy parameter takes effect only when the InstanceChargeType parameter is set to PostPaid. |
| InstanceType | String | Yes | ecs.g5.large | The instance type. For information about the values, see Instance families. |
| ResourceId | String | No | i-bp67acfmxazb4ph*** | The ID of the resource. Note This parameter is required when the OperationType parameter is set to Upgrade or Downgrade. |
| OperationType | String | No | Upgrade | Specifies the operation for which to query the maximum public bandwidth. Valid values:
Default value: Create. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** | The ID of the request. |
| Bandwidths | Array of Bandwidth | Details about the maximum public bandwidth. | |
| Bandwidth | |||
| InternetChargeType | String | PayByTraffic | The billing method for network usage. Valid values:
|
| Max | Integer | 100 | The maximum public bandwidth. |
| Min | Integer | 0 | The minimum public bandwidth. |
| Unit | String | Mbps | The unit of the public bandwidth. |
Examples
Sample requests
http(s)://ecs.aliyuncs.com/?Action=DescribeBandwidthLimitation
&RegionId=cn-hangzhou
&InstanceType=ecs.g5.large
&Common request parametersSample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeBandwidthLimitationResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
<Bandwidths>
<InternetChargeType>PayByTraffic</InternetChargeType>
<Max>100</Max>
<Min>0</Min>
<Unit>Mbps</Unit>
</Bandwidths>
</DescribeBandwidthLimitationResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"Bandwidths" : [ {
"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 error message returned because the specified instance billing method is invalid. |
| 400 | InvalidInstanceType.ValueNotSupported | The specified InstanceType beyond the permitted range. | The error message returned because the specified InstanceType parameter is invalid. |
| 404 | Invalid.NetworkCategory | The specified NetworkCategory is not valid. | The error message returned because the specified NetworkCategory parameter is invalid. |
| 404 | Invalid.SpotStrategy | The specified SpotStrategy is not valid. | The error message returned because the specified SpotStrategy parameter is invalid. |
| 404 | Invalid.IoOptimized | The specified IoOptimized is not valid. | The error message returned because the specified IoOptimized parameter is invalid. |
| 404 | Invalid.ResourceId | The specified ResourceId is not valid. | The error message returned because the specified ResourceId parameter is invalid. |
| 404 | Invalid.InstancePayType | The specified InstancePayType is not valid. | The error message returned because the specified InstanceChargeType parameter is invalid. |
For a list of error codes, see Service error codes.