Modifies the configurations of a bandwidth plan.
Operation description
Take note of the following items:
-
UpdateBandwidthPackage is a synchronous operation when you call the operation to modify the configuration excluding the bandwidth value of a bandwidth plan. The new configuration immediately takes effect after the operation is performed.
-
UpdateBandwidthPackage is an asynchronous operation when you call the operation to modify the configuration including the bandwidth value of a bandwidth plan that is not associated with a Global Accelerator (GA) instance. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeBandwidthPackage operation to query the status of the task.
- If the parameter values of the bandwidth plan remain unchanged, the bandwidth plan is being modified. In this case, you can perform only query operations.
- If the parameter values of the bandwidth plan are changed, the bandwidth plan is modified.
-
UpdateBandwidthPackage is an asynchronous operation when you call the operation to modify the configuration including the bandwidth value of a bandwidth plan that is associated with a GA instance. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeAccelerator operation to query the status of the task.
- If the GA instance is in the configuring state, the bandwidth plan is being modified. In this case, you can perform only query operations.
- If the GA instance is in the active state, the bandwidth plan is modified.
-
You cannot repeatedly call the UpdateBandwidthPackage operation for the same bandwidth plan within a specific period of time.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ga:UpdateBandwidthPackage | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the GA 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 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. | 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 type of bandwidth. Valid values:
Note
You can upgrade Basic bandwidth to Enhanced bandwidth or downgrade Enhanced bandwidth to Basic bandwidth. You cannot change Advanced bandwidth to another type of bandwidth.
| Basic |
AutoPay | boolean | No | Specifies whether to enable automatic payment. Valid values:
Note
This parameter takes effect only if you call the UpdateBandwidthPackage operation to upgrade a bandwidth plan.
| false |
AutoUseCoupon | boolean | No | Specifies whether to use coupons. Valid values:
| false |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|