All Products
Search
Document Center

Global Accelerator:CreateBandwidthPackage

Last Updated:Jul 31, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ga:CreateBandwidthPackagecreate
  • BandwidthPackage
    acs:ga:{#regionId}:{#accountId}:bandwidthpackage/*
  • ga:BandwidthPackageType
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the GA instance is deployed. cn-hangzhou is returned.

cn-hangzhou
BandwidthintegerYes

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

Valid values: 2 to 2000.

2
DurationstringNo

The subscription duration.

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

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

1
PricingCyclestringNo

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.

Month
AutoPaybooleanNo

Specifies whether to enable automatic payment. Valid values:

  • false (default): 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 completed.
false
ClientTokenstringNo

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****
TypestringYes

The type of the bandwidth plan. Valid values:

  • Basic: a basic bandwidth plan
  • CrossDomain: a cross-region acceleration bandwidth plan

If you call this operation on the Alibaba Cloud China site, only Basic is supported.

Basic
BandwidthTypestringNo

The type of the bandwidth. Valid values:

  • Basic: standard bandwidth
  • Enhanced: enhanced bandwidth
  • Advanced: premium bandwidth

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

Basic
AutoUseCouponstringNo

Specifies whether to automatically pay bills by using coupons. Valid values:

  • true: yes
  • false (default): no
Note This parameter is required only if AutoPay is set to true.
false
RatiointegerNo

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
BillingTypestringNo

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

  • PayByTraffic (default)
  • PayBY95 By default, the pay-by-95th-percentile metering method is unavailable. If you want to use the metering method, contact your account manager.
Note This parameter takes effect only if you set ChargeType to POSTPAY.
PayByTraffic
ChargeTypestringNo

The billing method of the bandwidth plan. Valid values:

  • PREPAY (default): subscription.
  • POSTPAY: pay-as-you-go. By default, the pay-as-you-go billing method is unavailable. If you want to use the billing method, contact your account manager.
PREPAY
CbnGeographicRegionIdAstringNo

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
CbnGeographicRegionIdBstringNo

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
PromotionOptionNostringNo

The coupon code.

Note This parameter is only available on the international site (alibabacloud.com).
50003298014****
AutoRenewbooleanNo

Specifies whether to enable auto-renewal for the bandwidth plan. Valid values:

  • true: enables auto-renewal.
  • false (default): does not enable auto-renewal.
false
AutoRenewDurationintegerNo

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
ResourceGroupIdstringNo

The ID of the resource group.

rg-aekzrnd67gq****
Tagarray<object>No

The tags to add to the bandwidth plan.

objectNo

The tags to add to the bandwidth plan.

KeystringNo

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

You can specify at most 20 tag keys.

tag-key
ValuestringNo

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

tag-value

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

4B6DBBB0-2D01-4C6A-A384-4129266E6B78
BandwidthPackageIdstring

The ID of the bandwidth plan.

gbwp-bp1sgzldyj6b4q7cx****
OrderIdstring

The order ID.

If bills are not automatically paid, you must go to the Order Center to complete the payments.

This parameter is returned only if ChargeType is set to PREPAY. If AutoPay is set to false, you must go to the Order Center to complete the payment.

208257****

Examples

Sample success responses

JSONformat

{
  "RequestId": "4B6DBBB0-2D01-4C6A-A384-4129266E6B78",
  "BandwidthPackageId": "gbwp-bp1sgzldyj6b4q7cx****",
  "OrderId": "208257****"
}

Error codes

HTTP status codeError codeError messageDescription
400COMMODITY.INVALID_COMPONENTThe bandwidth parameter is incorrect or out of range-
400MissingParameter.BandwidthTypeYou must specify BandwidthType.You must specify BandwidthType.
500UnknownErrorAn 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 timeSummary of changesOperation
2023-04-20The Error code has changedView Change Details
2023-03-31The Error code has changed. The request parameters of the API has changedView Change Details