Each alert resource type, such as users, policies, and templates, has a defined data structure consisting of resources and records.
Introduction
Alert resource data includes users, user groups, on-call groups, webhook integrations, alert policies such as route consolidation, inhibition, and silence policies, action policies, content templates, and other custom resource data.
Inhibition policies are not recommended.
Alert resource data is classified into two categories: resources and records. For example, a user is a resource, and the information about that user is a record.
|
Category |
Property |
Description |
|
Resource |
resource_name |
The name that identifies the resource. For example, the resource name of a user is sls.common.user. |
|
Record |
id |
The unique ID of the record. Data type: string. |
|
tag |
The tag of the record. Data type: string. |
|
|
value |
The complete value of the record. Data type: JSON string. |
Structure of alert resource data
|
Resource type |
resource_name field |
record_id field |
record_tag field |
Example |
Remarks |
|
User |
sls.common.user |
user_id |
user_name |
|
None |
|
User group |
sls.common.user_group |
user_group_id |
user_group_name |
|
None |
|
On-call group |
sls.alert.oncall_group |
oncall_id |
oncall_name |
|
This configuration is complex. We recommend that you use the console instead. |
|
Webhook integration |
sls.alert.action_webhook |
id |
name |
|
|
|
Alert policy |
sls.alert.alert_policy |
policy_id |
policy_name |
|
|
|
Action policy |
sls.alert.action_policy |
action_policy_id |
action_policy_name |
|
|
|
Content template |
sls.alert.content_template |
template_id |
template_name |
|
|
|
Default calendar |
sls.common.calendar |
calendar_id |
calendar_name |
|
|
DSL syntax description
The following sections show example DSL configurations for each policy type.
DSL configuration is complex. We recommend that you configure policies in the console first, then inspect the network request payload.




