Modifies a bandwidth plan.

Description

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

  • UpdateBandwidthPackage is a synchronous operation when it is called to modify the configurations excluding the bandwidth value of a bandwidth plan. The new configurations take effect immediately after the operation is performed.
  • UpdateBandwidthPackage is an asynchronous operation when it is called to modify the configurations including the bandwidth value of a bandwidth plan that is not associated with a Global Accelerator (GA) instance. After you send a request, the system returns a request ID, but the operation is still being performed in the system background. You can call the DescribeBandwidthPackage operation to query whether the bandwidth plan is modified.
    • If the parameter settings of the bandwidth plan remain unchanged, it indicates that the bandwidth plan is being modified. In this case, you can perform only query operations.
    • If the parameter settings of the bandwidth plan change, it indicates that the bandwidth plan is modified.
  • UpdateBandwidthPackage is an asynchronous operation when it is called to modify the configurations including the bandwidth value of a bandwidth plan that is associated with a GA instance. After you send a request, the system returns a request ID, but the operation is still being performed in the system background. You can call the DescribeAccelerator operation to query the state of the GA instance and determine whether its associated bandwidth plan is modified.
    • If the GA instance is in the configuring state, it indicates that the bandwidth plan is being modified. In this case, you can perform only query operations.
    • If the GA instance is in the active state, it indicates that the bandwidth plan is modified.
  • The UpdateBandwidthPackage operation cannot be called repeatedly for the same bandwidth plan within a specific period of time.

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

Parameter Type Required Example Description
Action String Yes UpdateBandwidthPackage

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

RegionId String Yes cn-hangzhou

The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou.

BandwidthPackageId String Yes gbwp-bp1sgzldyj6b4q7cx****

The ID of the bandwidth plan that you want to modify.

Name String No testName

The name of the bandwidth plan.

The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.

Description String No testDescription

The description of the bandwidth plan.

The description can be up to 256 characters in length.

Bandwidth Integer No 2

The bandwidth value of the bandwidth plan. Unit: Mbit/s.

Valid values: 2 to 2000.

BandwidthType String No Basic

The type of bandwidth. Valid values:

  • Basic: basic
  • Enhanced: enhanced
  • Advanced: premium
Note You can only upgrade Basic bandwidth to Enhanced bandwidth. You cannot change Enhanced bandwidth or Advanced bandwidth to another type.
AutoPay Boolean No false

Specifies whether to enable automatic payment. Default value: false. Valid values:

  • false: disables automatic payment. If you select this option, you must go to the Order Center to complete the payment after an order is generated.
  • true: enables automatic payment. Payments are automatically completed.
AutoUseCoupon Boolean No false

Specifies whether to use coupons. Default value: false. Valid values:

  • true: uses coupons.
  • false: does not use coupons.

Response parameters

Parameter Type Example Description
BandwidthPackage String gbwp-bp1eo4f57z1kbbcmn****

The ID of the bandwidth plan.

Description String testDescription

The description of the bandwidth plan.

RequestId String 1DF3A3CB-B621-44F8-9870-C20D034D7AB

The ID of the request.

Name String testName

The name of the bandwidth plan.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateBandwidthPackage
&RegionId=cn-hangzhou
&BandwidthPackageId=gbwp-bp1sgzldyj6b4q7cx****
&Name=testName
&Description=testDescription
&Bandwidth=2
&BandwidthType=Basic
&AutoPay=false
&AutoUseCoupon=false
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateBandwidthPackageResponse>
    <BandwidthPackage>gbwp-bp1eo4f57z1kbbcmn****</BandwidthPackage>
    <Description>testDescription</Description>
    <RequestId>1DF3A3CB-B621-44F8-9870-C20D034D7AB</RequestId>
    <Name>testName</Name>
</UpdateBandwidthPackageResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "BandwidthPackage" : "gbwp-bp1eo4f57z1kbbcmn****",
  "Description" : "testDescription",
  "RequestId" : "1DF3A3CB-B621-44F8-9870-C20D034D7AB",
  "Name" : "testName"
}

Error codes

HttpCode Error code Error message Description
400 StateError.BandwidthPackage The state of bandwidth package is invalid. The error message returned because the specified bandwidth plan is in an invalid state.
400 NotExist.BandwidthPackage The bandwidth package does not exist. The error message returned because the specified bandwidth plan does not exist.
400 UpgradeError.BandwidthPackage The bandwidth package configurations should be either all upgrades or all downgrades. The error message returned because you cannot upgrade and downgrade a bandwidth plan at the same time. You can only upgrade or downgrade the bandwidth plan.

For a list of error codes, visit the API Error Center.