UpdateBandwidthPackage
Modifies the configurations of a bandwidth plan.
Operation description
When you call this operation, take note of the following items:
If the bandwidth value is not modified, the UpdateBandwidthPackage operation is a synchronous operation and the modifications take effect immediately.
- If the bandwidth value is modified and the bandwidth plan is not associated with a Global Accelerator instance, the UpdateBandwidthPackage operation is asynchronous. The system returns a request ID, but the bandwidth plan is not immediately modified. The modification task is still running in the background. You can call the DescribeBandwidthPackage operation to check whether the bandwidth plan is modified:
If the modified parameter values remain unchanged, the bandwidth plan is being modified. In this case, you can only perform query operations and cannot perform other operations.
If the modified parameter values have changed, the modification is complete.
- If the bandwidth value is modified and the bandwidth plan is associated with a Global Accelerator instance, the UpdateBandwidthPackage operation is asynchronous. The system returns a request ID, but the bandwidth plan is not immediately modified. The modification task is still running in the background. You can call the DescribeAccelerator operation and check the status of the Global Accelerator instance to determine whether the bandwidth plan is modified:
If the Global Accelerator instance is in the configuring state, the bandwidth plan associated with the Global Accelerator instance is being modified. In this state, you can only perform query operations and cannot perform other operations.
If the Global Accelerator instance is in the active state, the modification of the bandwidth plan associated with the Global Accelerator instance is complete.
The UpdateBandwidthPackage operation does not support concurrent modifications to the configurations of the same bandwidth plan.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:UpdateBandwidthPackage |
update |
*BandwidthPackage
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Global Accelerator instance. Set the value to cn-hangzhou. |
cn-hangzhou |
| BandwidthPackageId |
string |
Yes |
The ID of the bandwidth plan that you want to modify. |
gbwp-bp1sgzldyj6b4q7cx**** |
| Name |
string |
No |
The name of the bandwidth plan. The name must be 1 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character. |
testName |
| Description |
string |
No |
The description of the bandwidth plan. The description can be up to 256 characters in length. |
testDescription |
| Bandwidth |
integer |
No |
The bandwidth value of the bandwidth plan. Unit: Mbit/s. Valid values: 2 to 2000. |
2 |
| BandwidthType |
string |
No |
The bandwidth type. Valid values:
Note
Currently, specification changes are only supported between Basic and Enhanced. Specification changes between Advanced and other types are not supported. |
Basic |
| AutoPay |
boolean |
No |
Specifies whether to enable automatic payment. Valid values:
Note
This parameter takes effect only for upgrade orders. |
false |
| AutoUseCoupon |
boolean |
No |
Specifies whether to use coupons. Valid values:
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response information. |
||
| BandwidthPackage |
string |
The ID of the bandwidth plan. |
gbwp-bp1eo4f57z1kbbcmn**** |
| Description |
string |
The description of the bandwidth plan. |
testDescription |
| RequestId |
string |
The request ID. |
1DF3A3CB-B621-44F8-9870-C20D034D7AB |
| Name |
string |
The name of the bandwidth plan. |
testName |
Examples
Success response
JSON format
{
"BandwidthPackage": "gbwp-bp1eo4f57z1kbbcmn****",
"Description": "testDescription",
"RequestId": "1DF3A3CB-B621-44F8-9870-C20D034D7AB",
"Name": "testName"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | COMMODITY.INVALID_COMPONENT | The Basic type only can be upgraded to the Enhanced, and the Enhanced type only can be downgraded to the Basic . The type of the Advance bandwidth can not be changed. | |
| 400 | StateError.BandwidthPackage | The state of bandwidth package is invalid. | The bandwidth plan is in an invalid state. |
| 400 | NotExist.BandwidthPackage | The bandwidth package does not exist. | The bandwidth package does not exist. |
| 400 | UpgradeError.BandwidthPackage | The bandwidth package configurations should be either all upgrades or all downgrades. | You cannot upgrade and downgrade a bandwidth plan at the same time. You can only upgrade or downgrade the bandwidth plan. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.