All Products
Search
Document Center

Cloud Enterprise Network:CreateCenBandwidthPackage

Last Updated:Jan 19, 2024

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

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

Debug

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
cen:CreateCenBandwidthPackageWRITE
  • CenBandwidthPackage
    acs:cen:*:{#accountId}:cenbandwidthpackage/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
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 and cannot exceed 64 characters in length.

02fb3da4-130e-11e9-8e44-001****
NamestringNo

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://.

nametest
DescriptionstringNo

The description of the bandwidth plan.

namedesc
BandwidthintegerYes

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

2
GeographicRegionAIdstringYes

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

  • China: Chinese mainland
  • North-America: North America
  • Asia-Pacific: Asia Pacific
  • Europe: Europe
  • Australia: Australia
China
GeographicRegionBIdstringYes

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
China
BandwidthPackageChargeTypestringNo

The billing method of the bandwidth plan. Set the value to PREPAY, which indicates that the billing method is pay-as-you-go.

PREPAY
PeriodintegerNo

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.
1
PricingCyclestringNo

The billing cycle of the bandwidth plan. Valid values:

  • Month (default): billed on a monthly basis.
  • Year: billed on an annual basis.
Month
AutoPaybooleanNo

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. The instance is created only after you complete the payment.

false
Tagobject []No

The information about the tags.

You can specify at most 20 tags in each call.

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.

tagtest
ValuestringNo

The tag value.

The tag value can be 0 to 128 characters in length, and cannot start with aliyun or acs:. It cannot contain http:// or https://.

Each tag key must have a unique tag value. You can specify at most 20 tag values in each call.

tagtest

Response parameters

ParameterTypeDescriptionExample
object

The response.

CenBandwidthPackageIdstring

The ID of the bandwidth plan.

cenbwp-4c2zaavbvh5fx****
CenBandwidthPackageOrderIdstring

The ID of the order for the bandwidth plan.

20156420004****
RequestIdstring

The ID of the request.

E4B345CD-2CBA-4881-AF6D-E5D9BAE1CA7B

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400UnSupported.ChargeTypeThe charge type is not supported.The error message returned because the specified billing method is not supported.
400ParameterIllegal.BandwidthPackageThe parameter of bandwidth packaged is illegal.The error message returned because the specified bandwidth plan (BandwidthPackage) is invalid.
400InvalidParameterInvalid parameter.The error message returned because the parameter is set to an invalid value.
400UnauthorizedThe AccessKeyId is unauthorized.The error message returned because you do not have the permissions to perform this operation.
500PayFor.AccountMoneyValidateErrorYour 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 timeSummary of changesOperation
2023-12-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 500
2023-07-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    Added Error Codes: 500