-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathACS::Notify::DingTalkWebhook.json
More file actions
182 lines (182 loc) · 5.13 KB
/
ACS::Notify::DingTalkWebhook.json
File metadata and controls
182 lines (182 loc) · 5.13 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"name-en": "ACS::Notify::DingTalkWebhook",
"name-zh-cn": "发送通知(DingTalk)",
"en": "Send notifications to DingTalk via webhook. For details, please see the <a href='https://open.dingtalk.com/document/isvapp/message-type' target='_blank'>documentation</a>",
"zh-cn": "通过webhook发送通知到DingTalk。详情请查看<a href='https://open.dingtalk.com/document/isvapp/message-type' target='_blank'>文档</a>"
},
"Parameters": {
"webhook": {
"Label": {
"en": "DingTalk Webhook",
"zh-cn": "DingTalk Webhook"
},
"Description": {
"en": "<a href='https://help.aliyun.com/zh/oos/use-cases/use-oos-to-configure-the-approval-process#section-iqc-0ul-vpy' target='_blank' >Get DingTalk Webhook</a>",
"zh-cn": "<a href='https://help.aliyun.com/zh/oos/use-cases/use-oos-to-configure-the-approval-process#section-iqc-0ul-vpy' target='_blank'>获取钉钉Webhook</a>"
},
"Type": "String",
"Default": "https://oapi.dingtalk.com/robot/send?access_token=12345678900000"
},
"msgtype": {
"Label": {
"en": "Message types",
"zh-cn": "消息类型"
},
"Description": {
"en": "Message types",
"zh-cn": "消息类型"
},
"Type": "String",
"AllowedValues": [
"text",
"link",
"markdown"
],
"Default": "text"
},
"text": {
"Label": {
"en": "Text param",
"zh-cn": "文本参数"
},
"Description": {
"en": "Text param. If msgtype is text, this field is needed",
"zh-cn": "文本参数。如果msgtype为text,则需要输入该字段"
},
"Type": "Json",
"Default": {
"content": "我就是我, 是不一样的烟火"
},
"AssociationPropertyMetadata": {
"Visible": {
"Condition": {
"Fn::Equals": [
"${msgtype}",
"text"
]
}
}
}
},
"link": {
"Label": {
"en": "Link param",
"zh-cn": "链接参数"
},
"Description": {
"en": "Link param. If msgtype is link, this field is needed",
"zh-cn": "链接参数。如果“msgtype”为“link”,则需要输入该字段"
},
"Type": "Json",
"Default": {
"text": "这是Link消息",
"title": "这是一个Link消息",
"picUrl": "https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png",
"messageUrl": "https://open.dingtalk.com/document/"
},
"AssociationPropertyMetadata": {
"Visible": {
"Condition": {
"Fn::Equals": [
"${msgtype}",
"link"
]
}
}
}
},
"markdown": {
"Label": {
"en": "MarkDown param",
"zh-cn": "MarkDown参数"
},
"Description": {
"en": "MarkDown param. If msgtype is markdown, this field is needed",
"zh-cn": "MarkDown参数。如果msgtype为markdown,则需要此字段"
},
"Type": "Json",
"Default": {
"title": "杭州天气",
"text": "#### 杭州天气 \n> 9度,西北风1级,空气良89,相对温度73%\n> \n> ###### 10点20分发布 [天气](https://www.dingalk.com)\n"
},
"AssociationPropertyMetadata": {
"Visible": {
"Condition": {
"Fn::Equals": [
"${msgtype}",
"markdown"
]
}
}
}
},
"at": {
"Label": {
"en": "@ people to read the notification",
"zh-cn": "@人们阅读通知"
},
"Description": {
"en": "@ people to read the notification",
"zh-cn": "@人们阅读通知"
},
"Type": "Json",
"Default": {
"atMobiles": [
"150XXXXXXXX"
],
"atUserIds": [
"user123"
],
"isAtAll": false
},
"AssociationPropertyMetadata": {
"Visible": {
"Condition": {
"Fn::Or": [
{
"Fn::Equals": [
"${msgtype}",
"text"
]
},
{
"Fn::Equals": [
"${msgtype}",
"markdown"
]
}
]
}
}
}
}
},
"Tasks": [
{
"Name": "notifyDingTaskWebhook",
"Action": "ACS::Notify",
"Description": {
"en": "Sends notification to DingTalk via webhook",
"zh-cn": "通过webhook发送通知到DingTalk"
},
"Properties": {
"NotifyType": "WebHook",
"WebHook": {
"URI": "{{ webhook }}",
"Headers": {
"Content-Type": "application/json"
},
"Content": {
"msgtype": "{{ msgtype }}",
"text": "{{ text }}",
"link": "{{ link }}",
"markdown": "{{ markdown }}",
"at": "{{ at }}"
}
}
}
}
]
}