-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
153 lines (146 loc) · 5.52 KB
/
serverless.yml
File metadata and controls
153 lines (146 loc) · 5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
service: python-functions-test1
frameworkVersion: '2'
provider:
name: azure
region: West US 2
runtime: python3.8 # python3.7 or python3.8 also available
os: linux # linux is the only operating system available for python
prefix: time-tracker
environment: # these will be created as application settings
COSMOS_DATABASE_URI: ${file(keys.yml):COSMOS_DATABASE_URI}
plugins:
- serverless-azure-functions
- serverless-offline-python
package:
# include:
# - include-me.py
# - include-me-dir/**
exclude:
- env/**
- .env/**
- local.settings.json
- .vscode/**
- __pycache__/**
- node_modules/**
- .python_packages/**
- .funcignore
- package.json
- package-lock.json
- .gitignore
- .git/**
# - exclude-me.py
# - exclude-me-dir/**
functions:
handle_activity_events_trigger:
handler: src/handlers/handle_activity_events_trigger/__init__.py
events:
- cosmosDB: true
x-azure-settings:
name: documents # name of input parameter in function signature
direction: in
leaseCollectionName: leases
connectionStringSetting: COSMOS_DATABASE_URI
databaseName: time-tracker-db
collectionName: activity
createLeaseCollectionIfNotExists: true
leaseCollectionPrefix: activity_
- cosmosDB: true
x-azure-settings:
connectionStringSetting: COSMOS_DATABASE_URI
direction: out
name: events # name of input parameter in function signature
databaseName: time-tracker-db
collectionName: event
createIfNotExists: true # A boolean value to indicate whether the collection is created
createLeaseCollectionIfNotExists: true
handle_customer_trigger:
handler: src/handlers/handle_customer_trigger/__init__.py
events:
- cosmosDB: true
x-azure-settings:
name: documents # name of input parameter in function signature
direction: in
connectionStringSetting: COSMOS_DATABASE_URI
databaseName: time-tracker-db
collectionName: customer
createLeaseCollectionIfNotExists: true
leaseCollectionPrefix: customer_
- cosmosDB: true
x-azure-settings:
direction: out
name: events # name of input parameter in function signature
databaseName: time-tracker-db
collectionName: event
leaseCollectionName: leases
createLeaseCollectionIfNotExists: true
connectionStringSetting: COSMOS_DATABASE_URI
createIfNotExists: true # A boolean value to indicate whether the collection is created
handle_project_events_trigger:
handler: src/handlers/handle_project_events_trigger/__init__.py
events:
- cosmosDB: true
x-azure-settings:
name: documents # name of input parameter in function signature
direction: in
leaseCollectionName: leases
connectionStringSetting: COSMOS_DATABASE_URI
databaseName: time-tracker-db
collectionName: project
createLeaseCollectionIfNotExists: true
leaseCollectionPrefix: project_
- cosmosDB: true
x-azure-settings:
direction: out
name: events # name of input parameter in function signature
databaseName: time-tracker-db
collectionName: event
leaseCollectionName: leases
createLeaseCollectionIfNotExists: true
connectionStringSetting: COSMOS_DATABASE_URI
createIfNotExists: true # A boolean value to indicate whether the collection is created
handle_project_type_events_trigger:
handler: src/handlers/handle_project_type_events_trigger/__init__.py
events:
- cosmosDB: true
x-azure-settings:
name: documents # name of input parameter in function signature
direction: in
leaseCollectionName: leases
connectionStringSetting: COSMOS_DATABASE_URI
databaseName: time-tracker-db
collectionName: project_type
createLeaseCollectionIfNotExists: true
leaseCollectionPrefix: project_type_
- cosmosDB: true
x-azure-settings:
direction: out
name: events # name of input parameter in function signature
databaseName: time-tracker-db
collectionName: event
leaseCollectionName: leases
createLeaseCollectionIfNotExists: true
connectionStringSetting: COSMOS_DATABASE_URI
createIfNotExists: true # A boolean value to indicate whether the collection is created
handle_time_entry_events_trigger:
handler: src/handlers/handle_time_entry_events_trigger/__init__.py
events:
- cosmosDB: true
x-azure-settings:
name: documents # name of input parameter in function signature
direction: in
leaseCollectionName: leases
connectionStringSetting: COSMOS_DATABASE_URI
databaseName: time-tracker-db
collectionName: time_entry
createLeaseCollectionIfNotExists: true
leaseCollectionPrefix: time_entry_
- cosmosDB: true
x-azure-settings:
direction: out
name: events # name of input parameter in function signature
databaseName: time-tracker-db
collectionName: event
leaseCollectionName: leases
createLeaseCollectionIfNotExists: true
connectionStringSetting: COSMOS_DATABASE_URI
createIfNotExists: true # A boolean value to indicate whether the collection is created