Create Bandwidth Package - CreateBandwidthPackage
Overview
For non-shared bandwidth mode, the bandwidth billing elastic IP bound to the resource instance is attached with a temporary bandwidth package.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CreateBandwidthPackage . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Bandwidth | int | Bandwidth size (unit Mbps), value range [2,800] (maximum value is subject to regional restrictions) | Yes |
EIPId | string | The resource ID bound to the Elastic IP | Yes |
TimeRange | int | The validity duration of the bandwidth package, the value range is an integer greater than 0, that is, this bandwidth package takes effect from EnableTime to EnableTime+TimeRange. | Yes |
EnableTime | int | Effective time, in Unix timestamp format, defaults to immediate activation | No |
CouponId | string | Coupon ID | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
BandwidthPackageId | string | The resource ID of the created bandwidth package | No |
Example
Request Example
https://api.surfercloud.com/?Action=CreateBandwidthPackage
&Region=cn-bj2
&EIPId=eip-vuxqym
&Bandwidth=200
&EnableTime=1430986009
&TimeRange=1
Response Example
{
"Action": "CreateBandwidthPackageResponse",
"BandwidthPackageId": "bwpack-rybftq",
"RetCode": 0
}