All Products
Search
Document Center

Managed Service for Prometheus:ListPrometheusInstances

Last Updated:May 09, 2024

Obtains all Prometheus instances in a region.

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:ListPrometheusInstancesWrite
  • Prometheus
    acs:arms:{#regionId}:{#accountId}:prometheus/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region.

cn-hangzhou
ClusterTypestringNo

Optional instance types (if left blank, all types of instances will be queried):

  • cloud-product-prometheus
  • ManagedKubernetes
  • satellite
  • Ask
  • remote-write-prometheus
  • cloud-monitor-cmee
  • ExternalKubernetes
  • vpc-prometheus
  • cloud-monitor-direct
  • Edge Kubernetes
cloud-product-prometheus
ShowGlobalViewbooleanYes

Specifies whether to query global aggregation instances. Valid values:

  • true
  • false
true

Response parameters

ParameterTypeDescriptionExample
object

The struct returned.

Datastring

The Prometheus instances in the region in the JSON format.

[{"agentStatus":"0","clusterId":"global-v2-cn-1672753017899-dmjnwtzz","clusterName":"test-GlobalView","clusterType":"GlobalViewV2","commercialConfig":{},"createTime":1656579981000,"id":13785300,"isAdvancedClusterInstalled":false,"isClusterRunning":true,"isControllerInstalled":true,"isIntegrationCenter":false,"regionId":"cn-hongkong","updateTime":1657616273000,"userId":"1672753017899"},{"agentStatus":"0","clusterId":"51a123a61a8f31f0","clusterName":"cloud-product-prometheus_cn-qingdao","clusterType":"cloud-product-prometheus","commercialConfig":{},"controllerId":"51a123a61a8f31f0","createTime":1653532488000,"id":13746658,"isAdvancedClusterInstalled":false,"isClusterRunning":true,"isControllerInstalled":true,"isIntegrationCenter":false,"regionId":"cn-qingdao","updateTime":1653532518000,"userId":"1672753017899"}]
RequestIdstring

The request ID. You can use the ID to query logs and troubleshoot issues.

E9C9DA3D-10FE-472E-9EEF-2D0A3E41****
Codeinteger

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

200
Messagestring

The returned message.

success

Examples

Sample success responses

JSONformat

{
  "Data": "[{\"agentStatus\":\"0\",\"clusterId\":\"global-v2-cn-1672753017899-dmjnwtzz\",\"clusterName\":\"test-GlobalView\",\"clusterType\":\"GlobalViewV2\",\"commercialConfig\":{},\"createTime\":1656579981000,\"id\":13785300,\"isAdvancedClusterInstalled\":false,\"isClusterRunning\":true,\"isControllerInstalled\":true,\"isIntegrationCenter\":false,\"regionId\":\"cn-hongkong\",\"updateTime\":1657616273000,\"userId\":\"1672753017899\"},{\"agentStatus\":\"0\",\"clusterId\":\"51a123a61a8f31f0\",\"clusterName\":\"cloud-product-prometheus_cn-qingdao\",\"clusterType\":\"cloud-product-prometheus\",\"commercialConfig\":{},\"controllerId\":\"51a123a61a8f31f0\",\"createTime\":1653532488000,\"id\":13746658,\"isAdvancedClusterInstalled\":false,\"isClusterRunning\":true,\"isControllerInstalled\":true,\"isIntegrationCenter\":false,\"regionId\":\"cn-qingdao\",\"updateTime\":1653532518000,\"userId\":\"1672753017899\"}]",
  "RequestId": "E9C9DA3D-10FE-472E-9EEF-2D0A3E41****",
  "Code": 200,
  "Message": "success"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-11-20The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-04-21The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ClusterType
2023-03-20The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.