ListIntegrationPolicyCustomScrapeJobRules - 获取接入中心策略的自定义服务发现规则

获取接入中心策略的自定义服务发现规则。

调试

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

调试

授权信息

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

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

cms:ListIntegrationPolicyCustomScrapeJobRules

none

*IntegrationPolicy

acs:cms:{#regionId}:{#accountId}:integrationpolicy/{#integrationPolicyId}

请求语法

GET /integration-policies/{policyId}/custom-scrape-job-rules HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

policyId

string

接入中心策略 ID。

policy-d95435164593aece55f9999ce45c

请求参数

名称

类型

必填

描述

示例值

addonReleaseName

string

Addon Release 名称。

release12345678

encryptYaml

boolean

是否加密 Yaml。

true

namespace

string

命名空间。

arms-prom

返回参数

名称

类型

描述

示例值

object

Schema of Response

clusterId

string

集群 ID。

et15prod-et15storage

customScrapeJobRules

array<object>

自定义采集任务规则

array<object>

自定义服务发现规则

addonName

string

Addon 名称。

cloud-ecs

addonReleaseName

string

AddonRelease 名称

release-12345678

addonVersion

string

Addon 版本

0.0.1

configYaml

string

配置 yaml

scrape_cofnigs: - jobxxxxxx

enableStatus

string

启用状态

mini

encryptYaml

boolean

加密 yaml

true

matchedPodCount

integer

匹配到的 pod 数量

1

message

string

详细信息。

ok

name

string

服务名。

dlab1

namespace

string

命名空间

prod-data

scrapeConfigs

array<object>

自定义配置

object

自定义配置

jobName

string

采集名称

mysql-exporter

message

string

详细信息。

successful

metricsPath

string

采集 path

/metrics

scheme

string

调用方式。

http

scrapeInterval

string

采集间隔

30s

scrapeTimeout

string

采集超时时间

60s

serviceDiscoveryConfigs

array

服务发现配置

string

服务发现配置

{}

policyId

string

策略 ID。

policy-15abcc24c06f4797832b5954198e1ed1

requestId

string

Id of the request

0CEC5375-C554-562B-A65F-9A629907C1F0

示例

正常返回示例

JSON格式

{
  "clusterId": "et15prod-et15storage",
  "customScrapeJobRules": [
    {
      "addonName": "cloud-ecs",
      "addonReleaseName": "release-12345678",
      "addonVersion": "0.0.1",
      "configYaml": "scrape_cofnigs:\n- jobxxxxxx",
      "enableStatus": "mini",
      "encryptYaml": true,
      "matchedPodCount": 1,
      "message": "ok",
      "name": "dlab1",
      "namespace": "prod-data",
      "scrapeConfigs": [
        {
          "jobName": "mysql-exporter",
          "message": "successful",
          "metricsPath": "/metrics",
          "scheme": "http",
          "scrapeInterval": "30s",
          "scrapeTimeout": "60s",
          "serviceDiscoveryConfigs": [
            "{}"
          ]
        }
      ]
    }
  ],
  "policyId": "policy-15abcc24c06f4797832b5954198e1ed1",
  "requestId": "0CEC5375-C554-562B-A65F-9A629907C1F0"
}

错误码

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

变更历史

更多信息,参考变更详情