Get Bandwidth Usage - DescribeBandwidthUsage
Overview
Get Bandwidth Usage Information
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is DescribeBandwidthUsage . | 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 |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
Limit | int | Return data pagination value, the integer value range is between [0,10000000], default is 20 | No |
OffSet | int | Return data offset, default is 0 | No |
EIPIds.N | string | The Resource Id of the Elastic IP. If it is empty, it will return the bandwidth usage of all EIPs in the current Region that meet the conditions, where n is a natural number. | No |
BeginTime | int | Start Time of Statistics | No |
EndTime | int | End Time of Statistics | 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 |
TotalCount | int | The number of elements in EIPSet | No |
EIPSet | array[UnetBandwidthUsageEIPSet] | Detailed bandwidth usage information for a single Elastic IP, see UnetBandwidthUsageEIPSet, if there is no Elastic IP resource, this return value does not exist. | No |
Data Model
UnetBandwidthUsageEIPSet
Field Name | Type | Description Information | Required |
---|---|---|---|
CurBandwidth | float | Bandwidth usage in the last 5 minutes, unit in Mbps | No |
EIPId | string | Elastic IP Resource ID | No |
Example
Request Example
https://api.surfercloud.com/?Action=DescribeBandwidthUsage
&Region=cn-bj2
&EIP.0=eip-XXX
&BeginTime=7
&EndTime=1
Response Example
{
"Action": "DescribeBandwidthUsageResponse",
"EIPSet": [
{
"CurBandwidth": 0.0000629425048828125,
"EIPId": "eip-XXXX"
}
],
"RetCode": 0,
"TotalCount": 1
}