Creates a bandwidth plan.
Operation 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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ga:CreateBandwidthPackage | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where the GA instance is deployed. cn-hangzhou is returned. | cn-hangzhou |
Bandwidth | integer | Yes | The bandwidth of the bandwidth plan. Unit: Mbit/s. Valid values: 2 to 2000. | 2 |
Duration | string | No | The subscription duration.
If ChargeType is set to PREPAY, this parameter is required. | 1 |
PricingCycle | string | No | The billing cycle. Valid values:
If ChargeType is set to PREPAY, this parameter is required. | 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 token, but you must 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 request ID as the client token. The request ID may be different for each request.
| 123e4567**** |
Type | string | Yes | The type of the bandwidth plan. Valid values:
If you call this operation on the Alibaba Cloud China site, only Basic is supported. | Basic |
BandwidthType | string | No | The type of the bandwidth. Valid values:
If Type is set to Basic, this parameter is required. | Basic |
AutoUseCoupon | string | No | Specifies whether to automatically pay bills by using coupons. Valid values:
Note
This parameter is required only if AutoPay is set to true.
| false |
Ratio | integer | No | 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.
| 30 |
BillingType | string | No | The metering method that is used when you use the pay-as-you-go billing method. Valid values:
Note
This parameter takes effect only if you set ChargeType to POSTPAY.
| PayByTraffic |
ChargeType | string | No | The billing method of the bandwidth plan. Valid values:
| PREPAY |
CbnGeographicRegionIdA | string | No | 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). | China-mainland |
CbnGeographicRegionIdB | string | No | 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). | Global |
PromotionOptionNo | string | No | The coupon code. Note
This parameter is only available on the international site (alibabacloud.com).
| 50003298014**** |
AutoRenew | boolean | No | Specifies whether to enable auto-renewal for the bandwidth plan. Valid values:
| false |
AutoRenewDuration | integer | No | 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.
| 1 |
ResourceGroupId | string | No | The ID of the resource group. | rg-aekzrnd67gq**** |
Tag | array<object> | No | The tags to add to the bandwidth plan. | |
object | No | The tags to add to the bandwidth plan. | ||
Key | string | No | The tag key. The tag keys cannot be an empty string. The tag key can be up to 64 characters in length, and cannot start with You can specify at most 20 tag keys. | tag-key |
Value | string | No | The tag value. Each tag key corresponds to a tag value. Valid values of N: 1 to 20. The value cannot exceed 128 characters in length, and cannot start with | tag-value |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-04-20 | The Error code has changed | View Change Details |
2023-03-31 | The Error code has changed. The request parameters of the API has changed | View Change Details |