Creates a bandwidth plan.
Usage notes
- You must specify the areas to be connected when you create a bandwidth plan. An area contains one or more 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.
- CreateCenBandwidthPackage is an asynchronous operation. After you send a request, the system returns the bandwidth plan ID but the operation is still being performed in the system background. You can call DescribeCenBandwidthPackages to query the status of a bandwidth plan. If a bandwidth plan is in the Idle or InUse state, the bandwidth plan is created.
Debugging
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 |
| 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 area where the network instance is deployed. Valid values:
|
| GeographicRegionBId | String | Yes | China |
The area where the other network instance is deployed. Valid values: Valid values:
|
| BandwidthPackageChargeType | String | No | PREPAY |
The billing method of the bandwidth plan. Valid value: PREPAY, which indicates that the billing method is pay-as-you-go. |
| Period | Integer | No | 1 |
The subscription duration of the bandwidth plan. Default value: 1.
Note This parameter is required when BandwidthPackageChargeType is set to PREPAY.
|
| PricingCycle | String | No | Month |
The billing cycle of the bandwidth plan. Valid values:
|
| AutoPay | Boolean | No | false |
Specifies whether to automatically complete the payment of the bandwidth plan. Valid values:
If you set the parameter to false, go to Billing Management to complete the payment after you call this operation. The instance is created only after you complete the payment. |
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
&ClientToken=02fb3da4-130e-11e9-8e44-001****
&Name=nametest
&Description=namedesc
&Bandwidth=2
&GeographicRegionAId=China
&GeographicRegionBId=China
&BandwidthPackageChargeType=PREPAY
&Period=1
&PricingCycle=Month
&AutoPay=false
&AutoRenew=false
&Common request parametersSample 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.