All Products
Search
Document Center

Virtual Private Cloud:CreateCommonBandwidthPackage

Last Updated:Dec 06, 2023

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.

debugging

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the Internet Shared Bandwidth instance.

You can call the DescribeRegions operation to query the region ID.

cn-hangzhou
ZonestringNo

The zone of the Internet Shared Bandwidth instance. This parameter must be specified when you create an Internet Shared Bandwidth instance for a cloud box.

cn-hangzhou-a
ISPstringNo

The line type. Valid values:

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

If you are allowed to use single-ISP bandwidth, you can also choose 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 2 to 128 characters in length and start with a letter, and can contain letters, digits, underscores (_), and hyphens (-).

test123
DescriptionstringNo

The description of the Internet Shared Bandwidth instance.

The description must be 2 to 256 characters in length. The description must start with a letter but 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 a 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 value of RequestId as the client token. The value of RequestId is different for each API 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 supported only on the Alibaba Cloud China site.
20
InternetChargeTypestringNo

The billing method of the Internet Shared Bandwidth instance. Valid values: PayByTraffic: pay-by-data-transfer

SecurityProtectionTypesarrayNo

The editions of Anti-DDoS.

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

You can specify up to 10 editions of Anti-DDoS.

stringNo

The edition of Anti-DDoS.

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

A variable of N is used to limit the number of Anti-DDoS editions that you can specify. Valid values of N: 1 to 10. Currently, you can specify only one Anti-DDoS edition. If you specify more than one edition, you may fail to call the operation.

AntiDDoS_Enhanced

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

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.
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
2023-11-06API Description Update,The error codes of the API operation change.see changesets
Change itemChange content
API DescriptionAPI Description Update
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 404
2023-06-26The error codes of the API operation change.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 404