Files
jd_scripts/serverless.yml
2020-11-13 18:45:18 +08:00

25 lines
930 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# serverless.yml
#组件信息
component: scf # (必选) 组件名称在该实例中为scf
name: jdscript # (必选) 组件实例名称。
#组件参数配置
inputs:
name: scf-${name} # 云函数名称,默认为 ${name}-${stage}-${app}
enableRoleAuth: true # 默认会尝试创建 SCF_QcsRole 角色,如果不需要配置成 false 即可
src: ./
handler: index.main_handler #入口
runtime: Nodejs12.16 # 运行环境 默认 Nodejs10.15
region: ap-guangzhou # 函数所在区域
description: This is a function in ${app} application.
memorySize: 64 # 内存大小单位MB
timeout: 900 # 超时时间,单位秒
events: # 触发器
- timer: # 定时触发器
parameters:
# name: timer # 触发器名称默认timer-${name}-${stage}
cronExpression: "0 0 0 */1 * * *" # 每天零点执行一次
enable: true
argument: argument # 额外的参数