All Products
Search
Document Center

Global Accelerator:UpdateBandwidthPackage

Last Updated:Jul 31, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ga:UpdateBandwidthPackageupdate
  • BandwidthPackage
    acs:ga:{#regionId}:{#accountId}:bandwidthpackage/{#bandwidthPackageId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
BandwidthPackageIdstringYes

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

gbwp-bp1sgzldyj6b4q7cx****
NamestringNo

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
DescriptionstringNo

The description of the bandwidth plan.

The description can be up to 256 characters in length.

testDescription
BandwidthintegerNo

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

Valid values: 2 to 2000.

2
BandwidthTypestringNo

The type of bandwidth. Valid values:

  • Basic
  • Enhanced
  • Advanced
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
AutoPaybooleanNo

Specifies whether to enable automatic payment. Valid values:

  • false: disables automatic payment. This is the default value. If you select this option, you must go to Order Center to complete the payment after an order is generated.
  • true: enables automatic payment. Payments are automatically completed.
Note This parameter takes effect only if you call the UpdateBandwidthPackage operation to upgrade a bandwidth plan.
false
AutoUseCouponbooleanNo

Specifies whether to use coupons. Valid values:

  • true
  • false (default)
false

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

BandwidthPackagestring

The bandwidth plan ID.

gbwp-bp1eo4f57z1kbbcmn****
Descriptionstring

The description of the bandwidth plan.

testDescription
RequestIdstring

The request ID.

1DF3A3CB-B621-44F8-9870-C20D034D7AB
Namestring

The name of the bandwidth plan.

testName

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400COMMODITY.INVALID_COMPONENTThe 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.-
400StateError.BandwidthPackageThe state of bandwidth package is invalid.The bandwidth plan is in an invalid state.
400NotExist.BandwidthPackageThe bandwidth package does not exist.The bandwidth package does not exist.
400UpgradeError.BandwidthPackageThe 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 timeSummary of changesOperation
No change history