CreateBandwidthPackage
Creates a specified bandwidth plan.
Operation description
To use Global Accelerator (GA) for network acceleration, you must create a basic bandwidth plan. Basic bandwidth plans support the following bandwidth types:
Standard acceleration bandwidth: By default, both the acceleration area and the area where the endpoint is deployed are in the Chinese mainland. The accelerated service is deployed on Alibaba Cloud.
Enhanced acceleration bandwidth: By default, both the acceleration area and the area where the endpoint is deployed are in the Chinese mainland. This type can accelerate both Alibaba Cloud and non-Alibaba Cloud public network services.
Premium acceleration bandwidth: By default, both the acceleration area and the area where the endpoint is deployed are outside the Chinese mainland. This type can accelerate both Alibaba Cloud and non-Alibaba Cloud public network services. To accelerate network access for users in the Chinese mainland, you must select Hong Kong (China) as the acceleration region.
When you call this operation, take note of the following items:
-
The CreateBandwidthPackage operation is asynchronous. The system returns a bandwidth plan ID, but the bandwidth plan is not yet created. The creation task is still running in the background. You can call DescribeBandwidthPackage to query the status of the bandwidth plan:
If the bandwidth plan is in the init state, the bandwidth plan is being created. In this state, you can only perform query operations.
If the bandwidth plan is in the active state, the bandwidth plan is created.
-
You cannot call the CreateBandwidthPackage operation to concurrently create bandwidth plans for the same Global Accelerator (GA) instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:CreateBandwidthPackage |
create |
*BandwidthPackage
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Global Accelerator (GA) instance. Set the value to cn-hangzhou. |
cn-hangzhou |
| Bandwidth |
integer |
Yes |
The bandwidth value of the bandwidth plan. Unit: Mbit/s. Valid values: 2 to 2000. |
2 |
| Duration |
string |
No |
The subscription duration.
This parameter is required if ChargeType is set to PREPAY. |
1 |
| PricingCycle |
string |
No |
The billing cycle. Valid values:
This parameter is required if ChargeType is set to PREPAY. |
Month |
| AutoPay |
boolean |
No |
Specifies whether to enable automatic payment. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The client token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request is unique. |
123e4567**** |
| Type |
string |
Yes |
The type of the bandwidth plan. Valid values:
Only Basic is supported on the China site. |
Basic |
| BandwidthType |
string |
No |
The bandwidth type. Valid values:
This parameter is required if Type is set to Basic. |
Basic |
| AutoUseCoupon |
string |
No |
Specifies whether to use a coupon for automatic payment of the bill. Valid values:
Note
This parameter takes effect only when AutoPay is set to true. |
false |
| Ratio |
integer |
No |
The guaranteed proportion for the 95th percentile billing method. Valid values: 30 to 100. Note
This parameter takes effect only when BillingType is set to PayBY95. |
30 |
| BillingType |
string |
No |
The pay-as-you-go billing method. Valid values:
Note
This parameter takes effect only when ChargeType is set to POSTPAY. |
PayByTraffic |
| ChargeType |
string |
No |
The billing method. Valid values:
|
PREPAY |
| CbnGeographicRegionIdA |
string |
No |
Area A for the cross-border acceleration bandwidth plan. Set the value to China-mainland (the Chinese mainland). This parameter is supported only on the International site. |
China-mainland |
| CbnGeographicRegionIdB |
string |
No |
Area B for the cross-border acceleration bandwidth plan. Set the value to Global. This parameter is supported only on the International site. |
Global |
| PromotionOptionNo |
string |
No |
The coupon code. Note
This parameter is applicable only to the International site. |
50003298014**** |
| AutoRenew |
boolean |
No |
Specifies whether to enable auto-renewal. Valid values:
|
false |
| AutoRenewDuration |
integer |
No |
The auto-renewal duration. Unit: months. Valid values: 1 to 12. Default value: 1. Note
This parameter takes effect only when AutoRenew is set to true. |
1 |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-aekzrnd67gq**** |
| Tag |
array<object> |
No |
The tags of the bandwidth plan. |
|
|
object |
No |
The tags of the bandwidth plan. |
||
| Key |
string |
No |
The tag key of the bandwidth plan. The tag key cannot be an empty string. The tag key can be up to 64 characters in length, and cannot start with You can specify up to 20 tag keys. |
tag-key |
| Value |
string |
No |
The tag value of the bandwidth plan. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot start with You can specify up to 20 tag values. |
tag-value |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned information. |
||
| BandwidthPackageId |
string |
The ID of the bandwidth plan. |
gbwp-bp1sgzldyj6b4q7cx**** |
| OrderId |
string |
The order ID. If you do not enable automatic payment, go to the User Center to complete the payment. This parameter is returned only when ChargeType is set to PREPAY, which indicates the subscription billing method. If AutoPay is set to false, which indicates that automatic payment is disabled, go to the User Center to complete the payment. |
208257**** |
| RequestId |
string |
The request ID. |
4B6DBBB0-2D01-4C6A-A384-4129266E6B78 |
Examples
Success response
JSON format
{
"BandwidthPackageId": "gbwp-bp1sgzldyj6b4q7cx****",
"OrderId": "208257****",
"RequestId": "4B6DBBB0-2D01-4C6A-A384-4129266E6B78"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | COMMODITY.INVALID_COMPONENT | The bandwidth parameter is incorrect or out of range | |
| 400 | MissingParameter.BandwidthType | You must specify BandwidthType. | You must specify BandwidthType. |
| 500 | UnknownError | An error occurred while processing your request. Please try again. If the error persists, please submit a ticket. | An error occurred while the request was being processed. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.