文档

GetPrometheusInstance - 获取指定Prometheus实例信息

更新时间:

获取指定Prometheus实例信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
arms:GetPrometheusInstanceRead
  • Prometheus
    acs:arms:{#regionId}:{#accountId}:prometheus/{#ClusterId}

请求参数

名称类型必填描述示例值
RegionIdstring

地域 ID。

cn-hangzhou
ClusterIdstring

Prometheus 实例 ID。

c77f6f2397ea74672872acf5e31374a27

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

Id of the request

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

返回结果的提示信息。

message
Codeinteger

状态码。200 为成功,其他状态码为异常。

200
Dataobject

返回信息。

ClusterIdstring

Prometheus 实例 ID。

c589a1b8db05c4561aefbb898ca8fb1cf
RegionIdstring

地域 ID。

cn-beijing
UserIdstring

用户 ID。

167275301789****
ClusterNamestring

集群名称。

prom1
ClusterTypestring
  • remote-write(Prometheus for 通用)
  • ecs(Prometheus for ECS)
  • cloud-monitor(Prometheus for 云服务中国内地)
  • cloud-product(Prometheus for 云服务国外)
  • global-view(Prometheus for GlobalView)
  • aliyun-cs(Prometheus for 容器服务)
remote-write
VpcIdstring

集群所对应的 VPC。(仅 Prometheus for ECS 透出)

vpc-8vb02uk57qbcktqcvqqqj
VSwitchIdstring

交换机 ID。(仅 Prometheus for ECS 透出)

vsw-f8z73vcja1tqnw90aav5a
SecurityGroupIdstring

安全组 ID。(仅 Prometheus for ECS 透出)

sg-8vbdgmf4nraiqa9bx0jo
SubClustersJsonstring

globalView 实例的子实例 json 串。

[{"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***"}]
RemoteReadIntraUrlstring

remote read 内网地址

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

remote read 公网地址

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

remote write 内网地址

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

remote write 公网地址

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

push gateway 内网地址

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

push gateway 公网地址

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

http api 内网地址

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

http api 公网地址

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

授权 token 串

GciOiJIUzI1NiJ9***
AccessTypestring

权限类型: readWrite、readOnly、httpReadOnly

readWrite
PaymentTypestring

付费类型。

  • PREPAY-包年包月
  • POSTPAY-按量付费
PREPAY
StorageDurationinteger

存储时长(天)。

90
ArchiveDurationinteger

存储到期后,自动归档保存的天数(可选值:60、90、180、365)。0 表示不归档保存。

60
GrafanaInstanceIdstring

Grafana 工作区 ID。

grafana-rnggfvhlcdl6m71***
ResourceGroupIdstring

实例所属的资源组 ID。

rg-aek2vezare****
ResourceTypestring

固定值:PROMETHEUS。

PROMETHEUS
Tagsarray<object>

实例所绑定的标签。

object

标签。

TagKeystring

标签键。

tag1
TagValuestring

标签值。

tagValue1

示例

正常返回示例

JSON格式

{
  "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",
    "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",
    "Tags": [
      {
        "TagKey": "tag1",
        "TagValue": "tagValue1"
      }
    ]
  }
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2024-05-28OpenAPI 返回结构发生变更查看变更详情
2024-05-27OpenAPI 返回结构发生变更查看变更详情
2024-04-12OpenAPI 返回结构发生变更查看变更详情
2023-12-06OpenAPI 返回结构发生变更查看变更详情