Creates a bandwidth plan.
Description
To use Global Accelerator (GA) for acceleration, you must purchase a basic bandwidth plan. A basic bandwidth plan supports the following bandwidth types:
- Basic: Both the default acceleration region and the default service region are in the Chinese mainland. The accelerated service is deployed on Alibaba Cloud.
- Enhanced: Both the default acceleration region and the default service region are in the Chinese mainland. The accelerated service can be deployed on and off Alibaba Cloud.
- Premium: Both the default acceleration region and the default service region are outside the Chinese mainland. The accelerated service can be deployed on and off Alibaba Cloud. If you want to accelerate data transfer for clients in the Chinese mainland, you must select China (Hong Kong) as the acceleration region.
When you call this operation, take note of the following items:
- CreateBandwidthPackage is an asynchronous operation. After you send a request, the system returns the ID of a bandwidth plan, but the bandwidth plan is still being created in the system background. You can call the DescribeBandwidthPackage operation to query the status of the bandwidth plan.
- If the bandwidth plan is in the init state, it indicates that the bandwidth plan is being created. In this case, you can perform only query operations.
- If the bandwidth plan is in the active state, it indicates that the bandwidth plan is created.
- The CreateBandwidthPackage operation cannot be repeatedly called for the same GA instance within a specific period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateBandwidthPackage | The operation that you want to perform. Set the value to CreateBandwidthPackage. |
RegionId | String | Yes | cn-hangzhou | The ID of the region where the GA instance is deployed. cn-hangzhou is returned. |
Bandwidth | Integer | Yes | 2 | The bandwidth of the bandwidth plan. Unit: Mbit/s. Valid values: 2 to 2000. |
Duration | String | No | 1 | The subscription duration.
If ChargeType is set to PREPAY, this parameter is required. |
PricingCycle | String | No | Month | The billing cycle. Valid values:
If ChargeType is set to PREPAY, this parameter is required. |
AutoPay | Boolean | No | false | Specifies whether to enable automatic payment. Valid values:
|
ClientToken | String | No | 123e4567**** | 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 ensure that it is unique among all requests. The ClientToken value contain only ASCII characters. Note If you do not set this parameter, the system sets ClientToken to the value of RequestId. The value of RequestId of each API request may be different. |
Type | String | Yes | Basic | The type of the bandwidth plan. Valid values:
If you call this operation on the Alibaba Cloud China site, only Basic is supported. |
BandwidthType | String | No | Basic | The type of the bandwidth. Valid values:
If Type is set to Basic, this parameter is required. |
AutoUseCoupon | String | No | false | Specifies whether to automatically pay bills by using coupons. Valid values:
Note This parameter is required only if AutoPay is set to true. |
Ratio | Integer | No | 30 | The percentage of the minimum bandwidth guaranteed if the pay-by-95th-percentile-bandwidth metering method is used. Valid values: 30 to 100. Note This parameter is required only if BillingType is set to PayBY95. |
BillingType | String | No | PayByTraffic | The metering method that is used when you use the pay-as-you-go billing method. Valid values:
|
ChargeType | String | No | PREPAY | The billing method. Valid values:
|
CbnGeographicRegionIdA | String | No | China-mainland | Area A to be connected. Set the value to China-mainland. You can set this parameter only if you call this operation on the international site (alibabacloud.com). |
CbnGeographicRegionIdB | String | No | Global | Area B to be connected. Set the value to Global. You can set this parameter only if you call this operation on the international site (alibabacloud.com). |
PromotionOptionNo | String | No | 50003298014**** | The coupon code. Note This parameter is only available on the international site (alibabacloud.com). |
AutoRenew | Boolean | No | false | Specifies whether to enable auto-renewal for the bandwidth plan. Valid values:
|
AutoRenewDuration | Integer | No | 1 | The auto-renewal duration. Unit: months. Valid values: 1 to 12. Default value: 1. Note This parameter is required only if AutoRenew is set to true. |
ResourceGroupId | String | No | rg-aekzrnd67gq**** | The ID of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 4B6DBBB0-2D01-4C6A-A384-4129266E6B78 | The ID of the request. |
BandwidthPackageId | String | gbwp-bp1sgzldyj6b4q7cx**** | The ID of the bandwidth plan. |
OrderId | String | 208257**** | The ID of the order. If bills are not automatically paid, you must go to the Order Center to complete the payments. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateBandwidthPackage
&RegionId=cn-hangzhou
&Bandwidth=2
&Duration=1
&PricingCycle=Month
&AutoPay=false
&ClientToken=123e4567****
&Type=Basic
&BandwidthType=Basic
&AutoUseCoupon=false
&Ratio=30
&BillingType=PayByTraffic
&ChargeType=PREPAY
&CbnGeographicRegionIdA=China-mainland
&CbnGeographicRegionIdB=Global
&PromotionOptionNo=50003298014****
&AutoRenew=false
&AutoRenewDuration=1
&ResourceGroupId=rg-aekzrnd67gq****
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateBandwidthPackageResponse>
<RequestId>4B6DBBB0-2D01-4C6A-A384-4129266E6B78</RequestId>
<BandwidthPackageId>gbwp-bp1sgzldyj6b4q7cx****</BandwidthPackageId>
<OrderId>208257****</OrderId>
</CreateBandwidthPackageResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "4B6DBBB0-2D01-4C6A-A384-4129266E6B78",
"BandwidthPackageId" : "gbwp-bp1sgzldyj6b4q7cx****",
"OrderId" : "208257****"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter.BandwidthType | You must specify BandwidthType. | The error message returned because BandwidthType is not set. |
500 | UnknownError | An error occurred while processing your request. Please try again. If the error persists, please submit a ticket. | The error message returned because an error occurred while the request was being processed. Try again later. |
For a list of error codes, see Service error codes.