Creates an Internet Shared Bandwidth instance.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | CreateCommonBandwidthPackage | The operation that you want to perform. Set the value to CreateCommonBandwidthPackage. |
RegionId | String | Yes | cn-hangzhou | The region ID of the Internet Shared Bandwidth instance. You can call the DescribeRegions operation to query the most recent region list. |
Zone | String | No | ap-southeast-1-lzdvn-cb | The zone of the Internet Shared Bandwidth instance. This parameter is required if you create an Internet Shared Bandwidth instance for a cloud box. |
ISP | String | No | BGP | The line type. Valid values:
If you are allowed to use single-ISP bandwidth, you can also use one of the following values:
If your services are deployed in China East 1 Finance, this parameter is required and you must set the value to BGP_FinanceCloud. |
Name | String | No | test123 | The name of the Internet Shared Bandwidth instance. 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. |
Description | String | No | abc | The description of the Internet Shared Bandwidth instance. The description must be 2 to 256 characters in length and start with a letter. The description cannot start with |
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 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. |
ResourceGroupId | String | No | rg-acfmxazdjdhd**** | The ID of the resource group. |
Bandwidth | Integer | Yes | 1000 | The maximum bandwidth of the Internet Shared Bandwidth instance. Unit: Mbit/s. Valid values: 1 to 1000. Default value: 1. |
Ratio | Integer | No | 20 | The percentage of the minimum bandwidth commitment. Set the parameter to 20. Note
This parameter is available only on the Alibaba Cloud China site. |
InternetChargeType | String | No | Alibaba Cloud China site: PayByBandwidth. Alibaba Cloud International site: PayByTraffic | The billing method of the Internet Shared Bandwidth instance. Set the value to PayByTraffic, which specifies the pay-by-data-transfer billing method. |
SecurityProtectionTypes.N | String | No | AntiDDoS_Enhanced | The edition of Anti-DDoS.
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. |
Response parameters
Parameter |
Type |
Example |
Description |
BandwidthPackageId | String | cbwp-bp1vevu8h3ieh**** | The ID of the Internet Shared Bandwidth instance. |
RequestId | String | FF39F653-033E-4CD9-9EDF-3CCA5A71FBC3 | The request ID. |
ResourceGroupId | String | rg-acfmxazdjdhd**** | The ID of the resource group. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateCommonBandwidthPackage
&RegionId=cn-hangzhou
&Zone=ap-southeast-1-lzdvn-cb
&ISP=BGP
&Name=test123
&Description=abc
&ClientToken=02fb3da4-130e-11e9-8e44-001****
&ResourceGroupId=rg-acfmxazdjdhd****
&Bandwidth=1000
&Ratio=20
&InternetChargeType = PayByBandwidth (Alibaba Cloud China site) or PayByTraffic (Alibaba Cloud International site)
&SecurityProtectionTypes=["AntiDDoS_Enhanced"]
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateCommonBandwidthPackageResponse>
<BandwidthPackageId>cbwp-bp1vevu8h3ieh****</BandwidthPackageId>
<RequestId>FF39F653-033E-4CD9-9EDF-3CCA5A71FBC3</RequestId>
<ResourceGroupId>rg-acfmxazdjdhd****</ResourceGroupId>
</CreateCommonBandwidthPackageResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"BandwidthPackageId" : "cbwp-bp1vevu8h3ieh****",
"RequestId" : "FF39F653-033E-4CD9-9EDF-3CCA5A71FBC3",
"ResourceGroupId" : "rg-acfmxazdjdhd****"
}
Error codes
HttpCode |
Error code |
Error message |
Description |
400 | ResourceNotEnough.Bandwidth | The specified resource of Bandwidth is not enough. | The bandwidth resources are insufficient. |
400 | MissingParameter | Miss mandatory parameter. | One or more required parameters are not set. Check whether you have set all required parameters before you call this operation. |
400 | InvalidParameter.Name.Malformed | The specified Name is not valid. | The specified name format is invalid. Enter the name in the valid format. |
400 | InvalidParameter.Description.Malformed | The specified Description is not valid. | The specified description is invalid. |
400 | InvalidResourceGroupId | The specified ResourceGroupId does not exist. | The resource group ID is not found. |
400 | OperationFailed.SaleValidate | Validate sale condition with subArticle failed. | Failed to validate the sales condition with a subproject. |
400 | OperationFailed.SyncOrderToSub | SyncOrderToSub error. | The operation failed. |
400 | OperationFailed.SystemBusy | Operation failed because system is busy. | The system is unavailable. Try again later. |
404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | The region ID is not found. |
404 | InvalidVpcId.NotFound | Specified value of VpcId is not found in our record. | The VPC is not found. |
404 | InvalidZoneId.NotFound | Specified value of ZoneId is not exists. | The zone is not found. |
For a list of error codes, see Service error codes.