All Products
Search
Document Center

Application Real-Time Monitoring Service:CreateOrUpdateNotificationPolicy

Last Updated:May 09, 2024

Creates or modifies a notification policy.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
arms:CreateDispatchRuleWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
IdlongNo

The ID of the notification policy.

  • If you do not specify this parameter, a new notification policy is created.
  • If you specify this parameter, the specified notification policy is modified.
1234
NamestringYes

The name of the notification policy.

notificationpolicy_test
MatchingRulesstringNo

The matching rules. Sample statement:


[
 {
 "matchingConditions": [
 { 
 "value": "test",    // The value of the matching condition. 
 "key": "alertname",     // The key of the matching condition. 
 "operator": "eq"   // The logical operator of the matching condition, including eq (equal to), neq (not equal to), in (contains), nin (does not contain), re (regular expression match), and nre (regular expression mismatch).   
 }
 ]
 } 
 ]
[ { "matchingConditions": [ { "value": "test", "key": "alertname", "operator": "eq" } ] } ]
SendRecoverMessagebooleanNo

Indicates whether the system sends a notification to the contacts when the status of an alert changes to Resolved. Default value: true. Valid values:

  • true: The system sends a notification.
  • false: The system does not send a notification.
true
GroupRulestringNo

An array of alert event group objects.

  • If you do not specify the groupingFields field, all alerts will be sent to contacts based on alertname.

  • If you specify the groupingFields field, alerts with the same field will be sent to contacts in one notification.

    Sample statement:


{ 
"groupWait":5,    // The waiting time for grouping. 
"groupInterval":30,     // The time interval of grouping. 
"groupingFields":["alertname"]       // The field that is used to group alert events. 
}
{ "groupWait":5, "groupInterval":30, "groupingFields":["alertname"] }
NotifyRulestringYes

An array of notification rule objects. Format:

{ 
 "notifyStartTime":"00:00",      // The start time of the notification window. 
 "notifyEndTime":"23:59",       // The end time of the notification window. 
 "notifyChannels":["dingTalk", "email", "sms", "tts", "webhook"],       // The notification methods. Valid values: dingTalk, email, sms, tts, and webhook. 
 "notifyObjects":[{       // An array of notification objects. 
 "notifyObjectType":"CONTACT",       // The type of the notification object. Valid values: CONTACT (contact), CONTACT_GROUP (contact group), ARMS_CONTACT (ARMS contact), ARMS_CONTACT_GROUP (ARMS contact group), DING_ROBOT_GROUP (DingTalk, Lark, WeCom, or IM chatbot), and CONTACT_SCHEDULE (user on duty defined by a schedule). 
 "notifyObjectId":123,       // The ID of the notification object. 
 "notifyObjectName":"test"       // The name of the notification object. 
 "notifyChannels": [ // The notification methods specified for a contact. Valid values: email, sms, and tts.
                "email",		
                "sms",
                "tts"
            ],
 }]
{ "notifyStartTime":"00:00", "notifyEndTime":"23:59", "notifyChannels":[ "dingTalk", "email", "sms", "tts", "webhook" ], "notifyObjects":[ { "notifyObjectType":"CONTACT", "notifyObjectId":123, "notifyObjectName":"test" } ] }
NotifyTemplatestringNo

The notification template. The default notification template is provided below the table.

{{if .commonLabels.clustername }} > Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} > App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}{{ for .alerts }} > {{ .annotations.message }} {{if .generatorURL }} [Details]({{.generatorURL}}) {{end}} {{if .annotations._aliyun_arms_insights_analyze_link }}[<font color='#ff0000'>diagnostic analysis</font>]({{ .annotations._aliyun_arms_insights_analyze_link}}){{ end }}{{if eq "1" .labels._aliyun_arms_denoise_code }} (Important:{{.labels._aliyun_arms_important_reason }}) {{end}} {{end}}
EscalationPolicyIdlongNo

The ID of the escalation policy.

123
RepeatbooleanNo

Specifies whether to resend a notification for a long-lasting unresolved alert. Default value: true. Valid values:

  • true: If you set this parameter to true, you must set RepeatInterval.
  • false: If you set this parameter to false, you must set EscalationPolicyId.
true
RepeatIntervallongNo

The time interval at which a notification is resent for a long-lasting unresolved alert. Unit: seconds.

600
IntegrationIdlongNo

The integration ID of the ticket system to which alerts are pushed.

34
RegionIdstringNo

The ID of the region.

cn-hangzhou
DirectedModebooleanNo

Specifies whether to enable simple mode.

Default notification template specified by the NotifyTemplate field


