All Products
Search
Document Center

Managed Service for Prometheus:ListPrometheusInstanceByTagAndResourceGroupId

Last Updated:May 09, 2024

Queries Prometheus instances by tag and resource group.

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the Prometheus instance.

cn-hangzhou
ResourceGroupIdstringNo

The ID of the resource group.

rg-acfmxyexli2****
Tagobject []No

The tags.

KeystringNo

The key of the tag.

fpx-tag
ValuestringNo

The value of the tag.

fvt-tag-value

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

4789C3E9-A85A-524B-B97B-9D2B14BA06BC
Dataobject

The struct returned.

PrometheusInstancesobject []

The queried Prometheus instances.

ClusterIdstring

The ID of the Prometheus instance.

c9d5dda1aeca64220853ace304baeb03d
RegionIdstring

The region ID of the Prometheus instance.

cn-shanghai
UserIdstring

The ID of the user.

1672753017899***
ClusterNamestring

The name of the Prometheus instance.

prom1
ClusterTypestring

The type of the cluster. Valid values: remote-write: Prometheus instance for remote write.

  • ecs: Prometheus instances for ECS.
  • cloud-monitor: Prometheus instance for Alibaba Cloud services in the Chinese mainland.
  • cloud-product: Prometheus instance for Alibaba Cloud services outside China.
  • global-view: Prometheus instance for GlobalView.
  • aliyun-cs: Prometheus instance for Container Service.
ecs
VpcIdstring

The ID of the virtual private cloud (VPC).

vpc-8vbtp1fsm8mir18l8rl0u
VSwitchIdstring

The ID of the vSwitch.

vsw-f8z73vcja1tqnw90aav5a
SecurityGroupIdstring

The ID of the security group.

sg-f8zd1toc10wmbi1v5rom
SubClustersJsonstring

The child instances of the Prometheus instance for GlobalView instance. The value is a JSON string.

\[ { "headers": {}, "regionId": "cn-hangzhou", "sourceType": "AlibabaPrometheus", "extras": {}, "clusterId": "c39a1048921e04fceb039db2fb\*\*\*\*", "sourceName": "arms-luyao-test", "dataSource": "", "userId": "167275301789\*\*\*\*" }, { "headers": {}, "regionId": "cn-beijing", "sourceType": "AlibabaPrometheus", "extras": {}, "clusterId": "c6b6485496d5b400abde22cb47b5\*\*\*\*", "sourceName": "agent-321-test", "dataSource": "", "userId": "167275301789\*\*\*\*" }, { "headers": {}, "regionId": "cn-zhangjiakou", "sourceType": "AlibabaPrometheus", "extras": {}, "clusterId": "c261a4f3200c446659133f1ade78\*\*\*\*", "sourceName": "zaifeng-cardinality-01", "dataSource": "", "userId": "167275301789\*\*\*\*" } ]
RemoteReadIntraUrlstring

Remote Read intranet url.

http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/api/v1/read
RemoteReadInterUrlstring

Remote Read internet url.

http://cn-beijing.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/api/v1/read
RemoteWriteIntraUrlstring

Remote Write intranet url.

http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v3/write
RemoteWriteInterUrlstring

Remote Write internet url.

http://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v3/write
PushGatewayIntraUrlstring

Push Gateway intranet url.

http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v2
PushGatewayInterUrlstring

Push Gateway internet url.

http://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v2
HttpApiIntraUrlstring

HTTP Api intranet url.

http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/cn-beijing
HttpApiInterUrlstring

HTTP Api internet url.

http://cn-beijing.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/cn-beijing
AuthTokenstring

Auth Token string.

ad32dxxxx
PaymentTypestring

The billing method. Valid values:

  • PREPAY: subscription.
  • POSTPAY: pay-as-you-go.
POSTPAY
GrafanaInstanceIdstring

The ID of the Grafana workspace.

grafana-rnggfvhlcdl6m71l**
ResourceGroupIdstring

The ID of the resource group to which the Prometheus instance belongs.

rg-acfmz7nocpeidcy
ResourceTypestring

Resource type.

PROMETHEUS
Tagsobject []

The tags.

TagKeystring

The key of the tag.

ac-cus-tag-3
TagValuestring

The value of the tag.

asg-2vc8qq7x89o11rus9uvu
Codestring

The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed.

200
Messagestring

The returned message.

message

Examples

Sample success responses

JSONformat

{
  "RequestId": "4789C3E9-A85A-524B-B97B-9D2B14BA06BC",
  "Data": {
    "PrometheusInstances": [
      {
        "ClusterId": "c9d5dda1aeca64220853ace304baeb03d",
        "RegionId": "cn-shanghai",
        "UserId": "1672753017899***",
        "ClusterName": "prom1",
        "ClusterType": "ecs",
        "VpcId": "vpc-8vbtp1fsm8mir18l8rl0u",
        "VSwitchId": "vsw-f8z73vcja1tqnw90aav5a",
        "SecurityGroupId": "sg-f8zd1toc10wmbi1v5rom",
        "SubClustersJson": "\\[ { \"headers\": {}, \"regionId\": \"cn-hangzhou\", \"sourceType\": \"AlibabaPrometheus\", \"extras\": {}, \"clusterId\": \"c39a1048921e04fceb039db2fb\\*\\*\\*\\*\", \"sourceName\": \"arms-luyao-test\", \"dataSource\": \"\", \"userId\": \"167275301789\\*\\*\\*\\*\" }, { \"headers\": {}, \"regionId\": \"cn-beijing\", \"sourceType\": \"AlibabaPrometheus\", \"extras\": {}, \"clusterId\": \"c6b6485496d5b400abde22cb47b5\\*\\*\\*\\*\", \"sourceName\": \"agent-321-test\", \"dataSource\": \"\", \"userId\": \"167275301789\\*\\*\\*\\*\" }, { \"headers\": {}, \"regionId\": \"cn-zhangjiakou\", \"sourceType\": \"AlibabaPrometheus\", \"extras\": {}, \"clusterId\": \"c261a4f3200c446659133f1ade78\\*\\*\\*\\*\", \"sourceName\": \"zaifeng-cardinality-01\", \"dataSource\": \"\", \"userId\": \"167275301789\\*\\*\\*\\*\" } ]\n",
        "RemoteReadIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/api/v1/read",
        "RemoteReadInterUrl": "http://cn-beijing.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/api/v1/read",
        "RemoteWriteIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v3/write\n",
        "RemoteWriteInterUrl": "http://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v3/write\n",
        "PushGatewayIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v2\n",
        "PushGatewayInterUrl": "http://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v2\n",
        "HttpApiIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/cn-beijing",
        "HttpApiInterUrl": "http://cn-beijing.arms.aliyuncs.com:9090/api/v1/prometheus/xxx/cn-beijing",
        "AuthToken": "ad32dxxxx\n",
        "PaymentType": "POSTPAY",
        "GrafanaInstanceId": "grafana-rnggfvhlcdl6m71l**",
        "ResourceGroupId": "rg-acfmz7nocpeidcy",
        "ResourceType": "PROMETHEUS",
        "Tags": [
          {
            "TagKey": "ac-cus-tag-3",
            "TagValue": "asg-2vc8qq7x89o11rus9uvu"
          }
        ]
      }
    ]
  },
  "Code": "200",
  "Message": "message"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-12-13The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-06-21The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    delete Input Parameters: ListAsConsole
2023-05-17The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ListAsConsole
2023-03-30The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.