All Products
Search
Document Center

Global Accelerator:CreateBandwidthPackage

Last Updated:Dec 22, 2025

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ga:CreateBandwidthPackage

create

*BandwidthPackage

acs:ga:{#regionId}:{#accountId}:bandwidthpackage/*

  • ga:BandwidthPackageType
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.

  • If you set PricingCycle to Month, valid values for Duration are 1 to 9.

  • If you set PricingCycle to Year, valid values for Duration are 1 to 3.

This parameter is required if you set ChargeType to PREPAY.

1

PricingCycle

string

No

The billing cycle. Valid values:

  • Month: monthly billing.

  • Year: yearly billing.

This parameter is required if you set ChargeType to PREPAY.

Month

AutoPay

boolean

No

Specifies whether to enable automatic payment. Valid values:

  • false (default): Disables automatic payment. After an order is generated, go to the Order Hub to complete the payment.

  • true: Enables automatic payment. Payments are automatically completed.

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:

  • Basic: a basic bandwidth plan.

  • CrossDomain: a cross-region acceleration bandwidth plan.

Only Basic is supported on the Alibaba Cloud China Website (www.aliyun.com).

Basic

BandwidthType

string

No

The type of bandwidth. Valid values:

  • Basic: Basic bandwidth.

  • Enhanced: Enhanced bandwidth.

  • Advanced: Advanced bandwidth.

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:

  • true: Yes.

  • false (default): No.

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:

  • PayByTraffic (default): pay-by-traffic.

  • PayBY95: pay-by-95th-percentile. This billing method is not available by default. Contact your account manager to use this billing method.

Note

This parameter takes effect only if ChargeType is set to POSTPAY.

PayByTraffic

ChargeType

string

No

The billing method. Valid values:

  • PREPAY (default): subscription.

  • POSTPAY: pay-as-you-go. The pay-as-you-go billing method is not available by default. Contact your account manager to use this billing method.

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:

  • true: Yes.

  • false (default): No.

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 aliyun or acs:. It cannot contain http:// or https://.

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 aliyun or acs:. It cannot contain http:// or https://.

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.