All Products
Search
Document Center

Elastic Compute Service:DescribeBandwidthLimitation

Last Updated:Sep 29, 2024

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeBandwidthLimitationget
  • Instance
    acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
InstanceChargeTypestringNo

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
SpotStrategystringNo

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

  • NoSpot: The instance is a pay-as-you-go instance.
  • SpotWithPriceLimit: The instance is a preemptible instance for which you can specify the maximum hourly price.
  • 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.
NoSpot
InstanceTypestringYes

The instance type. For information about the values, see Overview of ECS instance families.

ecs.g5.large
ResourceIdstringNo

The resource ID.

Note This parameter is required when the OperationType parameter is set to Upgrade or Downgrade.
i-bp67acfmxazb4ph***
OperationTypestringNo

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.

Upgrade

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
Bandwidthsarray<object>

Details about the maximum public bandwidth.

Bandwidthobject
InternetChargeTypestring

The billing method for network usage. Valid values:

  • PayByBandwidth
  • PayByTraffic
PayByTraffic
Maxinteger

The maximum public bandwidth.

100
Mininteger

The minimum public bandwidth.

0
Unitstring

The unit of the public bandwidth.

Mbps

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "Bandwidths": {
    "Bandwidth": [
      {
        "InternetChargeType": "PayByTraffic",
        "Max": 100,
        "Min": 0,
        "Unit": "Mbps"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Invalid.InstanceChargeTypeThe specified InstanceChargeType is not valid.The specified InstanceChargeType parameter is invalid.
400InvalidParamThe input parameter DestinationResource that is mandatory for processing this request is not supplied.-
400InvalidInstanceType.ValueNotSupportedThe specified InstanceType beyond the permitted range.-
400InvalidInstanceId.NotFoundThe specified ecs instance not found.-
404Invalid.ResourceType.NotFoundThe ResourceType provided does not exist in our records.-
404Invalid.NetworkCategoryThe specified NetworkCategory is not valid.The specified NetworkCategory parameter is invalid.
404Invalid.SpotStrategyThe specified SpotStrategy is not valid.The specified SpotStrategy parameter is invalid.
404Invalid.IoOptimizedThe specified IoOptimized is not valid.The specified IoOptimized parameter is invalid.
404Invalid.ResourceIdThe specified ResourceId is not valid.The specified ResourceId parameter is invalid.
404Invalid.InstancePayTypeThe specified InstancePayType is not valid.The specified InstanceChargeType parameter is invalid.
404Invalid.OperationTypeThe specified OperationType is not valid.The specified OperationType parameter is invalid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-03-07The Error code has changedView Change Details