-
Notifications
You must be signed in to change notification settings - Fork 250
/
Copy pathazure.functions.TriggerApi.yml
1297 lines (983 loc) · 48.1 KB
/
azure.functions.TriggerApi.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
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### YamlMime:PythonClass
uid: azure.functions.TriggerApi
name: TriggerApi
fullName: azure.functions.TriggerApi
module: azure.functions
summary: Interface to extend for using existing trigger decorator functions.
constructor:
syntax: TriggerApi(*args, **kwargs)
methods:
- uid: azure.functions.TriggerApi.activity_trigger
name: activity_trigger
summary: Register an Activity Function.
signature: 'activity_trigger(input_name: str, activity: str | None = None)'
parameters:
- name: input_name
description: Parameter name of the Activity input.
isRequired: true
types:
- <xref:str>
- name: activity
description: Name of Activity Function.
defaultValue: None
types:
- <xref:Optional>[<xref:str>]
- uid: azure.functions.TriggerApi.assistant_skill_trigger
name: assistant_skill_trigger
summary: 'Assistants build on top of the chat functionality to provide assistants
with custom skills defined as functions. This internally uses the
function calling feature OpenAIs GPT models to select which functions
to invoke and when.
Ref: [https://platform.openai.com/docs/guides/function-calling](https://platform.openai.com/docs/guides/function-calling)
You can define functions that can be triggered by assistants by using
the *assistantSkillTrigger* trigger binding. These functions are
invoked by the extension when an assistant signals that it would like
to invoke a function in response to a user prompt.
The name of the function, the description provided by the trigger,
and the parameter name are all hints that the underlying language model
use to determine when and how to invoke an assistant function.
LLM.
:param parameter_description_json: A JSON description of the function
parameter, which is provided to the LLM.
If no description is provided, the description will be autogenerated.
:param model: The OpenAI chat model to use.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json.'
signature: 'assistant_skill_trigger(arg_name: str, function_description: str, function_name:
str | None = None, parameter_description_json: str | None = None, model: OpenAIModels
| None = OpenAIModels.DefaultChatModel, data_type: DataType | str | None = None,
**kwargs: Any) -> Callable[[...], Any]'
parameters:
- name: arg_name
isRequired: true
- name: function_description
isRequired: true
- name: function_name
defaultValue: None
- name: parameter_description_json
defaultValue: None
- name: model
defaultValue: DefaultChatModel
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.blob_trigger
name: blob_trigger
summary: 'The blob_change_trigger decorator adds <xref:azure.functions.BlobTrigger>
to the
<xref:azure.functions.FunctionBuilder> object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining BlobTrigger
in the function.json which enables function to be triggered when new
message(s) are sent to the storage blobs.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-binding-storage-blob](https://aka.ms/azure-function-binding-storage-blob)
:param arg_name: The name of the variable that represents the
<xref:azure.functions.InputStream> object in function code.
:param path: The path to the blob.
:param connection: The name of an app setting or setting collection
that specifies how to connect to Azure Blobs.
:param source: Sets the source of the triggering event.
Use EventGrid for an Event Grid-based blob trigger,
which provides much lower latency.
The default is LogsAndContainerScan,
which uses the standard polling mechanism to detect changes
in the container.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json.'
signature: 'blob_trigger(arg_name: str, path: str, connection: str, source: BlobSource
| None = None, data_type: DataType | None = None, **kwargs) -> Callable[[...],
Any]'
parameters:
- name: arg_name
isRequired: true
- name: path
isRequired: true
- name: connection
isRequired: true
- name: source
defaultValue: None
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.cosmos_db_trigger
name: cosmos_db_trigger
summary: "The cosmos_db_trigger decorator adds <xref:azure.functions.CosmosDBTrigger>\n\
to the <xref:azure.functions.FunctionBuilder> object\nfor building <xref:azure.functions.Function>\
\ object used in worker function\nindexing model. This decorator will work only\
\ with extension bundle 4.x\nand above. For additional details, please refer\n\
[https://aka.ms/cosmosdb-v4-update](https://aka.ms/cosmosdb-v4-update).\nThis\
\ is equivalent to defining CosmosDBTrigger in the function.json\nwhich enables\
\ function to be triggered when CosmosDB data is changed.\nAll optional fields\
\ will be given default value by function host when\nthey are parsed by function\
\ host.\n\nRef: [https://aka.ms/azure-function-binding-cosmosdb-v4](https://aka.ms/azure-function-binding-cosmosdb-v4)\n\
\n<xref:azure.functions.DocumentList> object in function code\n:param connection:\
\ The name of an app setting or setting collection\nthat specifies how to connect\
\ to the Azure Cosmos DB account being\n\n monitored.\n\nthe collection being\
\ monitored\n:param container_name: The name of the container being monitored\n\
:param lease_connection: (Optional) The name of an app setting or\n\n setting\
\ container that specifies how to connect to the Azure Cosmos\n DB account that\
\ holds the lease container\n\ncollection used to store leases\n:param lease_container_name:\
\ (Optional) The name of the container used\n\n to store leases. When not set,\
\ the value leases is used\n\ntrue, the leases container is automatically created\
\ when it doesn't\n already exist. The default value is false. When using Azure\
\ AD\n identities if you set the value to true, creating containers is not an\n\
\n allowed operation and your Function won't be able to start\n\nRequest\
\ Units to assign when the leases container is created. This\nsetting is only\
\ used when createLeaseContainerIfNotExists is set to\ntrue. This parameter is\
\ automatically set when the binding is created\nusing the portal\n:param lease_container_prefix:\
\ (Optional) When set, the value is added\nas a prefix to the leases created in\
\ the Lease container for this\nfunction. Using a prefix allows two separate Azure\
\ Functions to share\nthe same Lease container by using different prefixes\n:param\
\ feed_poll_delay: The time (in milliseconds) for the delay\nbetween polling a\
\ partition for new changes on the feed, after all\ncurrent changes are drained\n\
:param lease_acquire_interval: When set, it defines,\nin milliseconds, the interval\
\ to kick off a task to compute if\npartitions are distributed evenly among known\
\ host instances\n:param lease_expiration_interval: When set, it defines,\nin\
\ milliseconds, the interval for which the lease is taken on a\nlease representing\
\ a partition\n:param lease_renew_interval: When set, it defines, in milliseconds,\n\
the renew interval for all leases for partitions currently held by\nan instance\n\
:param max_items_per_invocation: When set, this property sets the\nmaximum number\
\ of items received per Function call\n:param start_from_beginning: This option\
\ tells the Trigger to read\nchanges from the beginning of the collection's change\
\ history\ninstead of starting at the current time\n:param start_from_time: (Optional)\
\ Gets or sets the date and time from\nwhich to initialize the change feed read\
\ operation. The recommended\nformat is ISO 8601 with the UTC designator, such\
\ as\n2021-02-16T14:19:29Z. This is only used to set the initial trigger\nstate.\
\ After the trigger has a lease state, changing this value has\nno effect\n:param\
\ preferred_locations: Defines preferred locations (regions)\nfor geo-replicated\
\ database accounts in the Azure Cosmos DB service\n:param data_type: Defines\
\ how Functions runtime should treat the\nparameter value\n:param kwargs: Keyword\
\ arguments for specifying additional binding\nfields to include in the binding\
\ json"
signature: 'cosmos_db_trigger(arg_name: str, connection: str, database_name: str,
container_name: str, lease_connection: str | None = None, lease_database_name:
str | None = None, lease_container_name: str | None = None, create_lease_container_if_not_exists:
bool | None = None, leases_container_throughput: int | None = None, lease_container_prefix:
str | None = None, feed_poll_delay: int | None = None, lease_acquire_interval:
int | None = None, lease_expiration_interval: int | None = None, lease_renew_interval:
int | None = None, max_items_per_invocation: int | None = None, start_from_beginning:
time | None = None, start_from_time: time | None = None, preferred_locations:
str | None = None, data_type: DataType | str | None = None, **kwargs: Any) ->
Callable[[...], Any]'
parameters:
- name: arg_name
isRequired: true
- name: connection
isRequired: true
- name: database_name
isRequired: true
- name: container_name
isRequired: true
- name: lease_connection
defaultValue: None
- name: lease_database_name
defaultValue: None
- name: lease_container_name
defaultValue: None
- name: create_lease_container_if_not_exists
defaultValue: None
- name: leases_container_throughput
defaultValue: None
- name: lease_container_prefix
defaultValue: None
- name: feed_poll_delay
defaultValue: None
- name: lease_acquire_interval
defaultValue: None
- name: lease_expiration_interval
defaultValue: None
- name: lease_renew_interval
defaultValue: None
- name: max_items_per_invocation
defaultValue: None
- name: start_from_beginning
defaultValue: None
- name: start_from_time
defaultValue: None
- name: preferred_locations
defaultValue: None
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.cosmos_db_trigger_v3
name: cosmos_db_trigger_v3
summary: "The cosmos_db_trigger_v3 decorator adds <xref:azure.functions.CosmosDBTrigger>\n\
to the <xref:azure.functions.FunctionBuilder> object\nfor building <xref:azure.functions.Function>\
\ object used in worker function\nindexing model. This decorator will work only\
\ with extension bundle 2.x\nor 3.x. For additional details, please refer\n[https://aka.ms/cosmosdb-v4-update](https://aka.ms/cosmosdb-v4-update).\n\
This is equivalent to defining CosmosDBTrigger in the function.json\n\n which\
\ enables function to be triggered when CosmosDB data is changed.\n\nAll optional\
\ fields will be given default value by function host when\nthey are parsed by\
\ function host.\n\nRef: [https://aka.ms/azure-function-binding-cosmosdb-v2](https://aka.ms/azure-function-binding-cosmosdb-v2)\n\
\n<xref:azure.functions.DocumentList> object in function code.\n:param database_name:\
\ The name of the Azure Cosmos DB database with\nthe collection being monitored.\n\
:param collection_name: The name of the collection being monitored.\n:param connection_string_setting:\
\ The name of an app setting or\nsetting collection that specifies how to connect\
\ to the Azure Cosmos\nDB account being monitored.\n:param lease_collection_name:\
\ The name of the collection used to\nstore leases.\n:param lease_connection_string_setting:\
\ The name of an app setting\nor setting collection that specifies how to connect\
\ to the Azure\nCosmos DB account that holds the lease collection.\n:param lease_database_name:\
\ The name of the database that holds the\ncollection used to store leases.\n\
:param create_lease_collection_if_not_exists: When set to true,\nthe leases collection\
\ is automatically created when it doesn't\nalready exist.\n:param leases_collection_throughput:\
\ Defines the number of Request\nUnits to assign when the leases collection is\
\ created.\n:param lease_collection_prefix: When set, the value is added as a\n\
prefix to the leases created in the Lease collection for this\nFunction.\n:param\
\ checkpoint_interval: When set, it defines, in milliseconds,\nthe interval between\
\ lease checkpoints. Default is always after a\nFunction call.\n:param checkpoint_document_count:\
\ Customizes the amount of documents\nbetween lease checkpoints. Default is always\
\ after a Function call.\n:param feed_poll_delay: The time (in milliseconds) for\
\ the delay\nbetween polling a partition for new changes on the feed, after all\n\
current changes are drained.\n:param lease_renew_interval: When set, it defines,\
\ in milliseconds,\nthe renew interval for all leases for partitions currently\
\ held by\nan instance.\n:param lease_acquire_interval: When set, it defines,\n\
in milliseconds, the interval to kick off a task to compute if\npartitions are\
\ distributed evenly among known host instances.\n:param lease_expiration_interval:\
\ When set, it defines,\nin milliseconds, the interval for which the lease is\
\ taken on a\nlease representing a partition.\n:param max_items_per_invocation:\
\ When set, this property sets the\nmaximum number of items received per Function\
\ call.\n:param start_from_beginning: This option tells the Trigger to read\n\
changes from the beginning of the collection's change history\ninstead of starting\
\ at the current time.\n:param preferred_locations: Defines preferred locations\
\ (regions)\nfor geo-replicated database accounts in the Azure Cosmos DB service.\n\
:param data_type: Defines how Functions runtime should treat the\nparameter value.\n\
:param kwargs: Keyword arguments for specifying additional binding\nfields to\
\ include in the binding json."
signature: 'cosmos_db_trigger_v3(arg_name: str, database_name: str, collection_name:
str, connection_string_setting: str, lease_collection_name: str | None = None,
lease_connection_string_setting: str | None = None, lease_database_name: str |
None = None, create_lease_collection_if_not_exists: bool | None = None, leases_collection_throughput:
int | None = None, lease_collection_prefix: str | None = None, checkpoint_interval:
int | None = None, checkpoint_document_count: int | None = None, feed_poll_delay:
int | None = None, lease_renew_interval: int | None = None, lease_acquire_interval:
int | None = None, lease_expiration_interval: int | None = None, max_items_per_invocation:
int | None = None, start_from_beginning: bool | None = None, preferred_locations:
str | None = None, data_type: DataType | str | None = None, **kwargs: Any) ->
Callable[[...], Any]'
parameters:
- name: arg_name
isRequired: true
- name: database_name
isRequired: true
- name: collection_name
isRequired: true
- name: connection_string_setting
isRequired: true
- name: lease_collection_name
defaultValue: None
- name: lease_connection_string_setting
defaultValue: None
- name: lease_database_name
defaultValue: None
- name: create_lease_collection_if_not_exists
defaultValue: None
- name: leases_collection_throughput
defaultValue: None
- name: lease_collection_prefix
defaultValue: None
- name: checkpoint_interval
defaultValue: None
- name: checkpoint_document_count
defaultValue: None
- name: feed_poll_delay
defaultValue: None
- name: lease_renew_interval
defaultValue: None
- name: lease_acquire_interval
defaultValue: None
- name: lease_expiration_interval
defaultValue: None
- name: max_items_per_invocation
defaultValue: None
- name: start_from_beginning
defaultValue: None
- name: preferred_locations
defaultValue: None
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.dapr_binding_trigger
name: dapr_binding_trigger
summary: 'The dapr_binding_trigger decorator adds
<xref:azure.functions.DaprBindingTrigger>
to the <xref:azure.functions.FunctionBuilder> object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining DaprBindingTrigger
in the function.json which enables function to be triggered
on Dapr input binding.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-dapr-trigger-binding](https://aka.ms/azure-function-dapr-trigger-binding)
If not specified, the name of the function is used as the trigger name.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json.'
signature: 'dapr_binding_trigger(arg_name: str, binding_name: str, data_type: DataType
| str | None = None, **kwargs: Any) -> Callable[[...], Any]'
parameters:
- name: arg_name
isRequired: true
- name: binding_name
isRequired: true
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.dapr_service_invocation_trigger
name: dapr_service_invocation_trigger
summary: 'The dapr_service_invocation_trigger decorator adds
<xref:azure.functions.DaprServiceInvocationTrigger>
to the <xref:azure.functions.FunctionBuilder> object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining
DaprServiceInvocationTrigger
in the function.json which enables function to be triggered when new
service invocation occurs through Dapr.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-dapr-trigger-service-invocation](https://aka.ms/azure-function-dapr-trigger-service-invocation)
If not specified, the name of the function is used as the method name.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json.'
signature: 'dapr_service_invocation_trigger(arg_name: str, method_name: str, data_type:
DataType | str | None = None, **kwargs: Any) -> Callable[[...], Any]'
parameters:
- name: arg_name
isRequired: true
- name: method_name
isRequired: true
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.dapr_topic_trigger
name: dapr_topic_trigger
summary: 'The dapr_topic_trigger decorator adds
<xref:azure.functions.DaprTopicTrigger>
to the <xref:azure.functions.FunctionBuilder> object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining DaprTopicTrigger
in the function.json which enables function to be triggered when new
message(s) are sent to the Dapr pubsub.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-dapr-trigger-topic](https://aka.ms/azure-function-dapr-trigger-topic)
the topic name will be used.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json.'
signature: 'dapr_topic_trigger(arg_name: str, pub_sub_name: str, topic: str, route:
str | None = None, data_type: DataType | str | None = None, **kwargs: Any) ->
Callable[[...], Any]'
parameters:
- name: arg_name
isRequired: true
- name: pub_sub_name
isRequired: true
- name: topic
isRequired: true
- name: route
defaultValue: None
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.entity_trigger
name: entity_trigger
summary: Register an Entity Function.
signature: 'entity_trigger(context_name: str, entity_name: str | None = None)'
parameters:
- name: context_name
description: Parameter name of the Entity input.
isRequired: true
types:
- <xref:str>
- name: entity_name
description: Name of Entity Function.
defaultValue: None
types:
- <xref:Optional>[<xref:str>]
- uid: azure.functions.TriggerApi.event_grid_trigger
name: event_grid_trigger
summary: 'The event_grid_trigger decorator adds
<xref:azure.functions.EventGridTrigger>
to the <xref:azure.functions.FunctionBuilder> object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining event grid trigger
in the function.json which enables function to be triggered to
respond to an event sent to an event grid topic.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/eventgridtrigger](https://aka.ms/eventgridtrigger)
parameter value.
:return: Decorator function.'
signature: 'event_grid_trigger(arg_name: str, data_type: DataType | str | None =
None, **kwargs) -> Callable[[...], Any]'
parameters:
- name: arg_name
description: 'the variable name used in function code for the
parameter that receives the event data.'
isRequired: true
- name: data_type
description: Defines how Functions runtime should treat the
defaultValue: None
- uid: azure.functions.TriggerApi.event_hub_message_trigger
name: event_hub_message_trigger
summary: 'The event_hub_message_trigger decorator adds
<xref:azure.functions.EventHubTrigger>
to the <xref:azure.functions.FunctionBuilder> object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining EventHubTrigger
in the function.json which enables function to be triggered when new
message(s) are sent to the event hub.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-binding-event-hubs](https://aka.ms/azure-function-binding-event-hubs)
<xref:azure.functions.EventHubEvent> object in function code.
:param connection: The name of an app setting or setting collection
that specifies how to connect to Event Hubs.
:param event_hub_name: The name of the event hub.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:param cardinality: Set to many in order to enable batching.
:param consumer_group: An optional property that sets the consumer
group used to subscribe to events in the hub.
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json.'
signature: 'event_hub_message_trigger(arg_name: str, connection: str, event_hub_name:
str, data_type: DataType | str | None = None, cardinality: Cardinality | str |
None = None, consumer_group: str | None = None, **kwargs: Any) -> Callable[[...],
Any]'
parameters:
- name: arg_name
isRequired: true
- name: connection
isRequired: true
- name: event_hub_name
isRequired: true
- name: data_type
defaultValue: None
- name: cardinality
defaultValue: None
- name: consumer_group
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.function_name
name: function_name
summary: 'Optional: Sets name of the <xref:azure.functions.Function> object. If
not set,
it will default to the name of the method name.
additional setting fields
:return: Decorator function.'
signature: 'function_name(name: str, setting_extra_fields: Dict[str, Any] | None
= None) -> Callable[[...], Any]'
parameters:
- name: name
description: Name of the function.
isRequired: true
- name: setting_extra_fields
description: Keyword arguments for specifying
defaultValue: None
- uid: azure.functions.TriggerApi.generic_trigger
name: generic_trigger
summary: 'The generic_trigger decorator adds <xref:azure.functions.GenericTrigger>
to the <xref:azure.functions.FunctionBuilder> object for building <xref:azure.functions.Function>
object used in worker function indexing model.
This is equivalent to defining a generic trigger in the
function.json which triggers function to execute when generic trigger
events are received by host.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-binding-custom](https://aka.ms/azure-function-binding-custom)
fields to include in the binding json.'
signature: 'generic_trigger(arg_name: str, type: str, data_type: DataType | str
| None = None, **kwargs) -> Callable[[...], Any]'
parameters:
- name: arg_name
isRequired: true
- name: type
isRequired: true
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.http_type
name: http_type
summary: Set http type of the <xref:azure.functions.Function> object.
signature: 'http_type(http_type: str) -> Callable[[...], Any]'
parameters:
- name: http_type
description: Http type of the function.
isRequired: true
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.kafka_trigger
name: kafka_trigger
summary: "The kafka_trigger decorator adds\n<xref:azure.functions.KafkaTrigger>\n\
to the <xref:azure.functions.FunctionBuilder> object\nfor building <xref:azure.functions.Function>\
\ object used in worker function\nindexing model. This is equivalent to defining\
\ kafka trigger\nin the function.json which enables function to be triggered to\n\
respond to an event sent to a kafka topic.\nAll optional fields will be given\
\ default value by function host when\nthey are parsed by function host.\n\nRef:\
\ [https://aka.ms/kafkatrigger](https://aka.ms/kafkatrigger)\n\ncontains the connection\
\ string for the eventhub when using Kafka\nprotocol header feature of Azure EventHubs.\n\
:param consumer_group: Kafka consumer group used by the trigger.\n:param avro_schema:\
\ This should be used only if a generic record\nshould be generated.\n:param username:\
\ SASL username for use with the PLAIN and SASL-SCRAM-..\n\n mechanisms. Default\
\ is empty string. This is equivalent to\n\n'sasl.username' in librdkafka.\n:param\
\ password: SASL password for use with the PLAIN and SASL-SCRAM-..\n\n mechanisms.\
\ Default is empty string. This is equivalent to\n\n'sasl.password' in librdkafka.\n\
:param ssl_key_location: Path to client's private key (PEM) used for\n\n authentication.\
\ Default is empty string. This is equivalent to\n\n'ssl.key.location' in librdkafka.\n\
:param ssl_ca_location: Path to CA certificate file for verifying the\nbroker's\
\ certificate. This is equivalent to 'ssl.ca.location' in\nlibrdkafka.\n:param\
\ ssl_certificate_location: Path to client's certificate. This is\nequivalent\
\ to 'ssl.certificate.location' in librdkafka.\n:param ssl_key_password: Password\
\ for client's certificate. This is\nequivalent to 'ssl.key.password' in librdkafka.\n\
:param schema_registry_url: URL for the Avro Schema Registry.\n:param schema_registry_username:\
\ Username for the Avro Schema Registry.\n:param schema_registry_password: Password\
\ for the Avro Schema Registry.\n:param o_auth_bearer_method: Either 'default'\
\ or 'oidc'.\nsasl.oauthbearer in librdkafka.\n:param o_auth_bearer_client_id:\
\ Specify only when o_auth_bearer_method\nis 'oidc'. sasl.oauthbearer.client.id\
\ in librdkafka.\n:param o_auth_bearer_client_secret: Specify only when\no_auth_bearer_method\
\ is 'oidc'. sasl.oauthbearer.client.secret in\nlibrdkafka.\n:param o_auth_bearer_scope:\
\ Specify only when o_auth_bearer_method\nis 'oidc'. Client use this to specify\
\ the scope of the access request\nto the broker. sasl.oauthbearer.scope in librdkafka.\n\
:param o_auth_bearer_token_endpoint_url: Specify only when\no_auth_bearer_method\
\ is 'oidc'. sasl.oauthbearer.token.endpoint.url\nin librdkafka.\n:param o_auth_bearer_extensions:\
\ Allow additional information to be\nprovided to the broker. Comma-separated\
\ list of key=value pairs. E.g.,\n\"supportFeatureX=true,organizationId=sales-emea\"\
.\nsasl.oauthbearer.extensions in librdkafka\n:param authentication_mode: SASL\
\ mechanism to use for authentication.\nAllowed values: Gssapi, Plain, ScramSha256,\
\ ScramSha512. Default is\nPlain. This is equivalent to 'sasl.mechanism' in librdkafka.\n\
:param protocol: Gets or sets the security protocol used to communicate\n\n \
\ with brokers. Default is plain text. This is equivalent to\n\n'security.protocol'\
\ in librdkafka. TODO\n:param lag_threshold: Maximum number of unprocessed messages\
\ a worker\nis expected to have at an instance. When target-based scaling is not\n\
disabled, this is used to divide total unprocessed event count to\ndetermine the\
\ number of worker instances, which will then be rounded\nup to a worker instance\
\ count that creates a balanced partition\ndistribution. Default is 1000.\n:param\
\ data_type: Defines how Functions runtime should treat the\nparameter value.\n\
:param kwargs: Keyword arguments for specifying additional binding\nfields to\
\ include in the binding json\n:return: Decorator function."
signature: 'kafka_trigger(arg_name: str, topic: str, broker_list: str, event_hub_connection_string:
str | None = None, consumer_group: str | None = None, avro_schema: str | None
= None, username: str | None = None, password: str | None = None, ssl_key_location:
str | None = None, ssl_ca_location: str | None = None, ssl_certificate_location:
str | None = None, ssl_key_password: str | None = None, schema_registry_url: str
| None = None, schema_registry_username: str | None = None, schema_registry_password:
str | None = None, o_auth_bearer_method: OAuthBearerMethod | str | None = None,
o_auth_bearer_client_id: str | None = None, o_auth_bearer_client_secret: str |
None = None, o_auth_bearer_scope: str | None = None, o_auth_bearer_token_endpoint_url:
str | None = None, o_auth_bearer_extensions: str | None = None, authentication_mode:
BrokerAuthenticationMode | str | None = ''NotSet'', protocol: BrokerProtocol |
str | None = ''NotSet'', cardinality: Cardinality | str | None = ''One'', lag_threshold:
int = 1000, data_type: DataType | str | None = None, **kwargs) -> Callable[[...],
Any]'
parameters:
- name: arg_name
description: 'the variable name used in function code for the
parameter that has the kafka event data.'
isRequired: true
- name: topic
description: The topic monitored by the trigger.
isRequired: true
- name: broker_list
description: The list of Kafka brokers monitored by the trigger.
isRequired: true
- name: event_hub_connection_string
description: The name of an app setting that
defaultValue: None
- name: consumer_group
defaultValue: None
- name: avro_schema
defaultValue: None
- name: username
defaultValue: None
- name: password
defaultValue: None
- name: ssl_key_location
defaultValue: None
- name: ssl_ca_location
defaultValue: None
- name: ssl_certificate_location
defaultValue: None
- name: ssl_key_password
defaultValue: None
- name: schema_registry_url
defaultValue: None
- name: schema_registry_username
defaultValue: None
- name: schema_registry_password
defaultValue: None
- name: o_auth_bearer_method
defaultValue: None
- name: o_auth_bearer_client_id
defaultValue: None
- name: o_auth_bearer_client_secret
defaultValue: None
- name: o_auth_bearer_scope
defaultValue: None
- name: o_auth_bearer_token_endpoint_url
defaultValue: None
- name: o_auth_bearer_extensions
defaultValue: None
- name: authentication_mode
defaultValue: NotSet
- name: protocol
defaultValue: NotSet
- name: cardinality
defaultValue: One
- name: lag_threshold
defaultValue: '1000'
- name: data_type
defaultValue: None
- uid: azure.functions.TriggerApi.orchestration_trigger
name: orchestration_trigger
summary: Register an Orchestrator Function.
signature: 'orchestration_trigger(context_name: str, orchestration: str | None =
None)'
parameters:
- name: context_name
description: Parameter name of the DurableOrchestrationContext object.
isRequired: true
types:
- <xref:str>
- name: orchestration
description: 'Name of Orchestrator Function.
By default, the name of the method is used.'
defaultValue: None
types:
- <xref:Optional>[<xref:str>]
- uid: azure.functions.TriggerApi.queue_trigger
name: queue_trigger
summary: 'The queue_trigger decorator adds <xref:azure.functions.QueueTrigger> to
the
<xref:azure.functions.FunctionBuilder> object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining QueueTrigger
in the function.json which enables function to be triggered when new
message(s) are sent to the storage queue.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-binding-queue](https://aka.ms/azure-function-binding-queue)
<xref:azure.functions.QueueMessage> object in function code.
:param queue_name: The name of the queue to poll.
:param connection: The name of an app setting or setting collection
that specifies how to connect to Azure Queues.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:param kwargs: Keyword arguments for specifying additional binding
fields to include in the binding json.'
signature: 'queue_trigger(arg_name: str, queue_name: str, connection: str, data_type:
DataType | None = None, **kwargs) -> Callable[[...], Any]'
parameters:
- name: arg_name
isRequired: true
- name: queue_name
isRequired: true
- name: connection
isRequired: true
- name: data_type
defaultValue: None
return:
description: Decorator function.
- uid: azure.functions.TriggerApi.route
name: route
summary: 'The route decorator adds <xref:azure.functions.HttpTrigger> and
<xref:azure.functions.HttpOutput> binding to the <xref:azure.functions.FunctionBuilder>
object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining HttpTrigger
and HttpOutput binding in the function.json which enables your
function be triggered when http requests hit the specified route.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-binding-http](https://aka.ms/azure-function-binding-http)
to function name if present or user defined python function name.
:param trigger_arg_name: Argument name for <xref:azure.functions.HttpRequest>,
defaults to ''req''.
:param binding_arg_name: Argument name for <xref:azure.functions.HttpResponse>,
defaults to ''$return''.
:param methods: A tuple of the HTTP methods to which the function
responds.
:param auth_level: Determines what keys, if any, need to be present
on the request in order to invoke the function.
:return: Decorator function.
:param trigger_extra_fields: Additional fields to include in trigger
json. For example,
>>> data_type=''STRING'' # ''dataType'': ''STRING'' in trigger json
:param binding_extra_fields: Additional fields to include in binding
json. For example,
>>> data_type=''STRING'' # ''dataType'': ''STRING'' in binding json'
signature: 'route(route: str | None = None, trigger_arg_name: str = ''req'', binding_arg_name:
str = ''$return'', methods: Iterable[str] | Iterable[HttpMethod] | None = None,
auth_level: AuthLevel | str | None = None, trigger_extra_fields: Dict[str, Any]
| None = None, binding_extra_fields: Dict[str, Any] | None = None) -> Callable[[...],
Any]'
parameters:
- name: route
description: Route for the http endpoint, if None, it will be set
defaultValue: None
- name: trigger_arg_name
defaultValue: req
- name: binding_arg_name
defaultValue: $return
- name: methods
defaultValue: None
- name: auth_level
defaultValue: None
- name: trigger_extra_fields
defaultValue: None
- name: binding_extra_fields
defaultValue: None
- uid: azure.functions.TriggerApi.schedule
name: schedule
summary: 'The schedule or timer decorator adds <xref:azure.functions.TimerTrigger>
to the
<xref:azure.functions.FunctionBuilder> object
for building <xref:azure.functions.Function> object used in worker function
indexing model. This is equivalent to defining TimerTrigger
in the function.json which enables your function be triggered on the
specified schedule.
All optional fields will be given default value by function host when
they are parsed by function host.
Ref: [https://aka.ms/azure-function-binding-timer](https://aka.ms/azure-function-binding-timer)
<xref:azure.functions.TimerRequest> object in function code.
:param schedule: A string representing a CRON expression that will
be used to schedule a function to run.
:param run_on_startup: If true, the function is invoked when the
runtime starts.
:param use_monitor: Set to true or false to indicate whether the
schedule should be monitored.
:param data_type: Defines how Functions runtime should treat the
parameter value.
:return: Decorator function.'
signature: 'schedule(arg_name: str, schedule: str, run_on_startup: bool | None =
None, use_monitor: bool | None = None, data_type: DataType | str | None = None,
**kwargs: Any) -> Callable[[...], Any]'
parameters:
- name: arg_name
description: The name of the variable that represents the
isRequired: true
- name: schedule
isRequired: true
- name: run_on_startup
defaultValue: None
- name: use_monitor
defaultValue: None
- name: data_type
defaultValue: None
- uid: azure.functions.TriggerApi.service_bus_queue_trigger
name: service_bus_queue_trigger