All Products
Search
Document Center

Application Real-Time Monitoring Service:ListPrometheusInstanceByTagAndResourceGroupId

Last Updated:Nov 05, 2024

Queries Prometheus instances by tag and resource group.

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
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****
Tagarray<object>No

The tags.

objectNo

The tag of the resource.

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 returned struct.

PrometheusInstancesarray<object>

The queried Prometheus instances.

PrometheusInstancesobject
ClusterIdstring

The ID of the Prometheus instance.

c9d5dda1aeca64220853ace304baeb03d
RegionIdstring

The region ID.

cn-shanghai
UserIdstring

The ID of the user.

1672753017899***
ClusterNamestring

The name of the Prometheus instance.

prom1
ClusterTypestring

The instance type. 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 the Chinese mainland
  • global-view: global aggregation instance
  • 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 global aggregation 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

The internal URL for remote read.

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

The public URL for remote read.

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

The internal URL for remote write.

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

The public URL for remote write.

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

The internal URL for Pushgateway.

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

The public URL for Pushgateway.

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

The internal URL for the HTTP API.

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

The public URL for the HTTP API.

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

The authorization token.

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

The resource type.

PROMETHEUS
Tagsarray<object>

The list of tags.

tagsobject

The tag.

TagKeystring

The tag key.

ac-cus-tag-3
TagValuestring

The tag value.

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 changedView Change Details
2023-06-21The request parameters of the API has changedView Change Details
2023-05-17The request parameters of the API has changedView Change Details
2023-03-30The response structure of the API has changedView Change Details