Replaces the bandwidth plan that is associated with a Global Accelerator (GA) instance.

Description

When you call this operation to replace the bandwidth plan that is associated with a GA instance, take note of the following items:

  • The GA instance continues to forward network traffic.
  • ReplaceBandwidthPackage is an asynchronous operation. After you send a request, the system returns a request ID, but the operation is still being performed in the system background. You can call the DescribeAccelerator or ListAccelerators operation to query the state of the GA instance.
    • If the GA instance is in the configuring state, it indicates that the associated bandwidth plan is being replaced. In this case, you can perform only query operations.
    • If the GA instance is in the active state, it indicates that the associated bandwidth plan is replaced.
  • The ReplaceBandwidthPackage operation cannot be called repeatedly for the same GA instance 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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ReplaceBandwidthPackage

The operation that you want to perform. Set the value to ReplaceBandwidthPackage.

RegionId String Yes cn-hangzhou

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

BandwidthPackageId String Yes gbwp-bp176neb61yhcymow****

The ID of the replacement bandwidth plan. When you specify a replacement bandwidth plan, take note of the following items:

  • Only a bandwidth plan that is not associated with a GA instance can be specified.
  • If you want to replace a basic bandwidth plan, make sure that the bandwidth provided by the replacement bandwidth plan is not less than the total bandwidth allocated to the acceleration area.
TargetBandwidthPackageId String Yes gbwp-o978hgeb61yhcymow****

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

AcceleratorId String No ga-bp17frjjh0udz4qz****

The ID of the GA instance.

Response parameters

Parameter Type Example Description
RequestId String A0EA8CCA-F081-4338-9790-A1C791CCA779

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ReplaceBandwidthPackage
&RegionId=cn-hangzhou
&BandwidthPackageId=gbwp-bp176neb61yhcymow****
&TargetBandwidthPackageId=gbwp-o978hgeb61yhcymow****
&AcceleratorId=ga-bp17frjjh0udz4qz****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ReplaceBandwidthPackageResponse>
    <RequestId>A0EA8CCA-F081-4338-9790-A1C791CCA779</RequestId>
</ReplaceBandwidthPackageResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "A0EA8CCA-F081-4338-9790-A1C791CCA779"
}

Error codes

HTTP status code Error code Error message Description
400 NotExist.BandwidthPackage The bandwidth package does not exist. The error message returned because the specified bandwidth plan does not exist.
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.BasicBandwidthPackage You must specify the basic bandwidth package. The error message returned because no basic bandwidth plan is specified.

For a list of error codes, see Service error codes.