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

Application Real-Time Monitoring Service:ListNotificationPolicies

最終更新日:Apr 10, 2026

指定された条件に基づいて通知ポリシーをクエリします。

今すぐお試しください

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

テスト

RAM 認証

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

リクエストパラメーター

パラメーター

必須 / 任意

説明

Name

string

任意

通知ポリシーの名前。

notificationpolicy_test

Page

integer

必須

返すページ番号。

1

Size

integer

必須

各ページで返すエントリ数。

20

IsDetail

boolean

任意

通知ポリシーの詳細をクエリするかどうかを指定します。 有効な値:

  • true:通知ポリシーの詳細がクエリされます。

  • false:通知ポリシーの詳細はクエリされません。

false

RegionId

string

任意

リージョン ID。 デフォルト値:cn-hangzhou

cn-hangzhou

Ids

string

任意

通知ポリシーの ID。

12345

DirectedMode

boolean

任意

シンプルモードを有効にするかどうかを指定します。

true

レスポンスフィールド

フィールド

説明

object

応答のスキーマ

RequestId

string

リクエスト ID。

78901766-3806-4E96-8E47-CFEF59E4****

PageBean

object

返されたページ。

Total

integer

返される通知ポリシーの数。

24

Page

integer

返されたページ番号。

1

Size

integer

各ページで返されるエントリ数。

20

NotificationPolicies

array<object>

クエリされた通知ポリシー。

array<object>

Id

integer

通知ポリシーの ID。

1234

Name

string

通知ポリシーの名前。

notificationpolicy_test

MatchingRules

array<object>

アラートイベントの照合ルール。

array<object>

MatchingConditions

array<object>

マッチング条件。

object

Key

string

マッチング条件のキー。

altertname

Value

string

マッチング条件の値。

test

Operator

string

マッチング条件の論理演算子。 有効な値:

  • eq:等しい

  • neq:等しくない

  • in:含む

  • nin:含まない

  • re:正規表現に一致

  • nre:正規表現に不一致

eq

SendRecoverMessage

boolean

アラートに関連するすべてのイベントが復元済みの状態に変わったときに、アラートのステータスが自動的に解決済みに変更されるかどうかを示します。 アラートのステータスが解決済みに変更されると、システムはアラート連絡先に通知を送信します。

  • true (デフォルト):システムは通知を送信します。

  • false:システムは通知を送信しません。

true

GroupRule

object

アラートイベントのグループ化ルール。

GroupingFields

array

アラートイベントグループオブジェクトの配列。

  • groupingFields フィールドを指定しない場合、すべてのアラートは alertname に基づいて連絡先に送信されます。

  • groupingFields フィールドを指定すると、同じフィールドを持つアラートが 1 つの通知で連絡先に送信されます。

string

グループ化に使用されるフィールド。

["alertname"]

GroupWait

integer

グループ化の待機時間。 単位:秒。 デフォルト値:5。

5

GroupInterval

integer

グループ化の時間間隔。 単位:秒。 デフォルト値:30。

30

NotifyRule

object

通知ルール。

NotifyStartTime

string

通知ウィンドウの開始時刻。

00:00

NotifyEndTime

string

通知ウィンドウの終了時刻。

23:59

NotifyChannels

array

通知方法。

string

通知方法。 有効な値:

  • dingTalk:DingTalk

  • email:メール

  • sms:テキストメッセージ

  • tts:音声通話

  • webhook:Webhook

[ "dingTalk", "email", "sms", "tts","webhook" ]

NotifyObjects

array<object>

通知オブジェクト。

object

NotifyObjectType

string

通知オブジェクトのタイプ。 有効な値:

  • CONTACT:個人の連絡先

  • CONTACT_GROUP:連絡先グループ

  • DING_ROBOT:インスタントメッセージ (IM) チャットボット

  • CONTACT_SCHEDULE:確立されたスケジュールに基づく担当者

CONTACT

NotifyObjectId

integer

通知オブジェクトの ID。

123

NotifyObjectName

string

通知オブジェクトの名前。

test

NotifyChannels

array

連絡先に指定された通知方法。

string

通知方法。

  • email:メール

  • sms:テキストメッセージ

  • tts:音声通話

[ "email", "sms", "tts" ]

NotifyTemplate

object

通知テンプレート。

EmailTitle

string

メールで送信されるアラート通知の件名。

{{ .commonLabels.alertname }}

EmailContent

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 }} {{if .generatorURL }} 详情链接 {{ end }} {{ end }}

