すべてのプロダクト
Search
ドキュメントセンター

Application Real-Time Monitoring Service:CreateOrUpdateWebhookContact

最終更新日:Apr 10, 2026

Webhook アラート連絡先を作成または変更します。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

この操作の認証情報はありません。問題が発生した場合は、アカウントマネージャーにご連絡ください。

リクエストパラメーター

パラメーター

必須 / 任意

説明

WebhookId

integer

任意

Webhook アラート連絡先の ID です。

  • このパラメーターを指定しない場合、新しい Webhook アラート連絡先が作成されます。

  • このパラメーターを指定した場合、指定された Webhook アラート連絡先が変更されます。

123

WebhookName

string

必須

Webhook アラート連絡先の名前です。

Webhook告警

Method

string

必須

HTTP リクエストメソッドです。

  • Post

  • Get

Post

Url

string

必須

HTTP リクエストメソッドの URL です。

https://oapi.dingtalk.com/robot/send?access_token=e1a049121******

BizHeaders

string

任意

HTTP リクエストヘッダーです。

[{"Content-Type":"application/json;charset=utf-8"}]

BizParams

string

任意

HTTP リクエストのパラメーターです。

[{"content":"mike"}]

Body

string

任意

アラートがトリガーされたときに送信される通知テンプレートです。このパラメーターは、Method パラメーターが Post に設定されている場合に必須です。$content プレースホルダーを使用して通知内容を指定できます。内容は 500 文字を超えることはできません。詳細については、「通知テンプレートの変数説明」をご参照ください。\

{ "告警名称":"{{ .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

string

任意

アラートが解消されたときに送信される通知テンプレートです。このパラメーターは、Method パラメーターが Post に設定されている場合に必須です。$content プレースホルダーを使用して通知内容を指定できます。内容は 500 文字を超えることはできません。詳細については、「通知テンプレートの変数説明」をご参照ください。

{ "告警名称":"{{ .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 }}" }

レスポンスフィールド

フィールド

説明

object

応答のスキーマ

RequestId

string

リクエスト ID です。

16AF921B-8187-489F-9913-43C808B4****

WebhookContact

object

返された Webhook アラート連絡先です。

WebhookId

number

Webhook アラート連絡先の ID です。

123

WebhookName

string

Webhook アラート連絡先の名前です。

Webhook告警

Webhook

object

Webhook アラート連絡先の情報です。

Method

string

HTTP リクエストメソッドです。

  • Post

  • Get

Post

Url

string

リクエストメソッドの URL です。

https://oapi.dingtalk.com/robot/send?access_token=e1a049121******

BizHeaders

string

HTTP リクエストヘッダーです。

[{"Content-Type":"application/json;charset=utf-8"}]

BizParams

string

HTTP リクエストのパラメーターです。

[{"content":"mike"}]

Body

string

アラート通知テンプレートです。

{ "告警名称":"{{ .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

string

アラート解消の通知テンプレートです。

{ "告警名称":"{{ .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 }}" }

成功レスポンス

JSONJSON

{
  "RequestId": "16AF921B-8187-489F-9913-43C808B4****",
  "WebhookContact": {
    "WebhookId": 123,
    "WebhookName": "Webhook告警",
    "Webhook": {
      "Method": "Post",
      "Url": "https://oapi.dingtalk.com/robot/send?access_token=e1a049121******",
      "BizHeaders": "[{\"Content-Type\":\"application/json;charset=utf-8\"}]",
      "BizParams": "[{\"content\":\"mike\"}]",
      "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 }}\" }"
    }
  }
}

エラーコード

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。