Skip to content

Commit

Permalink
fix: fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
dfounderliu committed Apr 8, 2020
1 parent dbac7b6 commit 8fe4030
Showing 1 changed file with 109 additions and 109 deletions.
218 changes: 109 additions & 109 deletions doc/serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,112 +6,112 @@ stage: dev

inputs:
name: myFunction1
enableRoleAuth: true
# 默认写法,新建特定命名的 cos bucket 并上传
src: ./code
# 指定 bucket name 和文件的方式,直接上传 cos 中的文件部署云函数
# src:
# bucket: tinatest # bucket name,当前会默认在bucket name后增加 appid 后缀, e.g. bucketname-appid
# object: 'code.zip' # bucket key 指定存储桶内的文件
# # 指定本地文件到 bucket
# src:
# bucket: tinatest # bucket name
# path: # 可选,指定本地路径
handler: index.main_handler
runtime: Nodejs8.9
region: ap-guangzhou
description: My Serverless Function
memorySize: 128
timeout: 20
environment:
variables:
TEST: value
vpcConfig:
subnetId: ''
vpcId: ''
tags:
key1: value1
key2: value2 # tags 的key value
events:
- timer:
name: timer
parameters:
cronExpression: '*/5 * * * *'
enable: true
- apigw:
name: serverless
parameters:
serviceId: service-8dsikiq6
protocols:
- http
description: the serverless service
environment: release
endpoints:
- path: /users
method: POST
- path: /test/{abc}/{cde}
apiId: api-id
method: GET
description: Serverless REST API
enableCORS: TRUE
responseType: HTML
serviceTimeout: 10
param:
- name: abc
position: PATH
required: 'TRUE'
type: string
defaultValue: abc
desc: mytest
- name: cde
position: PATH
required: 'TRUE'
type: string
defaultValue: abc
desc: mytest
function:
isIntegratedResponse: TRUE
functionQualifier: $LATEST
usagePlan:
usagePlanId: 1111
usagePlanName: slscmp
usagePlanDesc: sls create
maxRequestNum: 1000
auth:
serviceTimeout: 15
secretName: secret
secretIds:
- AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ
- apigw:
name: serverless_test
parameters:
serviceId: service-cyjmc4eg
protocols:
- http
description: the serverless service
environment: release
endpoints:
- path: /users
method: POST
- cos:
name: cli-appid.cos.ap-beijing.myqcloud.com
parameters:
bucket: cli-appid.cos.ap-beijing.myqcloud.com
filter:
prefix: filterdir/
suffix: .jpg
events: cos:ObjectCreated:*
enable: true
- cmq:
name: cmq_trigger
parameters:
name: test-topic-queue
enable: true
- ckafka:
name: ckafka_trigger
parameters:
name: ckafka-2o10hua5
topic: test
maxMsgNum: 999
offset: latest
enable: true
enableRoleAuth: true
# 默认写法,新建特定命名的 cos bucket 并上传
src: ./code
# 指定 bucket name 和文件的方式,直接上传 cos 中的文件部署云函数
# src:
# bucket: tinatest # bucket name,当前会默认在bucket name后增加 appid 后缀, e.g. bucketname-appid
# object: 'code.zip' # bucket key 指定存储桶内的文件
# # 指定本地文件到 bucket
# src:
# bucket: tinatest # bucket name
# path: # 可选,指定本地路径
handler: index.main_handler
runtime: Nodejs8.9
region: ap-guangzhou
description: My Serverless Function
memorySize: 128
timeout: 20
environment:
variables:
TEST: value
vpcConfig:
subnetId: ''
vpcId: ''
tags:
key1: value1
key2: value2 # tags 的key value
events:
- timer:
name: timer
parameters:
cronExpression: '*/5 * * * *'
enable: true
- apigw:
name: serverless
parameters:
serviceId: service-8dsikiq6
protocols:
- http
description: the serverless service
environment: release
endpoints:
- path: /users
method: POST
- path: /test/{abc}/{cde}
apiId: api-id
method: GET
description: Serverless REST API
enableCORS: TRUE
responseType: HTML
serviceTimeout: 10
param:
- name: abc
position: PATH
required: 'TRUE'
type: string
defaultValue: abc
desc: mytest
- name: cde
position: PATH
required: 'TRUE'
type: string
defaultValue: abc
desc: mytest
function:
isIntegratedResponse: TRUE
functionQualifier: $LATEST
usagePlan:
usagePlanId: 1111
usagePlanName: slscmp
usagePlanDesc: sls create
maxRequestNum: 1000
auth:
serviceTimeout: 15
secretName: secret
secretIds:
- AKIDNSdvdFcJ8GJ9th6qeZH0ll8r7dE6HHaSuchJ
- apigw:
name: serverless_test
parameters:
serviceId: service-cyjmc4eg
protocols:
- http
description: the serverless service
environment: release
endpoints:
- path: /users
method: POST
- cos:
name: cli-appid.cos.ap-beijing.myqcloud.com
parameters:
bucket: cli-appid.cos.ap-beijing.myqcloud.com
filter:
prefix: filterdir/
suffix: .jpg
events: cos:ObjectCreated:*
enable: true
- cmq:
name: cmq_trigger
parameters:
name: test-topic-queue
enable: true
- ckafka:
name: ckafka_trigger
parameters:
name: ckafka-2o10hua5
topic: test
maxMsgNum: 999
offset: latest
enable: true

0 comments on commit 8fe4030

Please sign in to comment.