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

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

调试

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

授权信息

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

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

请求语法

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

请求参数

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

接入中心策略 ID。

policy-d95435164593aece55f9999ce45c
addonReleaseNamestring

Addon Release 名称。

release12345678
encryptYamlboolean

是否加密 Yaml。

true
namespacestring

命名空间。

arms-prom

返回参数

名称类型描述示例值
object

Schema of Response

clusterIdstring

集群 ID.

et15prod-et15storage
customScrapeJobRulesarray<object>

自定义采集任务规则

customScrapeJobRulesobject

自定义服务发现规则

addonNamestring

Addon 名称。

cloud-ecs
addonReleaseNamestring

AddonRelease 名称

release-12345678
addonVersionstring

Addon 版本

0.0.1
configYamlstring

配置 yaml

scrape_cofnigs: - jobxxxxxx
enableStatusstring

启用状态

mini
encryptYamlboolean

加密 yaml

true
matchedPodCountlong

匹配到的 pod 数量

1
messagestring

详细信息。

ok
namestring

服务名。

dlab1
namespacestring

命名空间

prod-data
scrapeConfigsarray<object>

自定义配置

scrapeConfigsobject

自定义配置

jobNamestring

采集名称

mysql-exporter
messagestring

详细信息。

successful
metricsPathstring

采集 path

/metrics
schemestring

调用方式。

http
scrapeIntervalstring

采集间隔

30s
scrapeTimeoutstring

采集超时时间

60s
serviceDiscoveryConfigsarray

服务发现配置

serviceDiscoveryConfigsstring

服务发现配置

{}
policyIdstring

策略 ID。

policy-15abcc24c06f4797832b5954198e1ed1
requestIdstring

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"
}

错误码

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