-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
647 lines (608 loc) · 27.7 KB
/
serverless.yml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
service: azure-functions-typescript
frameworkVersion: "3"
custom:
webpack:
webpackConfig: ./webpack.config.js
includeModules: true
provider:
name: azure
runtime: nodejs12
region: ${env:region, 'UK West'} #{UK West|UK South}
stage: ${opt:stage, 'dev'}
prefix: ${opt:prefix, 'kenan'} # prefix of generated resource name
# storageAccount:
# name: kenanhukwdevstorageaccount
# resourceGroup: ${self:provider.prefix}-${self:provider.region}-${self:provider.stage}-${self:service}-rg # comment this field for default auto generated value.
# deploymentName: ${self:provider.prefix}${self:provider.region}${self:provider.stage}${self:service}-DEPLOYMENT-t1619530107124 # comment this field for default auto generated value.
# os: windows # windows is default, linux is available
# subscriptionId: 00000000-0000-0000-0000-000000000000
# tenantId:
# armTemplate:
# file: azuredeploy.json
# # parameters: ${file(azuredeploy.parameters.json)}
# parameters:
# storagePrefix:
# value: storage
# location:
# value: ukwest
# topics_eventgrid1_name:
# value: eventgrid1
# topics_subscription_broker_name:
# value: broker1
# queue_broker1_name:
# value: queuebroker1
# inputSchema:
# value: EventGridSchema
# tags:
# value:
# displayName: AzureTestDeployment
# identity:
# value:
# type: None
# evenetGridSku:
# value: Basic
# storageSku:
# value: Standard_LRS
# storageSkuTier:
# value: Standard
environment: # these will be created as application settings
SERVERLESS_STAGE: ${self:provider.stage}
VARIABLE_FOO: "HELLO WORLD"
FIRST_NAME: "KENAN"
LAST_NAME: "HANCER"
STORAGE_QUEUE6_NAME: "myqueue-items22"
TopicKeySetting: "[listKeys(resourceId('Microsoft.EventGrid/topics', parameters('eventGridName')), '2020-10-15-preview').key1]"
# Default API Management configuration with Consumption sku(Stock-keeping-Unit)
# apim: true
# Start of your API Management configuration
# apim:
# # name: ${self:provider.prefix}-${self:provider.region}-${self:provider.stage}-apim # comment this field for default auto generated value.
# sku:
# name: Developer #{Consumption|Developer|Basic|Standard|Premium}
# capacity: 1
# properties:
# publisherName: Kenan Hancer
# publisherEmail: kenanhancer@hotmail.com
# # API specifications
# apis:
# # Name of the API
# - name: greeting-api
# subscriptionRequired: false
# # Display name
# displayName: Greeting API
# # Description of API
# description: The Greeting REST API
# # HTTP protocols allowed
# protocols:
# - https
# # Base path of API calls
# path: products
# # Tags for ARM resource
# tags:
# - tag1
# - tag2
# # No authorization
# authorization: none
# # Name of the API
# - name: categories-api
# subscriptionRequired: false
# # Display name
# displayName: Categories API
# # Description of API
# description: The Categories REST API
# # HTTP protocols allowed
# protocols:
# - https
# # Base path of API calls
# path: categories
# # Tags for ARM resource
# tags:
# - tag1
# - tag2
# # No authorization
# authorization: none
# backends:
# - name: products-backend
# url: api/products
# - name: categories-backend
# url: api/categories
# # CORS Settings for APIM
# cors:
# allowCredentials: false
# allowedOrigins:
# - "*"
# allowedMethods:ß
# - GET
# - POST
# - PUT
# - DELETE
# - PATCH
# allowedHeaders:
# - "*"
# exposeHeaders:
# - "*"
# you can define apim configuration here
# apim:
# apis:
# - name: v1
# subscriptionRequired: false # if true must provide an api key
# displayName: v1
# description: V1 sample app APIs
# protocols:
# - https
# path: v1
# tags:
# - tag1
# - tag2
# authorization: none
# cors:
# allowCredentials: false
# allowedOrigins:
# - "*"
# allowedMethods:
# - GET
# - POST
# - PUT
# - DELETE
# - PATCH
# allowedHeaders:
# - "*"
# exposeHeaders:
# - "*"
plugins: # look for additional plugins in the community plugins repo: https://github.com/serverless/plugins
- serverless-azure-functions
- serverless-webpack
- serverless-offline
functions:
# When a http request comes to http://localhost:7071/api/hello, httpTrigger_fn1.handle function will be triggered and it will write log.
httpTrigger_fn1:
handler: src/handlers/http/httpTrigger_fn1.handle
events:
- http: true
x-azure-settings:
methods:
- get
route: hello #<string>, default - <function name>
authLevel: anonymous #<enum - anonymous|function (default)|admin>
# When a http request comes to http://localhost:7071/api/goodbye, httpTrigger_fn2.handle function will be triggered and it will write log.
httpTrigger_fn2:
handler: src/handlers/http/httpTrigger_fn2.handle
events:
- http: true
x-azure-settings:
methods:
- get
route: goodbye
authLevel: anonymous #<enum - anonymous|function (default)|admin>
# When a http request comes to http://localhost:7071/api/addpersonv1, httpTriggerToStorageTable_fn1.handle function will be triggered and it will add record to Person table.
# Send the following payload in request body
# { "name": "Kenan Hancer" }
httpTriggerToStorageTable_fn1:
handler: src/handlers/http/httpTriggerToStorageTable_fn1.handle
events:
- http: true
x-azure-settings:
methods:
- post
route: addpersonv2
authLevel: anonymous #<enum - anonymous|function (default)|admin>
- table: true
x-azure-settings:
name: personEntity
tableName: Person
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- http: true
x-azure-settings:
direction: out
# When a http request comes to http://localhost:7071/api/addpersonv3, httpTriggerToStorageTable_fn2.handle function will be triggered and it will add record to Person table.
# Send the following payload in request body
# { "first_name": "Kenan", "last_name": "Hancer", "age": 37 }
httpTriggerToStorageTable_fn2:
handler: src/handlers/http/httpTriggerToStorageTable_fn2.handle
events:
- http: true
x-azure-settings:
methods:
- post
route: addpersonv3
authLevel: anonymous #<enum - anonymous|function (default)|admin>
- table: true
x-azure-settings:
name: personEntity
tableName: Person
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- http: true
x-azure-settings:
direction: out
# When a http request comes to http://localhost:7071/api/getperson, httpTriggerFromStorageTable_fn1.handle function will be triggered and it will retrieve record from Person table.
# Send the following payload in request body
# { "PartitionKey": "********", "RowKey": "*******" }
httpTriggerFromStorageTable_fn1:
handler: src/handlers/http/httpTriggerFromStorageTable_fn1.handle
events:
- http: true
x-azure-settings:
methods:
- post
route: getperson
authLevel: anonymous #<enum - anonymous|function (default)|admin>
- table: true
x-azure-settings:
name: personEntity
tableName: Person
partitionKey: "{PartitionKey}"
rowKey: "{RowKey}"
direction: in
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- http: true
x-azure-settings:
direction: out
# When a http request comes to http://localhost:7071/api/httpTriggerToStorageBlob_fn1, httpTriggerToStorageBlob_fn1.handle function will be triggered and it will write body of http request to created file.
# Azure Functions binding expression patterns - Create GUIDs
# Send the following payload in request body
# { "name": "Kenan Hancer" }
httpTriggerToStorageBlob_fn1:
handler: src/handlers/http/httpTriggerToStorageBlob_fn1.handle
events:
- http: true
x-azure-settings:
methods:
- post
authLevel: anonymous #<enum - anonymous|function (default)|admin>
- blob: true
x-azure-settings:
name: blobOutput
path: my-output-container/{rand-guid}.txt
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- http: true
x-azure-settings:
direction: out
# When a http request comes to http://localhost:7071/api/httpTriggerToStorageBlob_fn2, httpTriggerToStorageBlob_fn2.handle function will be triggered and it will write body of http request to created file.
# Azure Functions binding expression patterns - Current time
# Send the following payload in request body
# { "name": "Kenan Hancer" }
httpTriggerToStorageBlob_fn2:
handler: src/handlers/http/httpTriggerToStorageBlob_fn1.handle
events:
- http: true
x-azure-settings:
methods:
- post
authLevel: anonymous #<enum - anonymous|function (default)|admin>
- blob: true
x-azure-settings:
name: blobOutput
path: my-output-container/{DateTime}.txt
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- http: true
x-azure-settings:
direction: out
# When a http request comes to http://localhost:7071/api/httpTriggerFromStorageBlob_fn1, httpTriggerFromStorageBlob_fn1.handle function will be triggered and it will return file content.
# Send the following payload in request body
# { "BlobName": "echo-api.yaml" }
httpTriggerFromStorageBlob_fn1:
handler: src/handlers/http/httpTriggerFromStorageBlob_fn1.handle
events:
- http: true
x-azure-settings:
name: info
methods:
- post
authLevel: anonymous #<enum - anonymous|function (default)|admin>
webHookType: genericJson
- blob: true
x-azure-settings:
name: blobContents
path: strings/{BlobName}
direction: in
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- http: true
x-azure-settings:
direction: out
# When a http request comes to http://localhost:7071/api/httpTriggerFromStorageBlob_fn2, httpTriggerFromStorageBlob_fn1.handle function will be triggered and it will return file content.
# Send the following payload in request body
# { "BlobName": { "FileName":"echo-api", "Extension":"yaml" } }
httpTriggerFromStorageBlob_fn2:
handler: src/handlers/http/httpTriggerFromStorageBlob_fn1.handle
events:
- http: true
x-azure-settings:
name: info
methods:
- post
authLevel: anonymous #<enum - anonymous|function (default)|admin>
# webHookType: genericJson
- blob: true
x-azure-settings:
name: blobContents
path: strings/{BlobName.FileName}.{BlobName.Extension}
direction: in
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- http: true
x-azure-settings:
direction: out
# When a http request comes to http://localhost:7071/api/httpTriggerToStorageQueue_fn1, httpTriggerToStorageQueue_fn1.handle function will be triggered and it will push message to queue.
# Send the following payload in request body
# { "name": "Kenan Hancer" }
httpTriggerToStorageQueue_fn1:
handler: src/handlers/http/httpTriggerToStorageQueue_fn1.handle
events:
- http: true
x-azure-settings:
methods:
- post
authLevel: anonymous #<enum - anonymous|function (default)|admin>
- queue: myqueue-items3
x-azure-settings:
name: message # Specifies which name is available on `context`
direction: out
connection: AzureWebJobsStorage
- http: true
x-azure-settings:
direction: out
# When a http request comes to http://localhost:7071/api/httpTriggerToStorageQueue_fn2, httpTriggerToStorageQueue_fn2.handle function will be triggered and it will push message to queue.
# Send the following payload in request body
# { "first_name": "Kenan", "last_name": "Hancer", "age": 37 }
httpTriggerToStorageQueue_fn2:
handler: src/handlers/http/httpTriggerToStorageQueue_fn2.handle
events:
- http: true
x-azure-settings:
methods:
- post
authLevel: anonymous #<enum - anonymous|function (default)|admin>
- queue: myqueue-items3
x-azure-settings:
name: message # Specifies which name is available on `context`
direction: out
connection: AzureWebJobsStorage
- http: true
x-azure-settings:
direction: out
# timerTrigger_fn1.handle function will be triggered every 10 seconds and it will write log.
timerTrigger_fn1:
handler: src/handlers/timer/timerTrigger_fn1.printMessage
events:
- timer: true
x-azure-settings:
name: myTimer
schedule: "*/10 * * * * *" #<string>, cron expression to run on
# timerTrigger_fn2.handle function will be triggered every 5 seconds and it will write log.
timerTrigger_fn2:
handler: src/handlers/timer/timerTrigger_fn2.handle
events:
- timer: true
x-azure-settings:
name: timerObj #<string>, default - "myTimer", specifies which name is available on `context.bindings`
schedule: 0 */5 * * * * #<string>, cron expression to run on
# timerTriggerToStorageQueue_fn.handle function will be triggered every 5 seconds and it will write log.
timerTriggerToStorageQueue_fn:
handler: src/handlers/timer/timerTriggerToStorageQueue_fn.handle
events:
- timer: true
x-azure-settings:
name: timerObj #<string>, default - "myTimer", specifies which name is available on `context.bindings`
schedule: 0 */5 * * * * #<string>, cron expression to run on
- queue: myqueue-items4
x-azure-settings:
name: message # Specifies which name is available on `context`
direction: out
connection: AzureWebJobsStorage
# timerTriggerToStorageTable_fn.handle function will be triggered every 5 seconds and it will write log.
timerTriggerToStorageTable_fn:
handler: src/handlers/timer/timerTriggerToStorageTable_fn.handle
events:
- timer: true
x-azure-settings:
name: timerObj #<string>, default - "myTimer", specifies which name is available on `context.bindings`
schedule: "*/50 * * * * *" #<string>, cron expression to run on
- table: true
x-azure-settings:
name: personEntity
tableName: Person
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# timerTriggerToStorageBlob_fn.handle function will be triggered every 5 seconds and it will write log.
timerTriggerToStorageBlob_fn:
handler: src/handlers/timer/timerTriggerToStorageBlob_fn.handle
events:
- timer: true
x-azure-settings:
name: timerObj #<string>, default - "myTimer", specifies which name is available on `context.bindings`
schedule: "*/30 * * * * *" #<string>, cron expression to run on
- blob: true
x-azure-settings:
name: myOutputBlob # Specifies which name is available on `context`
path: samples-workitemsv2/{rand-guid}.txt # for more Blob name patterns infer to https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a file comes to samples-workitems/ folder, storageBlobTrigger_fn1.handle function will be triggered and it will write log.
storageBlobTrigger_fn1:
handler: src/handlers/storage/storageBlobTrigger_fn1.handle
events:
- blob: true
x-azure-settings:
name: item # Specifies which name is available on `context`
path: samples-workitems/{blobname}.{blobextension} # for more Blob name patterns infer to https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a .yaml extension file comes to src/ folder, storageBlob2.handle function will be triggered and it will write log.
storageBlobTrigger_fn2:
handler: src/handlers/storage/storageBlobTrigger_fn2.handle
events:
- blob: true
x-azure-settings:
name: item # Specifies which name is available on `context`
path: src/{blobname}.yaml # for more Blob name patterns infer to https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a .js extension file comes to src/ folder, storageBlobTrigger_fn2.handle function will be triggered and it will write log.
storageBlobTrigger_fn3:
handler: src/handlers/storage/storageBlobTrigger_fn2.handle
events:
- blob: true
x-azure-settings:
name: item # Specifies which name is available on `context`
path: src/{blobname}.js # for more Blob name patterns infer to https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a file comes to testContainerName/ folder as dash separated with .csv extension, storageBlobTrigger_fn4.handle function will be triggered and it will write log.
storageBlobTrigger_fn4:
handler: src/handlers/storage/storageBlobTrigger_fn4.handle
events:
- blob: true
x-azure-settings:
name: image # Specifies which name is available on `context`
path: testcontainername/{date}-{filetype}.csv # for more Blob name patterns infer to https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a file comes to sample-images/ folder, storageBlobTriggerToStorageBlob_fn1.handle function will be triggered and it will copy file to sample-images-sm/ folder.
storageBlobTriggerToStorageBlob_fn1:
handler: src/handlers/storage/storageBlobTriggerToStorageBlob_fn1.handle
events:
- blob: true
x-azure-settings:
name: image # Specifies which name is available on `context`
path: sample-images/{filename} # for more Blob name patterns infer to https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- blob: true
x-azure-settings:
name: imageSmall # Specifies which name is available on `context`
path: sample-images-sm/{filename} # for more Blob name patterns infer to https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-trigger?tabs=csharp
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a message comes to myqueue-items queue, storageQueueTrigger_fn1.handle function will be triggered and it will write log.
storageQueueTrigger_fn1:
handler: src/handlers/storage/storageQueueTrigger_fn1.handle
events:
- queue: myqueue-items
x-azure-settings:
name: message # Specifies which name is available on `context`
connection: AzureWebJobsStorage
# When a message comes to myqueue-items2 queue, storageQueueTrigger_fn2.handle function will be triggered and it will write log.
# Queue name is coming from environment variables.
storageQueueTrigger_fn2:
handler: src/handlers/storage/storageQueueTrigger_fn2.handle
events:
- queue: ${self:provider.environment.STORAGE_QUEUE6_NAME, 'myqueue-items2'}
x-azure-settings:
name: message # Specifies which name is available on `context`
connection: AzureWebJobsStorage
# When a message comes to myqueue-items2 queue, storageQueueTriggerFromStorageBlobToStorageBlob_fn1.handle function will be triggered and it will retrieve file from samples-workitems2 blob and create a new copy in samples-workitems2 blob again
storageQueueTriggerFromStorageBlobToStorageBlob_fn1:
handler: src/handlers/storage/storageQueueTriggerFromStorageBlobToStorageBlob_fn1.handle
events:
- queue: myqueue-items2
x-azure-settings:
name: myQueueItem # Specifies which name is available on `context`
connection: AzureWebJobsStorage
- blob: true
x-azure-settings:
name: myInputBlob
path: samples-workitems2/{queueTrigger}
direction: in
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
- blob: true
x-azure-settings:
name: myOutputBlob
path: samples-workitems2/{queueTrigger}-Copy
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a message comes to myqueue-select-person-row2 queue, storageQueueTriggerFromStorageTable_fn1.handle function will be triggered and it will retrieve row from Person table.
# partitionKey and rowKey are not specified so all records will come from Person table.
storageQueueTriggerFromStorageTable_fn1:
handler: src/handlers/storage/storageQueueTriggerFromStorageTable_fn1.handle
events:
- queue: myqueue-select-person-row2
x-azure-settings:
name: myQueueItem # Specifies which name is available on `context`
connection: AzureWebJobsStorage
- table: true
x-azure-settings:
name: personEntities
tableName: Person
direction: in
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a message comes to myqueue-insert-person-row queue, storageQueueTriggerFromStorageTable_fn2.handle function will be triggered and it will insert row in Person table.
storageQueueTriggerFromStorageTable_fn2:
handler: src/handlers/storage/storageQueueTriggerFromStorageTable_fn2.handle
events:
- queue: myqueue-insert-person-row
x-azure-settings:
name: myQueueItem # Specifies which name is available on `context`
connection: AzureWebJobsStorage
- table: true
x-azure-settings:
name: personEntity
tableName: Person
direction: out
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a message comes to myqueue-select-person-row queue, storageQueueTriggerFromStorageTable_fn3.handle function will be triggered and it will retrieve row from Person table.
# partitionKey and rowKey are specified so only one record will come from Person table.
storageQueueTriggerFromStorageTable_fn3:
handler: src/handlers/storage/storageQueueTriggerFromStorageTable_fn3.handle
events:
- queue: myqueue-select-person-row
x-azure-settings:
name: myQueueItem # Specifies which name is available on `context`
connection: AzureWebJobsStorage
- table: true
x-azure-settings:
name: personEntity
tableName: Person
partitionKey: "{queueTrigger}"
rowKey: "FirstName_{queueTrigger}"
direction: in
connection: AzureWebJobsStorage # App Setting/environment variable which contains Storage Account Connection String
# When a message comes to myqueue-select-person-row queue, storageQueueTriggerToStorageQueue_fn1.handle function will be triggered and it will push new message to myqueue-select-person-row-new Storage Queue.
storageQueueTriggerToStorageQueue_fn1:
handler: src/handlers/storage/storageQueueTriggerToStorageQueue_fn1.handle
events:
- queue: myqueue-select-person-row
x-azure-settings:
name: message # Specifies which name is available on `context`
connection: AzureWebJobsStorage
- queue: myqueue-select-person-row-new
x-azure-settings:
name: messageOut # Specifies which name is available on `context`
connection: AzureWebJobsStorage
# When a message comes to EventGrid, eventGridTriggerToEventGrid_fn1 function will be triggered and it will send new message to EventGrid back again.
eventGridTriggerToEventGrid_fn1:
handler: src/handlers/eventGrid/eventGridTriggerToEventGrid_fn1.handle
events:
- eventGrid: true
x-azure-settings:
name: eventGridEvent # Specifies which name is available on `context`
direction: ""
- eventGrid: true
x-azure-settings:
name: outputEvent # Specifies which name is available on `context`
direction: out
topicEndpointUri: TopicEndpointUri
topicKeySetting: TopicKeySetting
# eventhub:
# handler: src/handlers/eventHub.printMessage
# events:
# - eventHub:
# x-azure-settings:
# name: eventHubMessages # Specifies which name it's available on `context`
# eventHubName: sample-hub # Specifies the Name of the Event Hub
# consumerGroup: $Default # Specifies the consumerGroup to listen with
# connection: EVENT_HUBS_CONNECTION # App Setting/environment variable which contains Event Hubs Namespace Connection String
# serviceBusQueue:
# handler: src/handlers/serviceBusQueue.printMessage
# events:
# - serviceBus:
# x-azure-settings:
# name: message # Specifies which name is available on `context`
# queueName: sample-queue # Name of the service bus queue to consume
# connection: SERVICE_BUS_CONNECTION # App Setting/environment variable variable which contains Service Bus Namespace Connection String
# serviceBusTopic:
# handler: src/handlers/serviceBusTopic.printMessage
# events:
# - serviceBus:
# x-azure-settings:
# name: message # Specifies which name it's available on `context`
# topicName: sample-topic # Name of the service bus topic to consume
# subscriptionName: sample-subscription # Name of the topic subscription to retrieve from
# connection: SERVICE_BUS_CONNECTION # App Setting/environment variable variable which contains Service Bus Namespace Connection String