All Products
Search
Document Center

Virtual Private Cloud:ModifyCommonBandwidthPackageSpec

Last Updated:Mar 04, 2024

Modifies the maximum bandwidth of an Internet Shared Bandwidth instance.

Operation description

Before you call this operation, take note of the following items:

  • ModifyCommonBandwidthPackageSpec is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeCommonBandwidthPackages operation to query the status of the task.

    • If the Internet Shared Bandwidth instance is in the Modifying state, the maximum bandwidth of the Internet Shared Bandwidth instance is being modified. In this state, you can only query the Internet Shared Bandwidth instance and cannot perform other operations.
    • If the Internet Shared Bandwidth instance is in the Available state, the maximum bandwidth of the Internet Shared Bandwidth instance is modified.
  • You cannot repeatedly call the ModifyCommonBandwidthPackageSpec operation to modify the maximum bandwidth of an Internet Shared Bandwidth instance within the specified period of time.

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
vpc:ModifyCommonBandwidthPackageSpecWrite
  • BandwidthPackage
    acs:vpc:{#regionId}:{#accountId}:combandwidthpackage/{#BandwidthPackageId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the Internet Shared Bandwidth instance.

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

cn-hangzhou
BandwidthPackageIdstringYes

The ID of the Internet Shared Bandwidth instance.

cbwp-2ze2ic1xd2qeqk145****
BandwidthstringYes

The maximum bandwidth of the Internet Shared Bandwidth instance. Unit: Mbit/s.

Valid values: 1 to 1000.

1000

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

7F129000-F929-4AF5-BE8D-BAE434C795306

Examples

Sample success responses

JSONformat

{
  "RequestId": "7F129000-F929-4AF5-BE8D-BAE434C795306"
}

Error codes

HTTP status codeError codeError messageDescription
400ResourceNotEnough.BandwidthThe specified resource of Bandwidth is not enough.The specified resource of Bandwidth is insufficient.
400InvalidParameter.BandwidthThe specified bandwidth is not valid.-
400InvalidBandwidthPackageId.NotFoundThe specified BandwidthPackageId not exist.-
400InvalidCommonBandwidthPackageId.NotFoundThe specified BandwidthPackageId is not found.-
400IncorrectStatus.ResourceStatusResource status is abnormal for renew.-
400SYSTEM.SALE_VALIDATE_UNEXPECTED_ERRORYou have arrears and do not meet the purchase conditions.-
400OperationFailed.SyncOrderToSubSyncOrderToSub error.The operation failed.
400OperationFailed.SaleValidateValidate sale condition with subArticle failed.Failed to validate the sales condition with a subproject.
400OperationFailed.QueryCommodityInfoOperation failed because quey commodity info error.-
400OperationFailed.QueryPriceQuery price failed when create order.Failed to query the price when creating the order.
400Forbidden.ChargeTypeIsPrepaidIt's forbidden to change prepaid CBWP's bandwidth by API. It can be changed on Aliyun web console.-
400IncorrectStatus.CbwpModifyingCbwp Modifying status is invalid.-
404InvalidRegionId.NotFoundThe specified RegionId does not exist in our records.The specified region ID does not exist.
404InvalidBandwidthPackageId.NotFoundThe specified BandwidthPackageId does not exist in our records.The ID of the specified EIP bandwidth plan does not exist.
404InvalidBandwidth.ValueNotSupportedThe specified value of Bandwidth not supported.The specified maximum bandwidth value is invalid.
404BandwidthPackage.FinancialLockedThe specified BandwidthPackage has been Financial Lock.-
500OrderError.BandwidthPackageThe Account failed to create order.-

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