All Products
Search
Document Center

Elastic Compute Service:DescribeBandwidthLimitation

Last Updated:Jun 18, 2026

Calls DescribeBandwidthLimitation to query the maximum public bandwidth that can be purchased, upgraded, or downgraded for different instance types.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeBandwidthLimitation

get

*Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

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:

  • PrePaid: subscription.

  • PostPaid: pay-as-you-go.

Default value: PostPaid.

PostPaid

SpotStrategy

string

No

The bidding strategy for pay-as-you-go instances. Valid values:

  • NoSpot: a regular pay-as-you-go instance.

  • SpotWithPriceLimit: a preemptible instance with a user-defined maximum hourly price.

  • SpotAsPriceGo: a preemptible instance priced at the market price at the time of purchase.

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:

  • Upgrade: upgrades the public bandwidth.

  • Downgrade: downgrades the public bandwidth.

  • Create: creates an ECS instance.

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:

  • PayByBandwidth

  • PayByTraffic

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.