Creates a bandwidth plan.

Usage notes

You must specify the areas to be connected when you create a bandwidth plan. An area is a collection of Alibaba Cloud regions. 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.

For more information about the billing rules, see Billing.

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 CreateCenBandwidthPackage

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

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 make sure 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 and cannot start with http:// or https://.

Description String No namedesc

The description of the bandwidth plan.

Bandwidth Integer Yes 2

The maximum bandwidth value of the bandwidth plan. Unit: Mbit/s. Valid values: 2 to 10000.

GeographicRegionAId String Yes China

The geographic region where the network instance is deployed. Valid values:

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

The area where the other network instance is deployed. Valid values: Valid values:

  • China: Chinese mainland
  • North-America: North America
  • Asia-Pacific: Asia Pacific
  • Europe: Europe
  • Australia: Australia
BandwidthPackageChargeType String No POSTPAY

The billing method of the bandwidth plan. Valid values:

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 yearly basis.
AutoPay Boolean No true

Specifies whether to automatically complete the payment of the bandwidth plan. Valid values:

  • true: yes
  • false (default): no

If you set the parameter to false, go to Billing Management to complete the payment after you call this operation. After you complete the payment, the instance can be created.

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

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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.