Creates a bandwidth plan.
Operation description
You must create a basic bandwidth plan to use Global Accelerator (GA) for network acceleration. A basic bandwidth plan supports the following bandwidth types:
Basic bandwidth: 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 bandwidth: The acceleration area and the area where the endpoint is deployed are in the Chinese mainland. This bandwidth type can accelerate services on both Alibaba Cloud and public networks outside Alibaba Cloud.
Advanced bandwidth: The acceleration area and the area where the endpoint is deployed are outside the Chinese mainland. This bandwidth type can accelerate services on both Alibaba Cloud and public networks outside Alibaba Cloud. To accelerate access for users in the Chinese mainland, you can select China (Hong Kong) as the acceleration area.
Note the following when you call this operation:
-
The CreateBandwidthPackage operation is asynchronous. After you send a request, the system returns a bandwidth plan ID, but the bandwidth plan is not created immediately. The system creates the bandwidth plan in the background. You can call the DescribeBandwidthPackage operation to query the status of the bandwidth plan:
If a bandwidth plan is in the init state, the bandwidth plan is being created. In this state, you can only query the bandwidth plan and cannot perform other operations.
If a bandwidth plan is in the active state, the bandwidth plan is created.
-
The CreateBandwidthPackage operation does not support concurrent requests to create bandwidth plans for the same Global Accelerator 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 GA instance. Set the value to cn-hangzhou. |
cn-hangzhou |
| Bandwidth |
integer |
Yes |
The bandwidth of the bandwidth plan. Unit: Mbps. Valid values: 2 to 2000. |
2 |
| Duration |
string |
No |
The subscription duration.
This parameter is required if you set ChargeType to PREPAY. |
1 |
| PricingCycle |
string |
No |
The billing cycle. Valid values:
This parameter is required if you set ChargeType 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. Generate a client token from your client to make sure that the token is unique among different requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the request as the ClientToken. The RequestId may be different for each request. |
123e4567**** |
| Type |
string |
Yes |
The type of the bandwidth plan. Valid values:
Only Basic is supported on the Alibaba Cloud China Website (www.aliyun.com). |
Basic |
| BandwidthType |
string |
No |
The type of bandwidth. Valid values:
This parameter is required if you set Type to Basic. |
Basic |
| AutoUseCoupon |
string |
No |
Specifies whether to use a coupon to automatically pay for the bill. Valid values:
Note
This parameter takes effect only if AutoPay is set to true. |
false |
| Ratio |
integer |
No |
The percentage of the guaranteed minimum bandwidth if you use the pay-by-95th-percentile metering method. Valid values: 30 to 100. Note
This parameter takes effect only if BillingType is set to PayBY95. |
30 |
| BillingType |
string |
No |
The billing method for a pay-as-you-go bandwidth plan. Valid values:
Note
This parameter takes effect only if ChargeType is set to POSTPAY. |
PayByTraffic |
| ChargeType |
string |
No |
The billing method. Valid values:
|
PREPAY |
| CbnGeographicRegionIdA |
string |
No |
Connected area A of the cross-region acceleration bandwidth plan. Set the value to China-mainland. This parameter is available only on the Alibaba Cloud International Website (www.alibabacloud.com). |
China-mainland |
| CbnGeographicRegionIdB |
string |
No |
Connected area B of the cross-region acceleration bandwidth plan. Set the value to Global. This parameter is available only on the Alibaba Cloud International Website (www.alibabacloud.com). |
Global |
| PromotionOptionNo |
string |
No |
The coupon code. Note
This parameter is available only on the Alibaba Cloud International Website (www.alibabacloud.com). |
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 if AutoRenew is set to true. |
1 |
| ResourceGroupId |
string |
No |
The resource group ID. |
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 response. |
||
| RequestId |
string |
The request ID. |
4B6DBBB0-2D01-4C6A-A384-4129266E6B78 |
| BandwidthPackageId |
string |
The bandwidth plan ID. |
gbwp-bp1sgzldyj6b4q7cx**** |
| OrderId |
string |
The order ID.
This parameter is returned only when you set ChargeType to PREPAY. If you set AutoPay to false, go to the Order Hub to complete the payment. |
208257**** |
Examples
Success response
JSON format
{
"RequestId": "4B6DBBB0-2D01-4C6A-A384-4129266E6B78",
"BandwidthPackageId": "gbwp-bp1sgzldyj6b4q7cx****",
"OrderId": "208257****"
}
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.