All Products
Search
Document Center

ENS:DescribeUserBandWidthData

Last Updated:Nov 18, 2024

Queries the bandwidth that you use within a specified period of time.

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:DescribeUserBandWidthDataget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EnsRegionIdstringNo

The ID of the node. You can specify only one node ID. By default, all nodes are queried.

cn-taiyuan-telecom
InstanceIdstringNo

The ID of the instance for which you want to query the data. You can specify only one instance ID. By default, all instances are queried.

i-5inkeimcipxk26yqtzm4q****
StartTimestringYes

The beginning of the time range to query.

  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
  • If the value of the seconds place is not 00, the start time is automatically set to the next minute.
2019-05-21T10:22:00Z
EndTimestringYes

The end of the time range to query.

  • Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
  • If the value of the seconds place is not 00, the start time is automatically set to the next minute.
2019-05-21T12:22:00Z
PeriodstringYes

The precision of the monitoring data that you want to obtain. Valid values: 300, 1200, 3600, and 14400. Default value: 300. Unit: seconds.

300
IspstringNo

The Internet service provider (ISP). Valid values:

  • cmcc: China Mobile
  • telecom: China Telecom
  • unicom: China Unicom
  • multiCarrier: multi-line ISP
cmcc

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The returned service code. 0 indicates that the request was successful.

0
MonitorDataobject

The monitoring data.

BandWidthMonitorDataarray<object>

The bandwidth data.

BandWidthMonitorDataobject
DownBandWidthlong

The outbound bandwidth. Unit: bit/s.

0
InternetRXlong

The Internet traffic to the instance. Unit: bytes.

0
InternetTXlong

The Internet traffic from the instance. Unit: bytes.

0
TimeStampstring

The timestamp when the monitoring data was queried. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2019-10-12T05:45:00Z
UpBandWidthlong

The inbound bandwidth. Unit: bit/s.

0
MaxDownBandWidthstring

The maximum outbound bandwidth within the queried time range. Unit: bit/s.

16817468
MaxUpBandWidthstring

The maximum inbound bandwidth within the queried time range. Unit: bit/s.

231008
RequestIdstring

The ID of the request.

50373E71-7710-4620-8AAB-133CCE49451C

Examples

Sample success responses

JSONformat

{
  "Code": 0,
  "MonitorData": {
    "BandWidthMonitorData": [
      {
        "DownBandWidth": 0,
        "InternetRX": 0,
        "InternetTX": 0,
        "TimeStamp": "2019-10-12T05:45:00Z",
        "UpBandWidth": 0
      }
    ],
    "MaxDownBandWidth": "16817468",
    "MaxUpBandWidth": "231008"
  },
  "RequestId": "50373E71-7710-4620-8AAB-133CCE49451C"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameterThe input parameters that is mandatory for processing this request is not supplied.-
400USERNOTFOUNDThe user is not in ens-controller.The current user has not registered with the edge node service or has not passed the user review.
400NoPermissionPermission denied.-
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history