ALIYUN::EventBridge::Rule is used to create an event rule for an event bus.
Syntax
{
"Type": "ALIYUN::EventBridge::Rule",
"Properties": {
"Status": String,
"EventBusName": String,
"FilterPattern": Map,
"Description": String,
"Targets": List,
"RuleName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Status | String | No | Yes | The status of the event rule. | Valid values:
|
EventBusName | String | Yes | No | The name of the event bus. | For more information, see Limits. |
FilterPattern | Map | Yes | Yes | The event pattern. | The property value must be in the JSON format. You can specify field values in the
pattern in the following modes:
Note Each field in the pattern can contain up to five values.
|
Description | String | No | Yes | The description of the event rule. | None |
Targets | List | Yes | Yes | The event targets to which events that match the event rule are pushed. | For more information, see Targets properties. |
RuleName | String | Yes | No | The name of the event rule. | For more information, see Limits. |
Targets syntax
"Targets": [
{
"PushRetryStrategy": String,
"Type": String,
"Endpoint": String,
"Id": String,
"ParamList": List
}
]
Targets properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
PushRetryStrategy | String | No | No | The retry policy that is used to push events. | Valid values:
|
Type | String | Yes | No | The type of the event target. | None |
Endpoint | String | Yes | No | The endpoint of the event target. | None |
Id | String | Yes | No | The custom ID of the event target. | None |
ParamList | List | Yes | No | The parameters to be passed by events. | For more information, see ParamList properties. |
ParamList syntax
"ParamList": [
{
"Form": String,
"Value": String,
"ResourceKey": String,
"Template": String
}
]
ParamList properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Form | String | Yes | No | The transformation method. | For more information, see Event target parameters. |
Value | String | Yes | No | The parameter value in the transformed event. | None |
ResourceKey | String | Yes | No | The key of the resource involved in event transformation. | For more information, see Event target parameters. |
Template | String | No | No | The template based on which the event is transformed. | None |
Response parameters
Fn::GetAtt
- EventBusName: the name of the event bus.
- RuleARN: the Alibaba Cloud Resource Name (ARN) of the event rule. The ARN can be used for authorization.
- RuleName: the name of the event rule.
Example
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EventBusName": {
"Type": "String",
"Description": "The name of the event bus."
},
"Targets": {
"Type": "Json",
"Description": "The event target to which events are delivered.",
"MinLength": 1,
"MaxLength": 5
},
"RuleName": {
"Type": "String",
"Description": "The name of the event rule."
}
},
"Resources": {
"Rule": {
"Type": "ALIYUN::EventBridge::Rule",
"Properties": {
"EventBusName": {
"Ref": "EventBusName"
},
"Targets": {
"Ref": "Targets"
},
"RuleName": {
"Ref": "RuleName"
}
}
}
},
"Outputs": {
"EventBusName": {
"Description": "The name of the event bus.",
"Value": {
"Fn::GetAtt": [
"Rule",
"EventBusName"
]
}
},
"RuleARN": {
"Description": "The Alibaba Cloud Resource Name (ARN) of the event rule. The ARN is used for authorization.",
"Value": {
"Fn::GetAtt": [
"Rule",
"RuleARN"
]
}
},
"RuleName": {
"Description": "The name of the event rule.",
"Value": {
"Fn::GetAtt": [
"Rule",
"RuleName"
]
}
}
}
}