All Products
Search
Document Center

Virtual Private Cloud:CreateCommonBandwidthPackage

Last Updated:Nov 13, 2024

Creates an Internet Shared Bandwidth instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
vpc:CreateCommonBandwidthPackagecreate
  • CommonBandwidthPackage
    acs:vpc:{#regionId}:{#accountId}:combandwidthpackage/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the Internet Shared Bandwidth instance.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ZonestringNo

The zone of the Internet Shared Bandwidth instance. This parameter is required if you create an Internet Shared Bandwidth instance for a cloud box.

ap-southeast-1-lzdvn-cb
ISPstringNo

The line type. Valid values:

  • BGP (default) All regions support BGP (Multi-ISP).
  • BGP_PRO BGP (Multi-ISP) Pro lines are available in the China (Hong Kong), Singapore, Japan (Tokyo), Philippines (Manila), Malaysia (Kuala Lumpur), Indonesia (Jakarta), and Thailand (Bangkok) regions.

If you are allowed to use single-ISP bandwidth, you can also use one of the following values:

  • ChinaTelecom
  • ChinaUnicom
  • ChinaMobile
  • ChinaTelecom_L2
  • ChinaUnicom_L2
  • ChinaMobile_L2

If your services are deployed in China East 1 Finance, this parameter is required and you must set the value to BGP_FinanceCloud.

BGP
NamestringNo

The name of the Internet Shared Bandwidth instance.

The name must be 0 to 128 characters in length and cannot start with http:// or https://.

test123
DescriptionstringNo

The description of the Internet Shared Bandwidth instance.

The description must be 0 to 256 characters in length and cannot start with http:// or https://.

abc
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 client token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
02fb3da4-130e-11e9-8e44-001****
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmxazdjdhd****
BandwidthintegerYes

The maximum bandwidth of the Internet Shared Bandwidth instance. Unit: Mbit/s.

Valid values: 1 to 1000. Default value: 1.

1000
RatiointegerNo

The percentage of the minimum bandwidth commitment. Set the parameter to 20.

Note This parameter is available only on the Alibaba Cloud China site.
20
InternetChargeTypestringNo

The billing method of the Internet Shared Bandwidth instance. Set the value to PayByTraffic, which specifies the pay-by-data-transfer billing method.

SecurityProtectionTypesarrayNo
stringNo

The edition of Anti-DDoS.

  • If you do not set this parameter, Anti-DDoS Origin Basic is used.
  • If you set the value to AntiDDoS_Enhanced, Anti-DDoS Pro/Premium is used.

Valid values of N: 1 to 10. You can specify only one Anti-DDoS edition. If you specify more than one edition, the operation may fail.

AntiDDoS_Enhanced

Response parameters

ParameterTypeDescriptionExample
object
BandwidthPackageIdstring

The ID of the Internet Shared Bandwidth instance.

cbwp-bp1vevu8h3ieh****
RequestIdstring

The request ID.

FF39F653-033E-4CD9-9EDF-3CCA5A71FBC3
ResourceGroupIdstring

The ID of the resource group.

rg-acfmxazdjdhd****

Examples

Sample success responses

JSONformat

{
  "BandwidthPackageId": "cbwp-bp1vevu8h3ieh****",
  "RequestId": "FF39F653-033E-4CD9-9EDF-3CCA5A71FBC3",
  "ResourceGroupId": "rg-acfmxazdjdhd****"
}

Error codes

HTTP status codeError codeError messageDescription
400ResourceNotEnough.BandwidthThe specified resource of Bandwidth is not enough.The specified resource of Bandwidth is insufficient.
400MissingParameterMiss mandatory parameter.Some required parameters are not specified. Specify all required parameters and try again.
400InvalidParameter.Name.MalformedThe specified Name is not valid.The specified name format is invalid. Enter the name in the valid format.
400InvalidParameter.Description.MalformedThe specified Description is not valid.The specified description is invalid.
400BandwidthPackageOperation.conflictBandwidthPackage operation conflict, please wait a moment and try again.-
400InvalidParameter.BandwidthThe specified bandwidth is not valid.-
400BandwidthPackage.QuotaExceededCreate BandwidthPackage has exceeded quota.-
400IllegalParam.ZoneZone is illegal.-
400InvalidParameter.InvalidChargeTypeThe specified chargeType is not valid.-
400InvalidResourceGroupIdThe specified ResourceGroupId does not exist.The specified resource group ID does not exist.
400OperationFailed.SaleValidateValidate sale condition with subArticle failed.Failed to validate the sales condition with a subproject.
400OperationFailed.SyncOrderToSubSyncOrderToSub error.The operation failed.
400IllegalParam.RatioThe specified ratio is not valid.-
400OperationUnsupported.InvalidZoneIt is not allowed to create CBWP in the specified zone.-
400IllegalParam.AvailableZone%s-
400MissingParam.NameOrDescription%s-
400OperationFailed.SystemBusyOperation failed because system is busy.The error message returned because the system is busy. Try again later.
400UnsupportedRegion.CloudBoxInternetThe region does not support cloud box public network.The region does not support cloud box public network.
400ResourceNotEnough.CommonBandWidthPackageThe specified resource commonBandWidthPackage is not enough.The specified resource commonBandWidthPackage is not enough.
404InvalidRegionId.NotFoundThe specified RegionId does not exist in our records.The specified region ID does not exist.
404InvalidVpcId.NotFoundSpecified value of VpcId is not found in our record.The VPC does not exist. Check whether the specified VPC is valid.
404InvalidZoneId.NotFoundSpecified value of ZoneId is not exists.The specified zone does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-02-23The Error code has changedView Change Details
2023-11-06API Description Update. The Error code has changedView Change Details
2023-06-26The Error code has changedView Change Details