{
// An alert notification sent through email
"emailTitle":"{{ .commonLabels.alertname }}",

"emailContent":"Alert name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} Application name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification policy: {{ .dispatchRuleName }} Alert time: {{ .startTime }} Alert content: {{ for .alerts }} {{.annotations.message}} {{if .generatorURL }} <a href="{{.generatorURL}}" >Link</a> {{ end }} {{ end }}",

// An alert resolution notification sent through email
"emailRecoverTitle":"{{ .commonLabels.alertname }}",

"emailRecoverContent":"Alert name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} Application name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification policy: {{ .dispatchRuleName }} Alert resolution time: {{ .endTime }} Alert content: {{ for .alerts }} {{.annotations.message}} {{if .generatorURL }} <a href="{{.generatorURL}}" >Link</a> {{ end }} {{ end }}",

// An alert notification sent through text message
"smsContent":"Notification on the occurrence of a {{ .level }} alert. Alert name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} Application name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification policy: {{ .dispatchRuleName }} Alert time: {{ .startTime }} Alert content: {{ for .alerts }} {{.annotations.message}} {{ end }}}}",

// An alert resolution notification sent through text message
"smsRecoverContent":"Alert resolution notification. Alert name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} Application name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification policy: {{ .dispatchRuleName }} Alert resolution time: {{ .endTime }} Alert content: {{ for .alerts }} {{.annotations.message}} {{ end }}",

// An alert notification by phone
"tsContent":"Alert name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} Application name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification policy: {{ .dispatchRuleName }} Alert time: {{ .startTime }} Alert content: {{ for .alerts }} {{.annotations.message}} {{ end }}",

// An alert resolution notification by phone
"ttsRecoverContent":"Alert name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} Application name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification policy: {{ .dispatchRuleName }} Alert resolution time: {{ .endTime }} Alert content: {{ for .alerts }} {{.annotations.message}} {{ end }}",

// An alert notification sent by the instant message (IM) robot
"robotContent":"{{if .commonLabels.clustername }}   >  Cluster name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}   >  Application name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}{{ for .alerts }} >  {{.annotations.message}} {{if .generatorURL }}  [Link]({{.generatorURL}})  {{ end }} {{if eq "true" .labels._aliyun_arms_is_denoise_filtered }} (Suspected noise) {{end}}  {{end}}"

}

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

A5EC8221-08F2-4C95-9AF1-49FD998C****
NotificationPolicyobject

An array of notification policy objects.

Idlong

The ID of the notification policy.

1234
Namestring

The name of the notification policy.

notificationpolicy_test
MatchingRulesobject []

An array of alert event matching rule objects.

MatchingConditionsobject []

An array of alert event matching condition objects.

Keystring

The key of the matching condition.

altertname
Valuestring

The value of the matching condition.

test
Operatorstring

The logical operator of the matching condition. Valid values:

  • eq: equal to
  • neq: not equal to
  • in: contains
  • nin: does not contain
  • re: regular expression match
  • nre: regular expression mismatch
eq
SendRecoverMessageboolean

Indicates whether the system sends a notification to the contacts when the status of an alert changes to Resolved. Default value: true. Valid values:

  • true: The system sends a notification.
  • false: The system does not send a notification.
true
GroupRuleobject

An array of alert event group objects.

GroupingFieldsarray

The field that is used for grouping.

string

The field that is used for grouping.

["alertName","clustname"]
GroupWaitlong

The waiting time for grouping. Unit: seconds. Default value: 5.

5
GroupIntervallong

The time interval of grouping. Unit: seconds. Default value: 30.

30
NotifyRuleobject

An array of notification rule objects.

NotifyStartTimestring

The start time of the notification window.

00:00
NotifyEndTimestring

The end time of the notification window.

23:59
NotifyChannelsarray

The notification methods. Valid values:

  • dingTalk: DingTalk
  • email: email
  • sms: text message
  • tts: phone call
  • webhook: webhook
string

The notification methods. Valid values:

  • dingTalk: DingTalk
  • email: email
  • sms: text message
  • tts: phone call
  • webhook: webhook
["dingTalk", "email", "sms", "tts", "webhook"]
NotifyObjectsobject []

An array of notification contact objects.

NotifyObjectTypestring

The type of the notification contact. Valid values:

  • CONTACT: an individual contact
  • CONTACT_GROUP: a contact group
  • DING_ROBOT: an instant messaging (IM) robot
  • CONTACT_SCHEDULE: a person on duty based on an established schedule
CONTACT
NotifyObjectIdlong

The ID of the notification contact.

123
NotifyObjectNamestring

The name of the notification contact.

test
NotifyTemplateobject

An array of notification template objects.

EmailTitlestring

The title of the alert notification sent through email.

{{ .commonLabels.alertname }}
EmailContentstring

