All Products
Search
Document Center

Managed Service for Prometheus:GetPrometheusInstance

Last Updated:May 09, 2024

Queries the information about a Prometheus instance.

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
ClusterIdstringYes

The ID of the Prometheus instance.

c77f6f2397ea74672872acf5e31374a27

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

52C422FD-6B43-524D-B8A1-A4693294318C
Messagestring

The message returned.

message
Codeinteger

The status code. The status code 200 indicates that the request was successful. If another status code is returned, the request failed.

200
Dataobject

The returned message.

ClusterIdstring

The ID of the Prometheus instance.

c589a1b8db05c4561aefbb898ca8fb1cf
RegionIdstring

The region ID.

cn-beijing
UserIdstring

The user ID.

167275301789****
ClusterNamestring

The name of the monitoring object.

prom1
ClusterTypestring
  • remote-write: Prometheus instance for Remote Write
  • ecs: Prometheus instances for ECS
  • cloud-monitor: Prometheus instance for cloud services (Chinese mainland)
  • cloud-monitor: Prometheus instance for cloud services (regions outside the Chinese mainland)
  • global-view: Prometheus instance for GlobalView
  • aliyun-cs: Prometheus instance for Container Service
remote-write
VpcIdstring

The VPC ID. This parameter is returned only for Prometheus instances for ECS.

vpc-8vb02uk57qbcktqcvqqqj
VSwitchIdstring

The vSwitch ID. This parameter is returned only for Prometheus instances for ECS.

vsw-f8z73vcja1tqnw90aav5a
SecurityGroupIdstring

The ID of the security group. This parameter is returned only for Prometheus instances for ECS.

sg-8vbdgmf4nraiqa9bx0jo
SubClustersJsonstring

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

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

Remote read intranet address.

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

Remote read internet address.

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

Remote write intranet address.

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

Remote write internet address.

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

Push gateway intranet address.

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

Push gateway internet address.

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

Http API intranet address.

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

Http API internet address.

https://cn-beijing.arms.aliyuncs.com:9443/api/v1/prometheus/xxx
AuthTokenstring

Authorization token.

GciOiJIUzI1NiJ9***
PaymentTypestring

The billing method. Valid values:

  • PREPAY: subscription
  • POSTPAY: pay-as-you-go
PREPAY
StorageDurationinteger

Storage duration (days).

90
ArchiveDurationinteger

The number of days for automatic archiving after storage expiration (optional values: 60, 90, 180, 365). 0 means not archive.

60
GrafanaInstanceIdstring

The ID of the Grafana workspace.

grafana-rnggfvhlcdl6m71***
ResourceGroupIdstring

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

rg-aek2vezare****
ResourceTypestring

The type of the resource. Set the value to PROMETHEUS.

PROMETHEUS
Tagsobject []

The tags of the instance.

TagKeystring

The tag key.

tag1
TagValuestring

The tag value.

tagValue1

Examples

Sample success responses

JSONformat

{
  "RequestId": "52C422FD-6B43-524D-B8A1-A4693294318C",
  "Message": "message",
  "Code": 200,
  "Data": {
    "ClusterId": "c589a1b8db05c4561aefbb898ca8fb1cf",
    "RegionId": "cn-beijing",
    "UserId": "167275301789****",
    "ClusterName": "prom1",
    "ClusterType": "remote-write",
    "VpcId": "vpc-8vb02uk57qbcktqcvqqqj",
    "VSwitchId": "vsw-f8z73vcja1tqnw90aav5a",
    "SecurityGroupId": "sg-8vbdgmf4nraiqa9bx0jo",
    "SubClustersJson": "\\[{\"headers\":{},\"regionId\":\"cn-hangzhou\",\"sourceType\":\"AlibabaPrometheus\",\"extras\":{},\"clusterId\":\"c39a1048921e04fceb039db2fbb73\\*\\*\\*\",\"sourceName\":\"arms-luyao-test\",\"dataSource\":\"\",\"userId\":\"167275301789\\*\\*\\*\"},{\"headers\":{},\"regionId\":\"cn-beijing\",\"sourceType\":\"AlibabaPrometheus\",\"extras\":{},\"clusterId\":\"c6b6485496d5b400abde22cb47b5\\*\\*\\*\\*\",\"sourceName\":\"agent-321-test\",\"dataSource\":\"\",\"userId\":\"1672753017899\\*\\*\\*\"},{\"headers\":{},\"regionId\":\"cn-zhangjiakou\",\"sourceType\":\"AlibabaPrometheus\",\"extras\":{},\"clusterId\":\"c261a4f3200c446659133f1ade789b15e\",\"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",
    "RemoteWriteInterUrl": "https://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v3/write",
    "PushGatewayIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com/prometheus/xxx/api/v2",
    "PushGatewayInterUrl": "https://cn-beijing.arms.aliyuncs.com/prometheus/xxx/api/v2",
    "HttpApiIntraUrl": "http://cn-beijing-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/xxx",
    "HttpApiInterUrl": "https://cn-beijing.arms.aliyuncs.com:9443/api/v1/prometheus/xxx",
    "AuthToken": "GciOiJIUzI1NiJ9***",
    "PaymentType": "PREPAY",
    "StorageDuration": 90,
    "ArchiveDuration": 60,
    "GrafanaInstanceId": "grafana-rnggfvhlcdl6m71***",
    "ResourceGroupId": "rg-aek2vezare****",
    "ResourceType": "PROMETHEUS",
    "Tags": [
      {
        "TagKey": "tag1",
        "TagValue": "tagValue1"
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-04-12The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-12-06The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.