Creates a bandwidth plan.
Operation description
- 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 a bandwidth plan instance ID and runs the task in the background. You can call the DescribeCenBandwidthPackages operation 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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cen:CreateCenBandwidthPackage | create | *CenBandwidthPackage acs:cen:*:{#accountId}:cenbandwidthpackage/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClientToken | string | No | 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 and cannot exceed 64 characters in length. | 02fb3da4-130e-11e9-8e44-001**** |
Name | string | No | 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 | nametest |
Description | string | No | The description of the bandwidth plan. | namedesc |
Bandwidth | integer | Yes | The maximum bandwidth value of the bandwidth plan. Unit: Mbit/s. Valid values: 2 to 10000. | 2 |
GeographicRegionAId | string | Yes | The area where the network instance is deployed. Valid values:
| China |
GeographicRegionBId | string | Yes | The area where the other network instance is deployed. Valid values: Valid values:
| China |
BandwidthPackageChargeType | string | No | The billing method of the bandwidth plan. Set the value to PREPAY, which indicates that the billing method is pay-as-you-go. | PREPAY |
Period | integer | No | The subscription duration of the bandwidth plan. Default value: 1.
Note
This parameter is required when BandwidthPackageChargeType is set to PREPAY.
| 1 |
PricingCycle | string | No | The billing cycle of the bandwidth plan. Valid values:
| Month |
AutoPay | boolean | No | 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. | false |
Tag | array<object> | No | The information about the tags. You can specify at most 20 tags in each call. | |
object | No | |||
Key | string | No | 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 You can specify at most 20 tag keys. | tagtest |
Value | string | No | The tag value. The tag value can be 0 to 128 characters in length, and cannot start with Each tag key must have a unique tag value. You can specify at most 20 tag values in each call. | tagtest |
Response parameters
Examples
Sample success responses
JSON
format
{
"CenBandwidthPackageId": "cenbwp-4c2zaavbvh5fx****",
"CenBandwidthPackageOrderId": "20156420004****",
"RequestId": "E4B345CD-2CBA-4881-AF6D-E5D9BAE1CA7B"
}
Error codes
HTTP status code | 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. |
400 | ParameterIllegal.BandwidthPackage | The parameter of bandwidth packaged is illegal. | The error message returned because the specified bandwidth plan (BandwidthPackage) is invalid. |
400 | OperationInvalid.UserCanNotBuyCrossBorderBwp | According to the laws and regulations of the operator and mainland China, you are currently not eligible to purchase or renew a cross-border bandwidth package. Please contact online customer service or your business manager for consultation. | According to the laws and regulations of the operator and mainland China, you are currently not eligible to purchase or renew a cross-border bandwidth package. Please contact online customer service or your business manager for consultation. |
400 | OperationInvalid.UserCanNotBuyBwp | The user can not buy Cen bandwidthPackage. | - |
400 | Order.AccountStatusIllegal | Illegal account status for postpay service not opened for this account. | Illegal account status for postpay service not opened for this account. |
400 | InvalidParameter | Invalid parameter. | The error message returned because the parameter is set to an invalid value. |
400 | Unauthorized | The AccessKeyId is unauthorized. | The error message returned because you do not have the permissions to perform this operation. |
500 | PayFor.AccountMoneyValidateError | Your channel merchant quota is insufficient. Please contact the channel merchant. | Your channel partner does not have sufficient quotas. Contact your channel partner. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-22 | API Description Update. The Error code has changed | View Change Details |
2024-07-26 | The Error code has changed | View Change Details |
2024-05-17 | The Error code has changed | View Change Details |
2023-12-13 | The Error code has changed | View Change Details |
2023-07-13 | The Error code has changed | View Change Details |