Creates a bandwidth plan.

Descriptions

You must specify the areas to be connected when you create a bandwidth plan. An area is a collection of regions of Alibaba Cloud. When you select areas for a bandwidth plan, make sure that the areas contain the regions that you want to connect. For more information about the supported areas and regions, see Purchase a bandwidth plan.

You can choose the pay-as-you-go or subscription billing method when you create a bandwidth plan. For more information, see Pricing.

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 No CreateCenBandwidthPackage

The operation that you want to perform. Set the value to CreateCenBandwidthPackage.

Bandwidth Integer Yes 2

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

Valid values: 2 to 10000.

GeographicRegionAId String Yes China

Area A to which the network instance belongs. Valid values:

  • China: Mainland China
  • North-America: North America
  • Asia-Pacific: Asia Pacific
  • Europe: Europe
  • Australia: Australia
GeographicRegionBId String Yes China

Area B to which the other network instance belongs. Valid values:

  • China: Mainland China
  • North-America: North America
  • Asia-Pacific: Asia Pacific
  • Europe: Europe
  • Australia: Australia
ClientToken String No 02fb3da4-130e-11e9-8e44-001****

The client token that is used to ensure the idempotence of the request.

You can use the client to generate a token, but you must ensure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Name String No nametest

The name of the bandwidth plan.

The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter or Chinese character but cannot start with http:// or https://.

Description String No namedesc

The description of the bandwidth plan.

BandwidthPackageChargeType String No POSTPAY

The billing method of the bandwidth plan. Valid values:

  • POSTPAY: pay-as-you-go. This is the default value.
  • PREPAY: subscription.
Period Integer No 1

The subscription duration of the bandwidth plan. Default value: 1.

  • If PricingCycle is set to Month, set Period to a value from 1 to 3 or 6.
  • If PricingCycle is set to Year, set Period to a value from 1 to 3.
Note This parameter is required when BandwidthPackageChargeType is set to PREPAY.
PricingCycle String No Month

The billing cycle of the bandwidth plan. Valid values:

  • Month (default): billed on a monthly basis.
  • Year: billed on an annual basis.
AutoPay Boolean No true

Specifies whether to enable auto payment. Valid values:

  • true: enables auto payment.
  • false: disables auto payment.

If you disable auto payment, you must log on to the console, navigate to the Orders page, and complete the payment before the system can create the bandwidth plan.

Response parameters

Parameter Type Example Description
CenBandwidthPackageId String cenbwp-4c2zaavbvh5fx****

The ID of the bandwidth plan.

CenBandwidthPackageOrderId String 20156420004****

The ID of the order for the bandwidth plan.

RequestId String E4B345CD-2CBA-4881-AF6D-E5D9BAE1CA7B

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateCenBandwidthPackage
&Bandwidth=2
&GeographicRegionAId=China 
&GeographicRegionBId=China 
&<Common request parameters>

Sample success responses

XML format

<CreateCenBandwidthPackageResponse>
      <RequestId>E4B345CD-2CBA-4881-AF6D-E5D9BAE1CA7B</RequestId>
      <CenBandwidthPackageOrderId>20156420004****</CenBandwidthPackageOrderId>
      <CenBandwidthPackageId> cenbwp-4c2zaavbvh5fx****</CenBandwidthPackageId>
</CreateCenBandwidthPackageResponse>

JSON format

{
    "RequestId": "E4B345CD-2CBA-4881-AF6D-E5D9BAE1CA7B",
    "CenBandwidthPackageOrderId": "20156420004****",
    "CenBandwidthPackageId": "cenbwp-4c2zaavbvh5fx****"
}

Error codes

HttpCode Error code Error message Description
400 UnSupported.ChargeType The charge type is not supported. The error message returned because the specified billing method is not supported.

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