All Products
Search
Document Center

Managed Service for Prometheus:ListEnvPodMonitors

Last Updated:May 09, 2024

Queries the PodMonitors of an environment.

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
arms:ListEnvPodMonitorsList
  • Environment
    acs:arms:{#regionId}:{#accountId}:environment/{#environmentId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
EnvironmentIdstringYes

The environment ID.

env-xxxxx

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

4C518054-852F-4023-ABC1-4AF95FF7****
Codeinteger

The HTTP status code. The status code 200 indicates that the request was successful.

200
Dataobject []

The result of the operation.

RegionIdstring

The region ID.

cn-beijing
EnvironmentIdstring

The environment ID.

env-xxxxx
Namespacestring

The namespace.

arms-prom
PodMonitorNamestring

The name of the PodMonitor.

pm1
ConfigYamlstring

The YAML configuration string.

Refer to supplementary instructions.
Statusstring

The status of the PodMonitor.

run
CreationTimestampstring

The time when the PodMonitor was created. The value of this parameter is a timestamp.

2011-01-02T11:34:22Z
AddonNamestring

The name of the component to which the PodMonitor belongs.

mysql
AddonReleaseNamestring

The instance name of the component.

mysql1
AddonVersionstring

The version of the component.

1.0.5
Endpointsobject []

The endpoints of the PodMonitor.

Portstring

The external port.

9182
TargetPortinteger

The destination port.

3306
Pathstring

The collection path.

/metrics
Intervalstring

The collection interval.

30s
MatchedTargetCountinteger

The number of pods that match the PodMonitor endpoint.

1
Messagestring

The returned message.

success

Examples

Sample success responses

JSONformat

{
  "RequestId": "4C518054-852F-4023-ABC1-4AF95FF7****",
  "Code": 200,
  "Data": [
    {
      "RegionId": "cn-beijing",
      "EnvironmentId": "env-xxxxx",
      "Namespace": "arms-prom",
      "PodMonitorName": "pm1",
      "ConfigYaml": "Refer to supplementary instructions.",
      "Status": "run",
      "CreationTimestamp": "2011-01-02T11:34:22Z",
      "AddonName": "mysql",
      "AddonReleaseName": "mysql1",
      "AddonVersion": "1.0.5",
      "Endpoints": [
        {
          "Port": "9182",
          "TargetPort": 3306,
          "Path": "/metrics",
          "Interval": "30s",
          "MatchedTargetCount": 1
        }
      ]
    }
  ],
  "Message": "success"
}

Error codes

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

Change history

Change timeSummary of changesOperation
No change history