-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS-OOS-ExecuteTemplateBySystemEvent.json
110 lines (110 loc) · 2.75 KB
/
ACS-OOS-ExecuteTemplateBySystemEvent.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"en": "Execute specified template when system event happens. EventTrigger will always run until being canceled",
"zh-cn": "指定系统事件订阅规则,当系统事件发生时执行指定的模板。在主动取消前事件触发器会一直运行",
"name-en": "ACS-OOS-ExecuteTemplateBySystemEvent",
"name-zh-cn": "在系统事件发生时执行指定的模板",
"categories": [
"event-trigger"
]
},
"Parameters": {
"eventTriggerProperties": {
"Label": {
"en": "EventTriggerProperties",
"zh-cn": "事件触发任务的属性"
},
"Type": "Json",
"AssociationProperty": "ALIYUN::OOS::Event::EventTrigger"
},
"eventOutputTransformer": {
"Label": {
"en": "EventOutputTransformer",
"zh-cn": "系统事件消息体到模板调用参数的转换器"
},
"Type": "Json"
},
"templateName": {
"Label": {
"en": "TemplateName",
"zh-cn": "触发的模板名称"
},
"Type": "String",
"AssociationProperty": "TemplateName"
},
"tags": {
"Type": "Json",
"Label": {
"en": "InstanceTags",
"zh-cn": "实例的标签"
},
"AssociationProperty": "Tags",
"Default": []
},
"OOSAssumeRole": {
"Label": {
"en": "OOSAssumeRole",
"zh-cn": "OOS扮演的RAM角色"
},
"Type": "String",
"Default": "OOSServiceRole"
}
},
"RamRole": "{{ OOSAssumeRole }}",
"Tasks": [
{
"Name": "eventTrigger",
"Action": "ACS::EventTrigger",
"Properties": {
"Tags": "{{ tags }}",
"Product": {
"Fn::Select": [
"product",
"{{ eventTriggerProperties }}"
]
},
"Name": {
"Fn::Select": [
"name",
"{{ eventTriggerProperties }}"
]
},
"Level": {
"Fn::Select": [
"level",
"{{ eventTriggerProperties }}"
]
},
"Content": {
"Fn::Select": [
"content",
"{{ eventTriggerProperties }}"
]
},
"RegionId": [
"{{ ACS::RegionId }}"
],
"OutputTransformer": "{{ eventOutputTransformer }}"
},
"Outputs": {
"templateParameters": {
"Type": "Json",
"ValueSelector": "."
}
}
},
{
"Name": "executeTemplate",
"Action": "ACS::Template",
"Description": {
"en": "Execute template",
"zh-cn": "执行模板"
},
"Properties": {
"TemplateName": "{{ templateName }}",
"Parameters": "{{ eventTrigger.templateParameters }}"
}
}
]
}