GetPrometheusInstance

Updated at:

Retrieves information about a specified Prometheus instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

arms:GetPrometheusInstance

get

*Prometheus

acs:arms:{#regionId}:{#accountId}:prometheus/{#ClusterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

ClusterId

string

Yes

The Prometheus instance ID.

c77f6f2397ea74672872acf5e31374a27

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

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

Message

string

The message returned for the result.

message

Code

integer

The status code. A value of 200 indicates success. Other values indicate errors.

200

Data

object

The returned information.

ClusterId

string

The Prometheus instance ID.

c589a1b8db05c4561aefbb898ca8fb1cf

RegionId

string

The region ID.

cn-beijing

UserId

string

The user ID.

167275301789****

ClusterName

string

The cluster name.

prom1

ClusterType

string

  • remote-write (Prometheus for General)

  • ecs (Prometheus for ECS)

  • cloud-monitor (Prometheus for Cloud Services in the Chinese mainland)

  • cloud-product (Prometheus for Cloud Services outside the Chinese mainland)

  • global-view (Prometheus for GlobalView)

  • aliyun-cs (Prometheus for Container Service).

remote-write

VpcId

string

The VPC associated with the cluster. This parameter is returned only for Prometheus for ECS instances.

vpc-8vb02uk57qbcktqcvqqqj

VSwitchId

string

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

vsw-f8z73vcja1tqnw90aav5a

SecurityGroupId

string

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

sg-8vbdgmf4nraiqa9bx0jo

SubClustersJson

string

The JSON string of sub-instances for the GlobalView instance.

[{"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-测试","dataSource":"","userId":"1672753017899***"},{"headers":{},"regionId":"cn-zhangjiakou","sourceType":"AlibabaPrometheus","extras":{},"clusterId":"c261a4f3200c446659133f1ade789b15e","sourceName":"zaifeng-cardinality-01","dataSource":"","userId":"167275301789***"}]

RemoteReadIntraUrl

string

The internal endpoint for remote read.

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

RemoteReadInterUrl

string

The public endpoint for remote read.

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

RemoteWriteIntraUrl

string

The internal endpoint for remote write.

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

RemoteWriteInterUrl

string

The public endpoint for remote write.

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

PushGatewayIntraUrl

string

The internal endpoint for push gateway.

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

PushGatewayInterUrl

string

The public endpoint for push gateway.

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

OpenTelemetryInterUrl

string

HttpApiIntraUrl

string

The internal endpoint for HTTP API.

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

HttpApiInterUrl

string

The public endpoint for HTTP API.

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

AuthToken

string

The authorization token string.

GciOiJIUzI1NiJ9***

AccessType

string

The permission type. Valid values:

readWrite, readOnly, httpReadOnly.

readWrite

PaymentType

string

The billing method. Valid values:

  • PREPAY: subscription.

  • POSTPAY: pay-as-you-go.

PREPAY

StorageDuration

integer

The storage duration, in days.

90

ArchiveDuration

integer

The number of days that data is automatically archived after the storage period expires. Valid values: 60, 90, 180, and 365. A value of 0 indicates that data is not archived.

60

GrafanaInstanceId

string

The Grafana workspace ID.

grafana-rnggfvhlcdl6m71***

ResourceGroupId

string

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

rg-aek2vezare****

ResourceType

string

The fixed value: PROMETHEUS.

PROMETHEUS

EnableAuthToken

string

Indicates whether access token authentication is enabled.

true

SupportAuthTypes

array

The supported authentication types.

string

The supported authentication types.

Valid values:

  • BasicAuth :

    HTTP basic authentication.

  • AuthFree :

    authentication-free.

  • AuthToken :

    token-based authentication.

AuthFree

EnableAuthFreeRead

boolean

Indicates whether authentication-free read is enabled.

AuthFreeReadPolicy

string

The whitelist policy for authentication-free read addresses.

0.0.0.0/0

EnableAuthFreeWrite

boolean

Indicates whether authentication-free write is enabled.

AuthFreeWritePolicy

string

The whitelist policy for authentication-free write addresses.

0.0.0.0/0

Product

string

The product to which the Prometheus instance belongs (arms or cms).

arms

DbInstanceStatus

string

The status of the backend data storage.

RUNNING

Version

string

The version.

V1

PaymentTypeUpdateTime

string

The time when the billing method of the instance was last modified.

2025-02-26T06:05:01Z

ExtraInfo

object

The extended information. This parameter is returned only for console requests.

string

扩展信息。

extraKey

Tags

array<object>

The tags bound to the instance.

object

The tag.

TagKey

string

The tag key.

tag1

TagValue

string

The tag value.

tagValue1

OpenTelemetryIntraUrl

string

Examples

Success response

JSON format

{
  "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-测试\",\"dataSource\":\"\",\"userId\":\"1672753017899***\"},{\"headers\":{},\"regionId\":\"cn-zhangjiakou\",\"sourceType\":\"AlibabaPrometheus\",\"extras\":{},\"clusterId\":\"c261a4f3200c446659133f1ade789b15e\",\"sourceName\":\"zaifeng-cardinality-01\",\"dataSource\":\"\",\"userId\":\"167275301789***\"}]",
    "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",
    "OpenTelemetryInterUrl": "",
    "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***",
    "AccessType": "readWrite",
    "PaymentType": "PREPAY",
    "StorageDuration": 90,
    "ArchiveDuration": 60,
    "GrafanaInstanceId": "grafana-rnggfvhlcdl6m71***",
    "ResourceGroupId": "rg-aek2vezare****",
    "ResourceType": "PROMETHEUS",
    "EnableAuthToken": "true",
    "SupportAuthTypes": [
      "AuthFree"
    ],
    "EnableAuthFreeRead": false,
    "AuthFreeReadPolicy": "0.0.0.0/0",
    "EnableAuthFreeWrite": false,
    "AuthFreeWritePolicy": "0.0.0.0/0",
    "Product": "arms",
    "DbInstanceStatus": "RUNNING",
    "Version": "V1",
    "PaymentTypeUpdateTime": "2025-02-26T06:05:01Z",
    "ExtraInfo": {
      "key": "extraKey"
    },
    "Tags": [
      {
        "TagKey": "tag1",
        "TagValue": "tagValue1"
      }
    ],
    "OpenTelemetryIntraUrl": ""
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.