Docs
api
Basic Network(UNet)
CreateBandwidthPackage

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 NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateBandwidthPackage.Yes
PublicKeystringThe user’s public key can be obtained from ConsoleYes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
BandwidthintBandwidth size (unit Mbps), value range [2,800] (maximum value is subject to regional restrictions)Yes
EIPIdstringThe resource ID bound to the Elastic IPYes
TimeRangeintThe 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
EnableTimeintEffective time, in Unix timestamp format, defaults to immediate activationNo
CouponIdstringCoupon IDNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
BandwidthPackageIdstringThe resource ID of the created bandwidth packageNo

Example

Request Example

https://api.dezai.com/?Action=CreateBandwidthPackage
&Region=cn-bj2
&EIPId=eip-vuxqym
&Bandwidth=200
&EnableTime=1430986009
&TimeRange=1

Response Example

{
  "Action": "CreateBandwidthPackageResponse",
  "BandwidthPackageId": "bwpack-rybftq",
  "RetCode": 0
}