The content of the alert notification sent through email.

Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification Policy: {{ .dispatchRuleName }} Alert Time: {{ .startTime }} Description: {{ for .alerts }} {{ .annotations.message }} {{if .generatorURL }} &lt;a href="{{.generatorURL}}" > Details&lt;/a&gt; {{ end }} {{ end }}
EmailRecoverTitlestring

The title of the alert resolution notification sent through email.

{{ .commonLabels.alertname }}
EmailRecoverContentstring

The content of the alert resolution notification sent through email.

Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification Policy: {{ .dispatchRuleName }} Recover Time: {{ .endTime }} Description: {{ for .alerts }} {{ .annotations.message }} {{if .generatorURL }} &lt;a href="{{.generatorURL}}" > Details&lt;/a&gt; {{ end }} {{ end }}
SmsContentstring

The content of the alert notification sent through text message.

{{ .level }}Alert Occurs Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification Policy: {{ .dispatchRuleName }} Alert Time: {{ .startTime }} Description: {{ for .alerts }} {{ .annotations.message }} {{ end }}
SmsRecoverContentstring

The content of the alert resolution notification sent through text message.

Alert Recovery Notification Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification Policy: {{ .dispatchRuleName }} Recover Time: {{ .endTime }} Description: {{ for .alerts }} {{ .annotations.message }} {{ end }}
TtsContentstring

The content of the alert notification by phone.

Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification Policy: {{ .dispatchRuleName }} Alert Time: {{ .startTime }} Description: {{ for .alerts }} {{ .annotations.message }} {{ end }}
TtsRecoverContentstring

The content of the alert resolution notification by phone.

Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }} Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }} Notification Policy: {{ .dispatchRuleName }} Recover Time: {{ .endTime }} Description: {{ for .alerts }} {{ .annotations.message }} {{ end }}
RobotContentstring

The content of the alert notification sent by the IM robot.

{{if .commonLabels.clustername }} &gt; Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }} &gt; App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}{{ for .alerts }} &gt; {{ .annotations.message }} {{if .generatorURL }} [Details]({{.generatorURL}}) {{end}} {{if .annotations._aliyun_arms_insights_analyze_link }}[&lt;font color='#ff0000'&gt;diagnostic analysis&lt;/font&gt;]({{ .annotations._aliyun_arms_insights_analyze_link}}){{ end }}{{if eq "1" .labels._aliyun_arms_denoise_code }} (Important:{{.labels._aliyun_arms_important_reason }}) {{end}} {{end}}
EscalationPolicyIdlong

The ID of the escalation policy.

123
Repeatboolean

Indicates whether a notification is resent for a long-lasting unresolved alert. Default value: true. Valid values:

  • true: The system resends a notification for a long-lasting unresolved alert at a specified time interval.
  • false: The system sends a notification for a long-lasting unresolved alert based on an escalation policy.
true
RepeatIntervallong

The time interval at which a notification is resent for a long-lasting unresolved alert. Unit: seconds.

600
IntegrationIdlong

The integration ID of the ticket system to which alerts are pushed.

34

//Email Content

{{ .commonLabels.alertname }}

Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}
Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}
App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}
Notification Policy: {{ .dispatchRuleName }}
Alert Time: {{ .startTime }}
Description: {{ for .alerts }} {{ .annotations.message }}  {{if .generatorURL }}  <a href="{{.generatorURL}}" > Details</a>
 {{ end }} {{ end }}

//Email Recover Content

{{ .commonLabels.alertname }}

Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}
Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}
App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}
Notification Policy: {{ .dispatchRuleName }}
Recover Time: {{ .endTime }}
Description: {{ for .alerts }} {{ .annotations.message }}  {{if .generatorURL }} <a href="{{.generatorURL}}" > Details</a>
 {{ end }} {{ end }}

//Sms Content

{{ .level }}Alert Occurs
Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}
Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}
App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}
Notification Policy: {{ .dispatchRuleName }}
Alert Time: {{ .startTime }}
Description: {{ for .alerts }} {{ .annotations.message }} {{ end }}

//Sms RecoverContent

Alert Recovery Notification
Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}
Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}
App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}
Notification Policy: {{ .dispatchRuleName }}
Recover Time: {{ .endTime }}
Description: {{ for .alerts }} {{ .annotations.message }} {{ end }}

//Tts Content

Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}
Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}
App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}
Notification Policy: {{ .dispatchRuleName }}
Alert Time: {{ .startTime }}
Description: {{ for .alerts }} {{ .annotations.message }} {{ end }}

//Tts RecoverContent

Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}
Cluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}
App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}
Notification Policy: {{ .dispatchRuleName }}
Recover Time: {{ .endTime }}
Description: {{ for .alerts }} {{ .annotations.message }} {{ end }}

