All Products
Search
Document Center

ENS:DescribeInstanceMonitorData

Last Updated:Jul 26, 2024

Queries the vCPU and memory usage of an instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:DescribeInstanceMonitorDataget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringNo

The ID of the instance. You can specify only one instance ID.

yourInstance ID
StartTimestringNo

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-10-29T23:00:00Z
EndTimestringNo

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-10-30T08:00:00Z
PeriodstringNo

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

60

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The returned service code. A value of 0 indicates that the operation was successful.

0
MonitorDataarray<object>

The set of InstanceMonitorDataType data.

object
CPUstring

The vCPU usage of the instance, which is raw data. For example, a value of 0.02 indicates that the usage is 2%.

0.02
InstanceIdstring

The ID of the instance.

yourInstance ID
Memorystring

This parameter is not yet supported.

RequestIdstring

The request ID.

C8B26B44-0189-443E-9816-D951F59623A9

Examples

Sample success responses

JSONformat

{
  "Code": 0,
  "MonitorData": {
    "InstanceMonitorData": [
      {
        "CPU": "0.02",
        "InstanceId": "yourInstance ID",
        "Memory": ""
      }
    ]
  },
  "RequestId": "C8B26B44-0189-443E-9816-D951F59623A9"
}

Error codes

HTTP status codeError codeError message
400MissingParameterThe input parameters that is mandatory for processing this request is not supplied.
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
2024-01-25The Error code has changed. The request parameters of the API has changedView Change Details