-
Notifications
You must be signed in to change notification settings - Fork 37
/
snippets.json
249 lines (249 loc) · 7.99 KB
/
snippets.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
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
{
"Aliyun::Serverless::Service": {
"prefix": "Aliyun::FunctionCompute::Service",
"body": [
"${1:service}: # service name",
" Type: 'Aliyun::Serverless::Service'",
" ${2:function}: # function name",
" Type: 'Aliyun::Serverless::Function'",
" Properties:",
" Handler: index.handler",
" Runtime: nodejs8",
" CodeUri: '${3:./}' # code uri",
" MemorySize: 1024",
" Timeout: 15"
],
"description": "Aliyun::Serverless::Service"
},
"Aliyun::Serverless::Function": {
"prefix": "Aliyun::FunctionCompute::Function",
"body": [
"${1:function}: # function name",
" Type: 'Aliyun::Serverless::Function'",
" Properties:",
" Handler: index.handler",
" Runtime: nodejs8",
" CodeUri: '${2:./}' # code uri",
" MemorySize: 1024",
" Timeout: 15"
],
"description": "Aliyun::Serverless::Function"
},
"Aliyun::Serverless::CustomDomain::HTTP": {
"prefix": "Aliyun::FunctionCompute::CustomDomain::HTTP",
"body": [
"${1:domain}: # domain name",
" Type: 'Aliyun::Serverless::CustomDomain'",
" Properties:",
" Protocol: HTTP",
" RouteConfig:",
" routes:",
" '/':",
" ServiceName: ${2:service} # service name",
" FunctionName: ${3:function} # function name"
],
"description": "Aliyun::FunctionCompute::CustomDomain::HTTP"
},
"Aliyun::Serverless::CustomDomain::HTTPS": {
"prefix": "Aliyun::FunctionCompute::CustomDomain::HTTPS",
"body": [
"${1:domain}: # domain name",
" Type: 'Aliyun::Serverless::CustomDomain'",
" Properties:",
" Protocol: HTTP,HTTPS",
" CertConfig:",
" CertName: '${2:CertName}'",
" PrivateKey: '${3:privateKey.pem}'",
" Certificate: '${4:certificate.pem}'",
" RouteConfig:",
" routes:",
" '/':",
" ServiceName: ${5:service} # service name",
" FunctionName: ${6:function} # function name"
],
"description": "Aliyun::FunctionCompute::CustomDomain::HTTPS"
},
"Aliyun::Serverless::Api": {
"prefix": "Aliyun::FunctionCompute::Api",
"body": [
"StageName: ${1:prod}",
"DefinitionUri: ${2:swagger.yml}"
],
"description": "Aliyun::FunctionCompute::Api"
},
"Aliyun::Serverless::TableStore": {
"prefix": "Aliyun::FunctionCompute::TableStore",
"body": [
"${1:tablestore}: # tablestore name",
" Type: 'Aliyun::Serverless::TableStore'",
" Properties:",
" ClusterType: HYBRID",
" ${2:table}: # table name",
" Type: 'Aliyun::Serverless::TableStore::Table'",
" Properties:",
" PrimaryKeyList:",
" - Name: uid",
" Type: STRING"
],
"description": "Aliyun::Serverless::TableStore"
},
"Aliyun::Serverless::TableStore::Table": {
"prefix": "Aliyun::FunctionCompute::Table",
"body": [
"${1:table}: # table name",
" Type: 'Aliyun::Serverless::TableStore::Table'",
" Properties:",
" PrimaryKeyList:",
" - Name: uid",
" Type: STRING"
],
"description": "Aliyun::Serverless::TableStore::Table"
},
"Aliyun::Serverless::Log": {
"prefix": "Aliyun::FunctionCompute::Log",
"body": [
"${1:project}: # log project name",
" Type: 'Aliyun::Serverless::Log'",
" ${2:store}: # log store name",
" Type: 'Aliyun::Serverless::Log::Logstore'",
" Properties:",
" TTL: 10",
" ShardCount: 1"
],
"description": "Aliyun::Serverless::Log"
},
"Aliyun::Serverless::Log::Logstore": {
"prefix": "Aliyun::FunctionCompute::Logstore",
"body": [
"${1:store}: # log store name",
" Type: 'Aliyun::Serverless::Log::Logstore'",
" Properties:",
" TTL: 10",
" ShardCount: 1"
],
"description": "Aliyun::Serverless::Log::Logstore"
},
"Aliyun::Serverless::MNSTopic": {
"prefix": "Aliyun::FunctionCompute::MNSTopic",
"body": [
"${1:topic}: # mns topic name",
" Type: 'Aliyun::Serverless::MNSTopic'",
" Properties:",
" Region: cn-shanghai",
" MaximumMessageSize: 2048",
" LoggingEnabled: false"
],
"description": "Aliyun::Serverless::MNSTopic"
},
"Aliyun::FunctionCompute::TimerTrigger": {
"prefix": "Aliyun::FunctionCompute::TimerTrigger",
"body": [
"${1:trigger}: # trigger name",
" Type: Timer",
" Properties:",
" CronExpression: '0 0 8 * * *' # 函数被触发的时间",
" Enable: true",
" Payload: 'awesome-fc' # 触发器事件本身的输入内容"
],
"description": "Aliyun::FunctionCompute::TimerTrigger"
},
"Aliyun::FunctionCompute::HTTPTrigger": {
"prefix": "Aliyun::FunctionCompute::HTTPTrigger",
"body": [
"${1:trigger}: # trigger name",
" Type: HTTP # trigger type",
" Properties:",
" AuthType: ANONYMOUS",
" Methods: ['GET', 'POST', 'PUT']"
],
"description": "Aliyun::FunctionCompute::HTTPTrigger"
},
"Aliyun::FunctionCompute::LogTrigger": {
"prefix": "Aliyun::FunctionCompute::LogTrigger",
"body": [
"${1:trigger}: # trigger name",
" Type: Log",
" Properties:",
" SourceConfig:",
" Logstore: logstore1 # 数据源的 Logstore 名称",
" JobConfig:",
" MaxRetryTime: 1 # 最大尝试次数",
" TriggerInterval: 30 # 触发函数执行的间隔",
" LogConfig:",
" Project: testlog # 日志服务 Project 名称",
" Logstore: logstore2",
" Enable: true"
],
"description": "Aliyun::FunctionCompute::LogTrigger"
},
"Aliyun::FunctionCompute::RDSTrigger": {
"prefix": "Aliyun::FunctionCompute::RDSTrigger",
"body": [
"${1:trigger}: # trigger name",
" Type: RDS",
" Properties:",
" InstanceId: rm-12345799xyz # RDS 实例 ID",
" SubscriptionObjects:",
" - db1.table1 # 订阅对象,当前支持到表级别",
" Retry: 2",
" Concurrency: 1",
" EventFormat: json",
" TriggerInterval: 30 # 触发函数执行的间隔"
],
"description": "Aliyun::FunctionCompute::RDSTrigger"
},
"Aliyun::FunctionCompute::MNSTrigger": {
"prefix": "Aliyun::FunctionCompute::MNSTrigger",
"body": [
"${1:trigger}: # trigger name",
" Type: MNS",
" Properties:",
" TopicName: test-topic",
" Region: cn-shanghai",
" NotifyContentFormat: JSON",
" NotifyStrategy: BACKOFF_RETRY"
],
"description": "Aliyun::FunctionCompute::MNSTrigger"
},
"Aliyun::FunctionCompute::TableStoreTrigger": {
"prefix": "Aliyun::FunctionCompute::TableStoreTrigger",
"body": [
"${1:trigger}: # trigger name",
" Type: TableStore",
" Properties:",
" InstanceName: test-inst",
" TableName: test-tbl"
],
"description": "Aliyun::FunctionCompute::TableStoreTrigger"
},
"Aliyun::FunctionCompute::OSSTrigger": {
"prefix": "Aliyun::FunctionCompute::OSSTrigger",
"body": [
"${1:trigger}: # trigger name",
" Type: OSS",
" Properties:",
" BucketName: ossBucketName # oss bucket name",
" Events:",
" - oss:ObjectCreated:*",
" Filter:",
" Key:",
" Prefix: source/",
" Suffix: .png"
],
"description": "Aliyun::FunctionCompute::OSSTrigger"
},
"Aliyun::FunctionCompute::CDNTrigger": {
"prefix": "Aliyun::FunctionCompute::CDNTrigger",
"body": [
"${1:trigger}: # trigger name",
" Type: CDN",
" Properties:",
" EventName: LogFileCreated",
" EventVersion: '1.0.0'",
" Notes: cdn events trigger test",
" Filter:",
" Domain: ['fc.console.aliyun.com','ide.fc.aliyun.com/cn-hangzhou']"
],
"description": "Aliyun::FunctionCompute::CDNTrigger"
}
}