Queries the maximum public bandwidth that can be purchased, upgraded, or downgraded for various Elastic Compute Service (ECS) instance types.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeBandwidthLimitation

The operation that you want to perform. Set the value to DescribeBandwidthLimitation.

RegionIdStringYescn-hangzhou

The ID of the region. You can call the DescribeRegions operation to query the most recent region list.

InstanceChargeTypeStringNoPostPaid

The billing method of the instance. For more information, see Billing overview. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go

Default value: PostPaid.

SpotStrategyStringNoNoSpot

The bidding policy for the pay-as-you-go instance. Valid values:

  • NoSpot: The instance is a regular pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is a preemptible instance with user-defined maximum hourly prices.
  • SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is automatically used as the bid price. The market price can be up to the pay-as-you-go price.

Default value: NoSpot.

Note The SpotStrategy parameter takes effect only when the InstanceChargeType parameter is set to PostPaid.
InstanceTypeStringYesecs.g5.large

The instance type. For information about the values, see Instance families.

ResourceIdStringNoi-bp67acfmxazb4ph***

The ID of the resource.

Note This parameter is required when the OperationType parameter is set to Upgrade or Downgrade.
OperationTypeStringNoUpgrade

Specifies the operation for which to query the maximum public bandwidth. Valid values:

  • Upgrade: upgrades the public bandwidth.
  • Downgrade: downgrades the public bandwidth.
  • Create: creates an ECS instance.

Default value: Create.

Response parameters

ParameterTypeExampleDescription
RequestIdString473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

The ID of the request.

BandwidthsArray of Bandwidth

Details about the maximum public bandwidth.

Bandwidth
InternetChargeTypeStringPayByTraffic

The billing method for network usage. Valid values:

  • PayByBandwidth: pay-by-bandwidth
  • PayByTraffic: pay-by-traffic
MaxInteger100

The maximum public bandwidth.

MinInteger0

The minimum public bandwidth.

UnitStringMbps

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 parameters

Sample 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 codeError codeError messageDescription
400Invalid.InstanceChargeTypeThe specified InstanceChargeType is not valid.The error message returned because the specified instance billing method is invalid.
400InvalidInstanceType.ValueNotSupportedThe specified InstanceType beyond the permitted range.The error message returned because the specified InstanceType parameter is invalid.
404Invalid.NetworkCategoryThe specified NetworkCategory is not valid.The error message returned because the specified NetworkCategory parameter is invalid.
404Invalid.SpotStrategyThe specified SpotStrategy is not valid.The error message returned because the specified SpotStrategy parameter is invalid.
404Invalid.IoOptimizedThe specified IoOptimized is not valid.The error message returned because the specified IoOptimized parameter is invalid.
404Invalid.ResourceIdThe specified ResourceId is not valid.The error message returned because the specified ResourceId parameter is invalid.
404Invalid.InstancePayTypeThe 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.