Created
June 30, 2022 12:37
-
-
Save nikolaymatrosov/49a38ccde9291ecc73b791811c031a44 to your computer and use it in GitHub Desktop.
API Gateway example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: bot | |
frameworkVersion: "3" | |
provider: | |
name: yandex-cloud | |
runtime: golang117 | |
environment: | |
FOLDER_ID: b1g*** | |
httpApi: | |
payload: '1.0' | |
plugins: | |
- '@yandex-cloud/serverless-plugin' | |
package: | |
patterns: | |
- '!.idea' | |
- 'go.mod' | |
- 'functions/**' | |
- '!package*.json' | |
functions: | |
api: | |
handler: api.ApiHandler | |
memorySize: 128 | |
timeout: 30 | |
account: bot | |
events: | |
- http: | |
method: get | |
path: /api | |
telegram: | |
handler: telegram.TelegramHandler | |
memorySize: 128 | |
timeout: 30 | |
account: bot | |
events: | |
- http: | |
path: /telegram/{merchantID}/{channelID} | |
method: post | |
request: | |
parameters: | |
paths: | |
merchantID: true | |
channelID: true | |
resources: | |
bot: | |
type: yc::ServiceAccount | |
roles: | |
- editor | |
- serverless.functions.invoker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment