Modifies a bandwidth plan.
Debugging
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 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 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 at most 256 characters in length. |
Bandwidth | Integer | No | 2 |
The bandwidth of the bandwidth plan. Unit: Mbit/s. Valid values: 2 to 2000. |
BandwidthType | String | No | Basic |
The type of the bandwidth. Valid values:
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 automatically complete the payment. Valid values:
|
AutoUseCoupon | Boolean | No | false |
Specifies whether to use a coupon. Valid values:
|
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.