EmailRecoverTitle

string

メールで送信されるアラート解決通知の件名。

{{ .commonLabels.alertname }}

EmailRecoverContent

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 }} {{if .generatorURL }} 详情链接 {{ end }} {{ end }}

SmsContent

string

テキストメッセージで送信されるアラート通知の本文。

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

SmsRecoverContent

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

TtsContent

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

TtsRecoverContent

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

RobotContent

string

IM チャットボットで送信されるアラート通知の本文。

{{if .commonLabels.clustername }} > 集群名称:{{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} > 应用名称:{{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}{{ for .alerts }} > {{ .annotations.message }} {{if .generatorURL }} [详情链接]({{.generatorURL}}) {{end}} {{if eq "true" .labels._aliyun_arms_is_denoise_filtered }} (疑似噪音) {{end}} {{end}}

Repeat

boolean

未解決のまま長時間続くアラートに対して、システムが通知を再送するかどうかを示します。 有効な値:

  • true (デフォルト):システムは、指定された時間間隔で、未解決のまま長時間続くアラートの通知を再送します。

  • false:システムは、エスカレーションポリシーに基づいて、未解決のまま長時間続くアラートの通知を再送します。

true

RepeatInterval

integer

未解決のまま長時間続くアラートの通知が再送される時間間隔。 単位:秒。

600

EscalationPolicyId

integer

エスカレーションポリシーの ID。

123

IntegrationId

integer

アラートがプッシュされるチケットシステムの連携 ID。

34

DirectedMode

boolean

シンプルモードが有効になっているかどうかを示します。

true

State

string

通知ポリシーが有効になっているかどうかを示します。 有効な値:enable および disable。

enable

成功レスポンス

JSONJSON

{
  "RequestId": "78901766-3806-4E96-8E47-CFEF59E4****",
  "PageBean": {
    "Total": 24,
    "Page": 1,
    "Size": 20,
    "NotificationPolicies": [
      {
        "Id": 1234,
        "Name": "notificationpolicy_test",
        "MatchingRules": [
          {
            "MatchingConditions": [
              {
                "Key": "altertname",
                "Value": "test",
                "Operator": "eq"
              }
            ]
          }
        ],
        "SendRecoverMessage": true,
        "GroupRule": {
          "GroupingFields": [
            "[\"alertname\"]"
          ],
          "GroupWait": 5,
          "GroupInterval": 30
        },
        "NotifyRule": {
          "NotifyStartTime": "00:00",
          "NotifyEndTime": "23:59",
          "NotifyChannels": [
            "[ \"dingTalk\",  \"email\",  \"sms\", \"tts\",\"webhook\" ]"
          ],
          "NotifyObjects": [
            {
              "NotifyObjectType": "CONTACT",
              "NotifyObjectId": 123,
              "NotifyObjectName": "test",
              "NotifyChannels": [
                "[                                \"email\",                         \"sms\",                         \"tts\"                                 ]"
              ]
            }
          ]
        },
        "NotifyTemplate": {
          "EmailTitle": "{{ .commonLabels.alertname }}",
          "EmailContent": "告警名称:{{ .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 }}  {{if .generatorURL }}   详情链接  {{ end }} {{ end }}",
          "EmailRecoverTitle": "{{ .commonLabels.alertname }}",
          "EmailRecoverContent": "告警名称:{{ .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 }}  {{if .generatorURL }}  详情链接  {{ end }} {{ end }}",
          "SmsContent": "发生{{ .level }}告警 告警名称:{{ .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 }}",
          "SmsRecoverContent": "告警已经恢复 告警名称:{{ .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 }}",
          "TtsContent": "告警名称:{{ .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 }}",
          "TtsRecoverContent": "告警名称:{{ .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 }}",
          "RobotContent": "{{if .commonLabels.clustername }}   >  集群名称:{{ .commonLabels.clustername }}    {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}   >  应用名称:{{ .commonLabels._aliyun_arms_involvedObject_name }}    {{ end }}{{ for .alerts }} >  {{ .annotations.message }} {{if .generatorURL }} [详情链接]({{.generatorURL}}) {{end}} {{if  eq \"true\" .labels._aliyun_arms_is_denoise_filtered }} (疑似噪音) {{end}}  {{end}}"
        },
        "Repeat": true,
        "RepeatInterval": 600,
        "EscalationPolicyId": 123,
        "IntegrationId": 34,
        "DirectedMode": true,
        "State": "enable"
      }
    ]
  }
}

エラーコード

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

変更履歴

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