You can create an action policy to manage the sending method, frequency, and recipients of alert notifications. This way, users can be notified of exceptions at the earliest opportunity. This topic describes how to create, modify, and delete an action policy.
Create an action policy
By default, the built-in alert rules of ActionTrail reference the SLS actiontrail builtin action policy. You can also create custom action policies based on your business requirements.
Log on to the ActionTrail console.
In the left-side navigation pane, click Alerts.
On the Alert Center page, choose .
Click Create.
In the Add Action Policy dialog box, configure the ID and Name parameters.
On the Primary Action Policy tab, create an action policy.
Click the
icon. Configure the conditions to trigger alert notifications and click Confirm.
Parameter
Description
Example
Condition
Valid values:
All: The action policy is executed only if all alerts in an alert set meet the specified condition.
Any: The action policy is executed if one or more of the alerts in an alert set meet the specified condition.
All
Conditional expression
Alerts that match a conditional expression are processed based on the action policy. You can specify an object, an operator, and an object value for the conditional expression.
Object: Alibaba Cloud Account ID
Operator: Equal to
Object value: 154035569884****
Mode
You can add multiple conditions in standard mode or advanced mode. Valid values:
Standard Mode: If you specify multiple conditions, the conditions are evaluated by using the AND operator.
Advanced Mode: If you specify multiple conditions, the conditions can be evaluated by using the AND or OR operator. You can also group multiple conditions into one group by using parentheses. Nested conditions are supported.
Standard Mode
Configure an action group.
Configure the notification method and related parameters. Supported notification methods include text messages, voice calls, emails, DingTalk, webhooks, and Message Center. For more information, see Notification methods.

Click the
icon for the Condition or Action Group dialog box to end the configuration. NoteIf you want to add more conditions and action groups, click the
icon. Optional. If you want to add more Condition and Action Group nodes after you click End, perform the following steps:
Delete an existing node.
Right-click the node and select Delete Node.
Add a node
Click the
icon to add a Condition node. Click the
icon to add an Action Group node. Click the
icon to add an End node.
Click Confirm.
Modify an action policy
Find the action policy that you want to modify and click Edit in the Actions column.
In the Edit Action Policy dialog box, modify the conditions and action groups.
Click Confirm.
Delete an action policy
Before you delete an action policy, make sure that the action policy is not referenced by alert rules. If you delete the action policy that is referenced by an alert rule, an exception will occur during the monitoring of events based on the alert rule.
By default, the built-in alert rules of ActionTrail reference the SLS actiontrail builtin action policy. To prevent alert notification exceptions, do not delete the SLS actiontrail builtin action policy.
Find the action policy that you want to delete and click Delete in the Actions column.
Click Confirm.
References
You can also use Simple Log Service to create action policies. For more information, see Create an action policy.