Modifies a bandwidth plan.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. OpenAPI Explorer automatically calculates signature values. 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 your Global Accelerator (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 upgrade.

Name String No testName

The new name of the bandwidth plan.

Description String No testDescription

The new description of the bandwidth plan.

Bandwidth Integer No 2

The new bandwidth that is provided by the bandwidth plan.

BandwidthType String No Basic

The new type of bandwidth that is provided by the bandwidth plan. Valid values:

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

Specifies whether to automatically pay the bill. Valid values:

  • false: The system does not automatically pay the bill. This is the default value. After an order is generated, you must go to the Orders page of your Alibaba Cloud account to complete the payment.
  • true: The system automatically pays the bill. After an order is generated, the system automatically pays the bill.
AutoUseCoupon Boolean No false

Specifies whether to use coupons. Valid values:

  • true: Coupons can be used to offset the cost of the bandwidth plan.
  • false: Coupons cannot be used to offset the cost of the bandwidth plan. This is the default value.

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=true
&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

HTTP status code 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 status.
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 some configurations of the specified bandwidth plan are upgraded, but some other configurations are downgraded. The configurations of the bandwidth plan must be all upgraded or all downgraded.

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