Files
Esmart/serverless.yml
lychang 37af6c33ee init
2025-09-16 01:54:46 +08:00

34 lines
1.0 KiB
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.

app: demo
stage: dev
name: scf-python
component: scf
inputs:
src: ./
name: ${name}-${stage}-${app} # 云函数名称,默认为 ${name}-${stage}-${app}
description: Calendar API Serverless Function
handler: index.main_handler
runtime: Python3.6
namespace: default
region: ap-guangzhou
type: event # 函数类型,默认为 event(事件类型)web(web类型)
memorySize: 128 # 内存大小单位MB
timeout: 900 # 函数执行超时时间,单位秒
initTimeout: 300 # 初始化超时时间,单位秒
vpcConfig: # 私有网络配置
vpcId: vpc-q1m7ajxh # 私有网络的Id
subnetId: subnet-9ehoo5vi # 子网ID
events: # 触发器
- http:
parameters:
qualifier: $LATEST # 别名配置
enable: true # 是否启用此触发器
timeout: 300 # 触发器超时时间,单位秒
authType: NONE # 身份认证
netConfig:
enableExtranet: true # 开启外网访问
enableIntranet: true # 开启内网访问