ListIntegrationPolicyPodMonitors - 查询接入中心策略的PodMonitor资源

获取接入中心策略的PodMonitor资源。

接口说明

本文将提供一个示例,查询报警模板列表。返回结果显示,报警模板列表中共有 2 个报警模板,分别是ECS_Template1ECS_Template2

调试

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

授权信息

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

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

请求语法

GET /integration-policies/{policyId}/pod-monitors HTTP/1.1

请求参数

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

接入中心策略 ID。

policy-1d4634924c8ba599822c601fcee3
addonReleaseNamestring

Addon Release 名称。

release-123456789
namespacestring

命名空间。

default
encryptYamlboolean

是否加密 Yaml。

true

返回参数

名称类型描述示例值
object

Schema of Response

clusterIdstring

集群 ID.

et15prod-et15storage
podMonitorsarray<object>

PodMontior 列表

podMonitorsobject

PodMontior 列表

addonNamestring

Addon 名称。

cloud-ecs
addonReleaseNamestring

AddonRelease 名称。

release-2345678
addonVersionstring

Addon 版本。

0.0.1
configYamlstring

配置 yaml。

apiVersion: xxxxx
enableStatusstring

启用状态。

run
encryptYamlboolean

加密 yaml。

YXBpVmVyc2lvbjogeHh4eHgK
endpointsarray<object>

实例的接入点。

endpointsobject

Endpoint 详情

intervalstring

采集间隔

30s
matchedTargetCountlong

匹配的 target 数量

1
pathstring

指标采集路径

/metrics
portstring

端口号

9100
targetPortstring

目标端口

https
matchedPodCountlong

匹配 pod 的数量

3
namestring

采集名称。

znzmo_entity_test
namespacestring

命名空间

sla-ns-d5aeb2b4f91b47
policyIdstring

策略 ID。

policy-c9efed2b99c348d49e589c5f780fc074
requestIdstring

Id of the request

CD8BA7D6-995D-578D-9941-78B0FECD14B5

示例

正常返回示例

JSON格式

{
  "clusterId": "et15prod-et15storage",
  "podMonitors": [
    {
      "addonName": "cloud-ecs",
      "addonReleaseName": "release-2345678",
      "addonVersion": "0.0.1",
      "configYaml": "apiVersion: xxxxx",
      "enableStatus": "run",
      "encryptYaml": true,
      "endpoints": [
        {
          "interval": "30s",
          "matchedTargetCount": 1,
          "path": "/metrics",
          "port": 9100,
          "targetPort": "https"
        }
      ],
      "matchedPodCount": 3,
      "name": "znzmo_entity_test",
      "namespace": "sla-ns-d5aeb2b4f91b47"
    }
  ],
  "policyId": "policy-c9efed2b99c348d49e589c5f780fc074",
  "requestId": "CD8BA7D6-995D-578D-9941-78B0FECD14B5"
}

错误码

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