//RobotContent

{{if .commonLabels.clustername }}

 >  Cluster Name: {{ .commonLabels.clustername }} 

 {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}

 >  App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} 

 {{ end }}{{ for .alerts }} >  {{ .annotations.message }} {{if .generatorURL }}  [Details]({{.generatorURL}})   {{end}} {{if .annotations._aliyun_arms_insights_analyze_link }}[<font color='#ff0000'>diagnostic analysis</font>]({{ .annotations._aliyun_arms_insights_analyze_link}}){{ end }}{{if  eq "1" .labels._aliyun_arms_denoise_code }} (Important:{{.labels._aliyun_arms_important_reason }}) {{end}}

{{end}}

Examples

Sample success responses

JSONformat

{
  "RequestId": "A5EC8221-08F2-4C95-9AF1-49FD998C****",
  "NotificationPolicy": {
    "Id": 1234,
    "Name": "notificationpolicy_test",
    "MatchingRules": [
      {
        "MatchingConditions": [
          {
            "Key": "altertname",
            "Value": "test",
            "Operator": "eq"
          }
        ]
      }
    ],
    "SendRecoverMessage": true,
    "GroupRule": {
      "GroupingFields": [
        "[\"alertName\",\"clustname\"]"
      ],
      "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": [
            ""
          ]
        }
      ]
    },
    "NotifyTemplate": {
      "EmailTitle": "{{ .commonLabels.alertname }}",
      "EmailContent": "Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\nCluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\nApp Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}\nNotification Policy: {{ .dispatchRuleName }}\nAlert Time: {{ .startTime }}\nDescription: {{ for .alerts }} {{ .annotations.message }}  {{if .generatorURL }}  &lt;a href=\"{{.generatorURL}}\" > Details&lt;/a&gt;\n {{ end }} {{ end }}",
      "EmailRecoverTitle": "{{ .commonLabels.alertname }}",
      "EmailRecoverContent": "Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\nCluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\nApp Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}\nNotification Policy: {{ .dispatchRuleName }}\nRecover Time: {{ .endTime }}\nDescription: {{ for .alerts }} {{ .annotations.message }}  {{if .generatorURL }} &lt;a href=\"{{.generatorURL}}\" > Details&lt;/a&gt;\n {{ end }} {{ end }}",
      "SmsContent": "{{ .level }}Alert Occurs\nAlert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\nCluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\nApp Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}\nNotification Policy: {{ .dispatchRuleName }}\nAlert Time: {{ .startTime }}\nDescription: {{ for .alerts }} {{ .annotations.message }} {{ end }}",
      "SmsRecoverContent": "Alert Recovery Notification\nAlert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\nCluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\nApp Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}\nNotification Policy: {{ .dispatchRuleName }}\nRecover Time: {{ .endTime }}\nDescription: {{ for .alerts }} {{ .annotations.message }} {{ end }}",
      "TtsContent": "Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\nCluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\nApp Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}\nNotification Policy: {{ .dispatchRuleName }}\nAlert Time: {{ .startTime }}\nDescription: {{ for .alerts }} {{ .annotations.message }} {{ end }}",
      "TtsRecoverContent": "Alert Name: {{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\nCluster Name: {{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\nApp Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}\nNotification Policy: {{ .dispatchRuleName }}\nRecover Time: {{ .endTime }}\nDescription: {{ for .alerts }} {{ .annotations.message }} {{ end }}",
      "RobotContent": "{{if .commonLabels.clustername }}\n\n &gt;  Cluster Name: {{ .commonLabels.clustername }} \n\n {{ end }}{{if eq \"app\" .commonLabels._aliyun_arms_involvedObject_kind }}\n\n &gt;  App Name: {{ .commonLabels._aliyun_arms_involvedObject_name }} \n\n {{ end }}{{ for .alerts }} &gt;  {{ .annotations.message }} {{if .generatorURL }} [Details]({{.generatorURL}})  {{end}} {{if .annotations._aliyun_arms_insights_analyze_link }}[&lt;font color='#ff0000'&gt;diagnostic analysis&lt;/font&gt;]({{ .annotations._aliyun_arms_insights_analyze_link}}){{ end }}{{if  eq \"1\" .labels._aliyun_arms_denoise_code }} (Important:{{.labels._aliyun_arms_important_reason }}) {{end}}\n\n{{end}}"
    },
    "EscalationPolicyId": 123,
    "Repeat": true,
    "RepeatInterval": 600,
    "IntegrationId": 34,
    "DirectedMode": true
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-17The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: DirectedMode
Output ParametersThe response structure of the API has changed.
2023-03-30The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2022-02-24Add Operationsee changesets