文档

DescribeWebhookContacts - 查询Webhook告警联系人列表

更新时间:

查询Webhook告警联系人列表。

调试

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

授权信息

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

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

请求参数

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

Webhook 告警联系人名称。

webhook名称
Pagelong

查询页数。

1
Sizelong

每页展示的 Webhook 告警联系人数。

20
ContactIdsstring

联系人 ID。

123

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求 ID。

4D6C358A-A58B-4F4B-94CE-F5AAF023****
PageBeanobject

分页对象。

Totallong

查询到的 Webhook 告警联系人总数。

1
Pagelong

查询的页数。

1
Sizelong

每页的 Webhook 告警联系人数。

20
WebhookContactsobject []

Webhook 告警联系人列表。

WebhookIdfloat

Webhook 告警联系人 ID。

123
WebhookNamestring

Webhook 告警联系人名称。

webhook名称
Webhookobject

Webhook 告警联系人详情。

Methodstring

HTTP 请求方法。

  • Get

  • Post

Post
Urlstring

请求方法 URL。

https://oapi.dingtalk.com/robot/send?access_token=91f2f6****
BizHeadersobject

HTTP 请求头。

[{"Content-Type":"application/json"}]
BizParamsobject

HTTP 请求参数。

[{"content:"mike"}]
Bodystring

告警通知模板。

{ "告警名称":"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}", "集群名称":"{{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}", "应用名称":"{{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}", "通知策略":"{{ .dispatchRuleName }}", "告警时间":"{{ .startTime }}", "告警内容":"{{ for .alerts }} {{ .annotations.message }} {{ end }}" }
RecoverBodystring

告警恢复模板。

{ "告警名称":"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}", "集群名称":"{{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}", "应用名称":"{{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}", "通知策略":"{{ .dispatchRuleName }}", "恢复时间":"{{ .endTime }}", "告警内容":"{{ for .alerts }} {{ .annotations.message }} {{ end }}" }

示例

正常返回示例

JSON格式

{
  "RequestId": "4D6C358A-A58B-4F4B-94CE-F5AAF023****",
  "PageBean": {
    "Total": 1,
    "Page": 1,
    "Size": 20,
    "WebhookContacts": [
      {
        "WebhookId": 123,
        "WebhookName": "webhook名称",
        "Webhook": {
          "Method": "Post",
          "Url": "https://oapi.dingtalk.com/robot/send?access_token=91f2f6****",
          "BizHeaders": [
            {
              "Content-Type": "application/json"
            }
          ],
          "BizParams": {
            "test": "test",
            "test2": 1
          },
          "Body": "{ \"告警名称\":\"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\", \"集群名称\":\"{{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\", \"应用名称\":\"{{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}\", \"通知策略\":\"{{ .dispatchRuleName }}\", \"告警时间\":\"{{ .startTime }}\", \"告警内容\":\"{{ for .alerts }} {{ .annotations.message }} {{ end }}\" }",
          "RecoverBody": "{ \"告警名称\":\"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\", \"集群名称\":\"{{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\", \"应用名称\":\"{{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}\", \"通知策略\":\"{{ .dispatchRuleName }}\", \"恢复时间\":\"{{ .endTime }}\", \"告警内容\":\"{{ for .alerts }} {{ .annotations.message }} {{ end }}\" }"
        }
      }
    ]
  }
}

错误码

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

变更历史

变更时间变更内容概要操作
2022-01-07OpenAPI 返回结构发生变更看变更集
变更项变更内容
出参OpenAPI 返回结构发生变更
  • 本页导读 (1)
文档反馈