All Products
Search
Document Center

Elastic Compute Service:DescribeDiagnosticMetrics

Last Updated:Nov 14, 2024

Queries diagnostic metrics.

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
ecs:DescribeDiagnosticMetricsget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The IDs of diagnostic metrics.

cn-hangzhou
MetricIdsarrayNo

The ID of diagnostic metric.

stringNo

The resource type supported by the diagnostic metric.

Instance.DiskLoadFailure
ResourceTypestringNo

The query token. Set the value to the NextToken value returned in the last call to the DescribeDiagnosticMetrics operation. Leave this parameter empty the first time you call this operation.

Enumeration Value:
  • instance
instance
NextTokenstringNo

The maximum number of entries to return on each page. Maximum value: 100.

Default value:

  • If this parameter is left empty, the default value is 10.
  • If this parameter is set to a value greater than 100, the default value is 100.
caeba0bbb2be03f84eb48b699f0a4883
MaxResultsintegerNo

The ID of the request.

10

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The query token returned in this call.

473469C7-AA6F-4DC5-B3DB-A3DC0DE*****
NextTokenstring

The list of diagnostic metrics.

caeba0bbb2be03f84eb48b699f0a4883
Metricsarray<object>

The ID of the diagnostic metric.

Metricobject
MetricIdstring

The name of the diagnostic metric.

GuestOS.WinFirewall
MetricNamestring

CPU diagnostic

The category of the diagnostic metric.
MetricCategorystring

The description of the diagnostic metric.

CPU
Descriptionstring

CPU diagnostic

The resource type supported by the diagnostic metric.
ResourceTypestring

Indicates whether the diagnostic metric needs to be assessed by running a Cloud Assistant command in a guest operating system.

instance
GuestMetricboolean

The operating system type supported by the diagnostic metric. Valid values:

  • Windows
  • Linux
  • All: both Windows and Linux
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE*****",
  "NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
  "Metrics": [
    {
      "MetricId": "GuestOS.WinFirewall",
      "MetricName": "The category of the diagnostic metric.\n",
      "MetricCategory": "CPU",
      "Description": "The resource type supported by the diagnostic metric.\n",
      "ResourceType": "instance",
      "GuestMetric": true,
      "SupportedOperatingSystem": "ALL"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-07-21Add OperationView Change Details