Creates a bandwidth plan.

Notes

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 default service region are in mainland China. The accelerated service is deployed on Alibaba Cloud.
  • Enhanced: Both the default acceleration region and default service region are in mainland China. The accelerated service can be deployed on and off Alibaba Cloud.
  • Premium: Both the default acceleration region and default service region are in mainland China. The accelerated service can be deployed on and off Alibaba Cloud. If you want to accelerate access from clients in mainland China, you must select China (Hong Kong) as the acceleration region.

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 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. Set the value to cn-hangzhou.

Bandwidth Integer Yes 2

The bandwidth value of the bandwidth plan. Unit: Mbit/s.

Duration String No 1

The subscription duration.

  • If the PricingCycle parameter is set to Month, valid values for the Duration parameter are 1 to 9.
  • If the PricingCycle parameter is set to Year, valid values for the Duration parameter are 1 to 3.

If ChargeType is set to PREPAY, this parameter is required.

PricingCycle String No Month

The billing cycle. Valid values:

  • Month: billed on a monthly basis.
  • Year: billed on an annual basis.

If ChargeType is set to PREPAY, this parameter is required.

AutoPay Boolean No false

Specifies whether to enable automatic payment. Valid values:

  • false: disables automatic payment. If you select this option, you must go to the Order Center to complete the payment after an order is generated.
  • true: enables automatic payment. Payments are automatically made.
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 make sure that it is unique among different requests. ClientToken can contain only ASCII characters and cannot exceed 64 characters in length.

Type String Yes Basic

The type of the bandwidth plan. Valid values:

  • Basic: a basic bandwidth plan
  • CrossDomain: a bandwidth plan for cross-border acceleration

If you call this operation on Alibaba Cloud China Site, only Basic is returned.

BandwidthType String No Basic

The type of the bandwidth. Valid values:

  • Basic: basic
  • Enhanced: enhanced
  • Advanced: premium

If Type is set to Basic, this parameter is required.

AutoUseCoupon String No true

Specifies whether to use coupons for automatic payment. Valid values:

  • true: yes
  • false (default): no
    Note This parameter is required only when AutoPay is set to true.
Ratio Integer No 30

The minimum percentage for the pay-by-95th-percentile metering method. Valid values: 30 to 100.

BillingType String No PayByTraffic

The metering method that is used when you use the pay-as-you-go billing method. Valid values:

  • PayByTraffic (default): pay-by-data-transfer
  • PayBY95: pay-by-95th-percentile
ChargeType String No PREPAY

The billing method. Valid values:

  • PREPAY (default): subscription
  • POSTPAY: pay-as-you-go
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 Alibaba Cloud International Site.

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 Alibaba Cloud International Site.

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, 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=true
&Ratio=30
&BillingType=PayByTraffic
&ChargeType=PREPAY
&CbnGeographicRegionIdA=China-mainland
&CbnGeographicRegionIdB=Global
&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.

For a list of error codes, visit the API Error Center.