-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathserverless.component.yml
More file actions
344 lines (341 loc) · 10 KB
/
serverless.component.yml
File metadata and controls
344 lines (341 loc) · 10 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
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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
name: scf
version: 0.9.7
author: Tencent Cloud, Inc.
org: Tencent Cloud, Inc.
description: 单函数组件,允许用户开发部署单个腾讯 SCF 函数实例。适合进行单一函数开发的场景。如:定时触发任务。
keywords: tencent, serverless, SCF
repo: https://github.com/serverless-components/tencent-scf
readme: https://github.com/serverless-components/tencent-scf/tree/master/README.md
license: MIT
main: ./src
webDeployable: true
actions:
deploy:
definition: Deploy application to Tencent SCF
inputs:
src:
type: src
required: true
description: The folder containing the source code of application.
type:
type: string
allow:
- event
- web
name:
type: string
description: The name of Tencent SCF function.
regex: '^[A-Za-z][\w-_]{0,58}[A-Za-z0-9]$'
handler:
type: string
default: 'index.main_handler'
description: The handler of Tencent SCF function.
runtime:
type: string
description: SCF runtime
default: Nodejs10.15
allow: # The values that are allowed for this
- Python2.7
- Python3.6
- Python3.7
- Nodejs6.10
- Nodejs8.9
- Nodejs10.15
- Nodejs12.16
- Nodejs14.18
- Nodejs16.13
- Php5
- Php7
- Php7.4
- Php8.0
- Go1
- Java8
- Java11
- CustomRuntime
region:
type: string
default: ap-guangzhou
description: Region for SCF deployed to
memorySize:
type: number
description: SCF memory size
default: 128 # The default value
min: 64 # Minimum number allowed
max: 3072 # Maximum number allowed
allow: # The values that are allowed for this
- 64
- 128
- 256
- 384
- 512
- 640
- 768
- 896
- 1024
- 1152
- 1280
- 1408
- 1536
- 1664
- 1792
- 1920
- 2048
- 2176
- 2304
- 2432
- 2560
- 2688
- 2816
- 2944
- 3072
timeout:
type: number
min: 1
initTimeout:
type: number
min: 3
cfs:
type: array
items:
- type: object
keys:
cfsId:
type: string
required: true
mountInsId:
type: string
localMountDir:
type: string
required: true
remoteMountDir:
type: string
required: true
publicAccess:
type: boolean
eip:
type: boolean
installDependency:
type: boolean
asyncRunEnable:
type: boolean
l5Enable:
type: boolean
layers:
type: array
items:
- type: object
keys:
name:
type: string
required: true
version:
type: number
required: true
events:
type: array
items:
- type: object
keys:
timer:
type: object
keys:
parameters:
type: object
keys:
name:
type: string
enable:
type: boolean
default: true
cronExpression:
type: string
apigw:
type: object
keys:
parameters:
type: object
keys:
protocols:
type: array
items:
- type: string
allow:
- http
- https
netTypes:
type: array
default:
- OUTER
items:
- type: string
allow:
- OUTER
- INNER
description:
type: string
environment:
type: string
allow:
- release
- test
- prepub
endpoints:
type: array
items:
- type: object
keys:
path:
type: string
method:
type: string
enableCORS:
type: boolean
serviceId:
type: string
serviceName:
type: string
regex: '^[a-zA-Z][a-zA-Z0-9(_)]{0,48}[a-zA-Z0-9]?$'
cos:
type: object
keys:
parameters:
type: object
keys:
enable:
type: boolean
default: true
bucket:
type: string
filter:
type: object
keys:
prefix:
type: string
suffix:
type: string
events:
type: string
allow:
- 'cos:ObjectCreated:*'
- 'cos:ObjectCreated:Put'
- 'cos:ObjectCreated:Post'
- 'cos:ObjectCreated:Copy'
- 'cos:ObjectCreated:CompleteMultipartUpload'
- 'cos:ObjectCreated:Origin'
- 'cos:ObjectCreated:Replication'
- 'cos:ObjectRemove:*'
- 'cos:ObjectRemove:Delete'
- 'cos:ObjectRemove:DeleteMarkerCreated'
- 'cos:ObjectRestore:Post'
- 'cos:ObjectRestore:Completed'
ckafka:
type: object
keys:
parameters:
type: object
keys:
enable:
type: boolean
default: true
name:
type: string
topic:
type: string
retry:
type: number
maxMsgNum:
type: number
min: 1
max: 10000
offset:
type: string
allow:
- latest
- earliest
- timestamp
cmq:
type: object
keys:
parameters:
type: object
keys:
enable:
type: boolean
default: true
name:
type: string
cls:
type: object
keys:
parameters:
type: object
keys:
enable:
type: boolean
default: true
topicId:
type: string
maxWait:
type: number
min: 3
max: 300
mps:
type: object
keys:
parameters:
type: object
keys:
enable:
type: boolean
default: true
type:
type: string
allow:
- WorkflowTask
- EditMediaTask
clb:
type: object
keys:
parameters:
type: object
keys:
loadBalanceId:
type: string
required: true
protocol:
type: string
required: true
allow:
- HTTP
- HTTPS
port:
type: number
required: true
domain:
type: string
required: true
url:
type: string
required: true
weight:
type: number
min: 0
max: 100
remove:
definition: Remove your Express.js application
list_alias:
definition: Show your aliases
create_alias:
definition: Create alias for function
update_alias:
definition: Update alias for function
delete_alias:
definition: Delete alias for function
publish_ver:
definition: Publish a new version of function
invoke:
definition: Invoke function synchronously
log:
definition: Get function logs in 1hour
metric:
definition: Get function metrics