feat: add fun template.yml

This commit is contained in:
2020-11-22 12:15:47 +08:00
parent 7cda98a9b8
commit ad155bcff4
4 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
ROSTemplateFormatVersion: '2015-09-01'
Transform: 'Aliyun::Serverless-2018-04-03'
Resources:
{{fnservice}}:
Type: 'Aliyun::Serverless::Service'
Properties:
Description: '{{description}}'
{{fnfunction}}:
Type: 'Aliyun::Serverless::Function'
Properties:
Handler: index.handler
MemorySize: 128
CodeUri: './code.zip'
Description: '{{description}}'
Runtime: custom
{% if fnevent != "None" -%}
Events:
{{fnevent}}:
Type: HTTP
Properties:
AuthType: ANONYMOUS
Methods: ['GET', 'POST', 'PUT']
{%- endif %}