TriggerApi Class
Interface to extend for using existing trigger decorator functions.
- Inheritance
-
TriggerApiTriggerApi
Constructor
TriggerApi(*args, **kwargs)
Methods
activity_trigger |
Register an Activity Function. |
assistant_skill_trigger |
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 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. |
blob_trigger |
The blob_change_trigger decorator adds <xref:azure.functions.BlobTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 :param arg_name: The name of the variable that represents the 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. |
cosmos_db_trigger |
The cosmos_db_trigger decorator adds <xref:azure.functions.CosmosDBTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This decorator will work only with extension bundle 4.x and above. For additional details, please refer https://aka.ms/cosmosdb-v4-update. This is equivalent to defining CosmosDBTrigger in the function.json which enables function to be triggered when CosmosDB data is changed. 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-cosmosdb-v4 DocumentList object in function code :param connection: The name of an app setting or setting collection that specifies how to connect to the Azure Cosmos DB account being monitored. the collection being monitored :param container_name: The name of the container being monitored :param lease_connection: (Optional) The name of an app setting or setting container that specifies how to connect to the Azure Cosmos DB account that holds the lease container collection used to store leases :param lease_container_name: (Optional) The name of the container used to store leases. When not set, the value leases is used true, the leases container is automatically created when it doesn't already exist. The default value is false. When using Azure AD identities if you set the value to true, creating containers is not an
Request Units to assign when the leases container is created. This setting is only used when createLeaseContainerIfNotExists is set to true. This parameter is automatically set when the binding is created using the portal :param lease_container_prefix: (Optional) When set, the value is added as a prefix to the leases created in the Lease container for this function. Using a prefix allows two separate Azure Functions to share the same Lease container by using different prefixes :param feed_poll_delay: The time (in milliseconds) for the delay between polling a partition for new changes on the feed, after all current changes are drained :param lease_acquire_interval: When set, it defines, in milliseconds, the interval to kick off a task to compute if partitions are distributed evenly among known host instances :param lease_expiration_interval: When set, it defines, in milliseconds, the interval for which the lease is taken on a lease representing a partition :param lease_renew_interval: When set, it defines, in milliseconds, the renew interval for all leases for partitions currently held by an instance :param max_items_per_invocation: When set, this property sets the maximum number of items received per Function call :param start_from_beginning: This option tells the Trigger to read changes from the beginning of the collection's change history instead of starting at the current time :param start_from_time: (Optional) Gets or sets the date and time from which to initialize the change feed read operation. The recommended format is ISO 8601 with the UTC designator, such as 2021-02-16T14:19:29Z. This is only used to set the initial trigger state. After the trigger has a lease state, changing this value has no effect :param preferred_locations: Defines preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service :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 |
cosmos_db_trigger_v3 |
The cosmos_db_trigger_v3 decorator adds <xref:azure.functions.CosmosDBTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This decorator will work only with extension bundle 2.x or 3.x. For additional details, please refer https://aka.ms/cosmosdb-v4-update. This is equivalent to defining CosmosDBTrigger in the function.json which enables function to be triggered when CosmosDB data is changed. 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-cosmosdb-v2 DocumentList object in function code. :param database_name: The name of the Azure Cosmos DB database with the collection being monitored. :param collection_name: The name of the collection being monitored. :param connection_string_setting: The name of an app setting or setting collection that specifies how to connect to the Azure Cosmos DB account being monitored. :param lease_collection_name: The name of the collection used to store leases. :param lease_connection_string_setting: The name of an app setting or setting collection that specifies how to connect to the Azure Cosmos DB account that holds the lease collection. :param lease_database_name: The name of the database that holds the collection used to store leases. :param create_lease_collection_if_not_exists: When set to true, the leases collection is automatically created when it doesn't already exist. :param leases_collection_throughput: Defines the number of Request Units to assign when the leases collection is created. :param lease_collection_prefix: When set, the value is added as a prefix to the leases created in the Lease collection for this Function. :param checkpoint_interval: When set, it defines, in milliseconds, the interval between lease checkpoints. Default is always after a Function call. :param checkpoint_document_count: Customizes the amount of documents between lease checkpoints. Default is always after a Function call. :param feed_poll_delay: The time (in milliseconds) for the delay between polling a partition for new changes on the feed, after all current changes are drained. :param lease_renew_interval: When set, it defines, in milliseconds, the renew interval for all leases for partitions currently held by an instance. :param lease_acquire_interval: When set, it defines, in milliseconds, the interval to kick off a task to compute if partitions are distributed evenly among known host instances. :param lease_expiration_interval: When set, it defines, in milliseconds, the interval for which the lease is taken on a lease representing a partition. :param max_items_per_invocation: When set, this property sets the maximum number of items received per Function call. :param start_from_beginning: This option tells the Trigger to read changes from the beginning of the collection's change history instead of starting at the current time. :param preferred_locations: Defines preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. :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. |
dapr_binding_trigger |
The dapr_binding_trigger decorator adds <xref:azure.functions.DaprBindingTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 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. |
dapr_service_invocation_trigger |
The dapr_service_invocation_trigger decorator adds <xref:azure.functions.DaprServiceInvocationTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 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. |
dapr_topic_trigger |
The dapr_topic_trigger decorator adds <xref:azure.functions.DaprTopicTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 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. |
entity_trigger |
Register an Entity Function. |
event_grid_trigger |
The event_grid_trigger decorator adds <xref:azure.functions.EventGridTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 parameter value. :return: Decorator function. |
event_hub_message_trigger |
The event_hub_message_trigger decorator adds <xref:azure.functions.EventHubTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 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. |
function_name |
Optional: Sets name of the Function object. If not set, it will default to the name of the method name. additional setting fields :return: Decorator function. |
generic_trigger |
The generic_trigger decorator adds <xref:azure.functions.GenericTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 fields to include in the binding json. |
http_type |
Set http type of the Function object. |
kafka_trigger |
The kafka_trigger decorator adds <xref:azure.functions.KafkaTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining kafka trigger in the function.json which enables function to be triggered to respond to an event sent to a kafka topic. All optional fields will be given default value by function host when they are parsed by function host. Ref: https://aka.ms/kafkatrigger contains the connection string for the eventhub when using Kafka protocol header feature of Azure EventHubs. :param consumer_group: Kafka consumer group used by the trigger. :param avro_schema: This should be used only if a generic record should be generated. :param username: SASL username for use with the PLAIN and SASL-SCRAM-.. mechanisms. Default is empty string. This is equivalent to 'sasl.username' in librdkafka. :param password: SASL password for use with the PLAIN and SASL-SCRAM-.. mechanisms. Default is empty string. This is equivalent to 'sasl.password' in librdkafka. :param ssl_key_location: Path to client's private key (PEM) used for authentication. Default is empty string. This is equivalent to 'ssl.key.location' in librdkafka. :param ssl_ca_location: Path to CA certificate file for verifying the broker's certificate. This is equivalent to 'ssl.ca.location' in librdkafka. :param ssl_certificate_location: Path to client's certificate. This is equivalent to 'ssl.certificate.location' in librdkafka. :param ssl_key_password: Password for client's certificate. This is equivalent to 'ssl.key.password' in librdkafka. :param schema_registry_url: URL for the Avro Schema Registry. :param schema_registry_username: Username for the Avro Schema Registry. :param schema_registry_password: Password for the Avro Schema Registry. :param o_auth_bearer_method: Either 'default' or 'oidc'. sasl.oauthbearer in librdkafka. :param o_auth_bearer_client_id: Specify only when o_auth_bearer_method is 'oidc'. sasl.oauthbearer.client.id in librdkafka. :param o_auth_bearer_client_secret: Specify only when o_auth_bearer_method is 'oidc'. sasl.oauthbearer.client.secret in librdkafka. :param o_auth_bearer_scope: Specify only when o_auth_bearer_method is 'oidc'. Client use this to specify the scope of the access request to the broker. sasl.oauthbearer.scope in librdkafka. :param o_auth_bearer_token_endpoint_url: Specify only when o_auth_bearer_method is 'oidc'. sasl.oauthbearer.token.endpoint.url in librdkafka. :param o_auth_bearer_extensions: Allow additional information to be provided to the broker. Comma-separated list of key=value pairs. E.g., "supportFeatureX=true,organizationId=sales-emea". sasl.oauthbearer.extensions in librdkafka :param authentication_mode: SASL mechanism to use for authentication. Allowed values: Gssapi, Plain, ScramSha256, ScramSha512. Default is Plain. This is equivalent to 'sasl.mechanism' in librdkafka. :param protocol: Gets or sets the security protocol used to communicate with brokers. Default is plain text. This is equivalent to 'security.protocol' in librdkafka. TODO :param lag_threshold: Maximum number of unprocessed messages a worker is expected to have at an instance. When target-based scaling is not disabled, this is used to divide total unprocessed event count to determine the number of worker instances, which will then be rounded up to a worker instance count that creates a balanced partition distribution. Default is 1000. :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 :return: Decorator function. |
orchestration_trigger |
Register an Orchestrator Function. |
queue_trigger |
The queue_trigger decorator adds <xref:azure.functions.QueueTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 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. |
route |
The route decorator adds <xref:azure.functions.HttpTrigger> and <xref:azure.functions.HttpOutput> binding to the <xref:azure.functions.FunctionBuilder> object for building 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 to function name if present or user defined python function name. :param trigger_arg_name: Argument name for HttpRequest, defaults to 'req'. :param binding_arg_name: Argument name for 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,
|
schedule |
The schedule or timer decorator adds <xref:azure.functions.TimerTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 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. |
service_bus_queue_trigger |
The on_service_bus_queue_change decorator adds <xref:azure.functions.ServiceBusQueueTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining ServiceBusQueueTrigger in the function.json which enables your function be triggered when new message(s) are sent to the service bus 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-service-bus ServiceBusMessage object in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to Service Bus. :param queue_name: Name of the queue to monitor. :param data_type: Defines how Functions runtime should treat the parameter value. :param access_rights: Access rights for the connection string. :param is_sessions_enabled: True if connecting to a session-aware queue or subscription. :param cardinality: Set to many in order to enable batching. :return: Decorator function. |
service_bus_topic_trigger |
The on_service_bus_topic_change decorator adds <xref:azure.functions.ServiceBusTopicTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining ServiceBusTopicTrigger in the function.json which enables function to be triggered when new message(s) are sent to the service bus topic. 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-service-bus ServiceBusMessage object in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to Service Bus. :param topic_name: Name of the topic to monitor. :param subscription_name: Name of the subscription to monitor. :param data_type: Defines how Functions runtime should treat the parameter value. :param access_rights: Access rights for the connection string. :param is_sessions_enabled: True if connecting to a session-aware queue or subscription. :param cardinality: Set to many in order to enable batching. :return: Decorator function. |
sql_trigger |
The sql_trigger decorator adds <xref:azure.functions.SqlTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This decorator will work only with extension bundle 4.x and above. This is equivalent to defining SqlTrigger in the function.json which enables function to be triggered when there are changes in the Sql table. All optional fields will be given default value by function host when they are parsed by function host. Ref: https://aka.ms/sqlbindings SqlRowList object in the function code :param table_name: The name of the table monitored by the trigger :param connection_string_setting: The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed :param leases_table_name: The name of the table used to store leases. If not specified, the leases table name will be Leases_{FunctionId}_{TableId}. :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 |
timer_trigger |
The schedule or timer decorator adds <xref:azure.functions.TimerTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 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. |
warm_up_trigger |
The warm up decorator adds <xref:azure.functions.WarmUpTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining WarmUpTrigger 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-warmup TimerRequest object in function code. :param data_type: Defines how Functions runtime should treat the parameter value. :return: Decorator function. |
activity_trigger
Register an Activity Function.
activity_trigger(input_name: str, activity: str | None = None)
Parameters
Name | Description |
---|---|
input_name
Required
|
Parameter name of the Activity input. |
activity
Required
|
<xref:Optional>[str]
Name of Activity Function. Default value: None
|
assistant_skill_trigger
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
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.
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 | Description |
---|---|
arg_name
Required
|
|
function_description
Required
|
|
function_name
Required
|
Default value: None
|
parameter_description_json
Required
|
Default value: None
|
model
Required
|
Default value: DefaultChatModel
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
blob_trigger
The blob_change_trigger decorator adds <xref:azure.functions.BlobTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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 :param arg_name: The name of the variable that represents the 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.
blob_trigger(arg_name: str, path: str, connection: str, source: BlobSource | None = None, data_type: DataType | None = None, **kwargs) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
|
path
Required
|
|
connection
Required
|
|
source
Required
|
Default value: None
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
cosmos_db_trigger
The cosmos_db_trigger decorator adds <xref:azure.functions.CosmosDBTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This decorator will work only with extension bundle 4.x and above. For additional details, please refer https://aka.ms/cosmosdb-v4-update. This is equivalent to defining CosmosDBTrigger in the function.json which enables function to be triggered when CosmosDB data is changed. 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-cosmosdb-v4
DocumentList object in function code :param connection: The name of an app setting or setting collection that specifies how to connect to the Azure Cosmos DB account being
monitored.
the collection being monitored :param container_name: The name of the container being monitored :param lease_connection: (Optional) The name of an app setting or
setting container that specifies how to connect to the Azure Cosmos DB account that holds the lease container
collection used to store leases :param lease_container_name: (Optional) The name of the container used
to store leases. When not set, the value leases is used
true, the leases container is automatically created when it doesn't already exist. The default value is false. When using Azure AD identities if you set the value to true, creating containers is not an
allowed operation and your Function won't be able to start
Request Units to assign when the leases container is created. This setting is only used when createLeaseContainerIfNotExists is set to true. This parameter is automatically set when the binding is created using the portal :param lease_container_prefix: (Optional) When set, the value is added as a prefix to the leases created in the Lease container for this function. Using a prefix allows two separate Azure Functions to share the same Lease container by using different prefixes :param feed_poll_delay: The time (in milliseconds) for the delay between polling a partition for new changes on the feed, after all current changes are drained :param lease_acquire_interval: When set, it defines, in milliseconds, the interval to kick off a task to compute if partitions are distributed evenly among known host instances :param lease_expiration_interval: When set, it defines, in milliseconds, the interval for which the lease is taken on a lease representing a partition :param lease_renew_interval: When set, it defines, in milliseconds, the renew interval for all leases for partitions currently held by an instance :param max_items_per_invocation: When set, this property sets the maximum number of items received per Function call :param start_from_beginning: This option tells the Trigger to read changes from the beginning of the collection's change history instead of starting at the current time :param start_from_time: (Optional) Gets or sets the date and time from which to initialize the change feed read operation. The recommended format is ISO 8601 with the UTC designator, such as 2021-02-16T14:19:29Z. This is only used to set the initial trigger state. After the trigger has a lease state, changing this value has no effect :param preferred_locations: Defines preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service :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
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 | Description |
---|---|
arg_name
Required
|
|
connection
Required
|
|
database_name
Required
|
|
container_name
Required
|
|
lease_connection
Required
|
Default value: None
|
lease_database_name
Required
|
Default value: None
|
lease_container_name
Required
|
Default value: None
|
create_lease_container_if_not_exists
Required
|
Default value: None
|
leases_container_throughput
Required
|
Default value: None
|
lease_container_prefix
Required
|
Default value: None
|
feed_poll_delay
Required
|
Default value: None
|
lease_acquire_interval
Required
|
Default value: None
|
lease_expiration_interval
Required
|
Default value: None
|
lease_renew_interval
Required
|
Default value: None
|
max_items_per_invocation
Required
|
Default value: None
|
start_from_beginning
Required
|
Default value: None
|
start_from_time
Required
|
Default value: None
|
preferred_locations
Required
|
Default value: None
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
cosmos_db_trigger_v3
The cosmos_db_trigger_v3 decorator adds <xref:azure.functions.CosmosDBTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This decorator will work only with extension bundle 2.x or 3.x. For additional details, please refer https://aka.ms/cosmosdb-v4-update. This is equivalent to defining CosmosDBTrigger in the function.json
which enables function to be triggered when CosmosDB data is changed.
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-cosmosdb-v2
DocumentList object in function code. :param database_name: The name of the Azure Cosmos DB database with the collection being monitored. :param collection_name: The name of the collection being monitored. :param connection_string_setting: The name of an app setting or setting collection that specifies how to connect to the Azure Cosmos DB account being monitored. :param lease_collection_name: The name of the collection used to store leases. :param lease_connection_string_setting: The name of an app setting or setting collection that specifies how to connect to the Azure Cosmos DB account that holds the lease collection. :param lease_database_name: The name of the database that holds the collection used to store leases. :param create_lease_collection_if_not_exists: When set to true, the leases collection is automatically created when it doesn't already exist. :param leases_collection_throughput: Defines the number of Request Units to assign when the leases collection is created. :param lease_collection_prefix: When set, the value is added as a prefix to the leases created in the Lease collection for this Function. :param checkpoint_interval: When set, it defines, in milliseconds, the interval between lease checkpoints. Default is always after a Function call. :param checkpoint_document_count: Customizes the amount of documents between lease checkpoints. Default is always after a Function call. :param feed_poll_delay: The time (in milliseconds) for the delay between polling a partition for new changes on the feed, after all current changes are drained. :param lease_renew_interval: When set, it defines, in milliseconds, the renew interval for all leases for partitions currently held by an instance. :param lease_acquire_interval: When set, it defines, in milliseconds, the interval to kick off a task to compute if partitions are distributed evenly among known host instances. :param lease_expiration_interval: When set, it defines, in milliseconds, the interval for which the lease is taken on a lease representing a partition. :param max_items_per_invocation: When set, this property sets the maximum number of items received per Function call. :param start_from_beginning: This option tells the Trigger to read changes from the beginning of the collection's change history instead of starting at the current time. :param preferred_locations: Defines preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. :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.
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 | Description |
---|---|
arg_name
Required
|
|
database_name
Required
|
|
collection_name
Required
|
|
connection_string_setting
Required
|
|
lease_collection_name
Required
|
Default value: None
|
lease_connection_string_setting
Required
|
Default value: None
|
lease_database_name
Required
|
Default value: None
|
create_lease_collection_if_not_exists
Required
|
Default value: None
|
leases_collection_throughput
Required
|
Default value: None
|
lease_collection_prefix
Required
|
Default value: None
|
checkpoint_interval
Required
|
Default value: None
|
checkpoint_document_count
Required
|
Default value: None
|
feed_poll_delay
Required
|
Default value: None
|
lease_renew_interval
Required
|
Default value: None
|
lease_acquire_interval
Required
|
Default value: None
|
lease_expiration_interval
Required
|
Default value: None
|
max_items_per_invocation
Required
|
Default value: None
|
start_from_beginning
Required
|
Default value: None
|
preferred_locations
Required
|
Default value: None
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
dapr_binding_trigger
The dapr_binding_trigger decorator adds <xref:azure.functions.DaprBindingTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
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.
dapr_binding_trigger(arg_name: str, binding_name: str, data_type: DataType | str | None = None, **kwargs: Any) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
|
binding_name
Required
|
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
dapr_service_invocation_trigger
The dapr_service_invocation_trigger decorator adds <xref:azure.functions.DaprServiceInvocationTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
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.
dapr_service_invocation_trigger(arg_name: str, method_name: str, data_type: DataType | str | None = None, **kwargs: Any) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
|
method_name
Required
|
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
dapr_topic_trigger
The dapr_topic_trigger decorator adds <xref:azure.functions.DaprTopicTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
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.
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 | Description |
---|---|
arg_name
Required
|
|
pub_sub_name
Required
|
|
topic
Required
|
|
route
Required
|
Default value: None
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
entity_trigger
Register an Entity Function.
entity_trigger(context_name: str, entity_name: str | None = None)
Parameters
Name | Description |
---|---|
context_name
Required
|
Parameter name of the Entity input. |
entity_name
Required
|
<xref:Optional>[str]
Name of Entity Function. Default value: None
|
event_grid_trigger
The event_grid_trigger decorator adds <xref:azure.functions.EventGridTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
parameter value. :return: Decorator function.
event_grid_trigger(arg_name: str, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
the variable name used in function code for the parameter that receives the event data. |
data_type
Required
|
Defines how Functions runtime should treat the Default value: None
|
event_hub_message_trigger
The event_hub_message_trigger decorator adds <xref:azure.functions.EventHubTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
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.
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 | Description |
---|---|
arg_name
Required
|
|
connection
Required
|
|
event_hub_name
Required
|
|
data_type
Required
|
Default value: None
|
cardinality
Required
|
Default value: None
|
consumer_group
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
function_name
Optional: Sets name of the Function object. If not set, it will default to the name of the method name.
additional setting fields :return: Decorator function.
function_name(name: str, setting_extra_fields: Dict[str, Any] | None = None) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
name
Required
|
Name of the function. |
setting_extra_fields
Required
|
Keyword arguments for specifying Default value: None
|
generic_trigger
The generic_trigger decorator adds <xref:azure.functions.GenericTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
fields to include in the binding json.
generic_trigger(arg_name: str, type: str, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
|
type
Required
|
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
http_type
Set http type of the Function object.
http_type(http_type: str) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
http_type
Required
|
Http type of the function. |
Returns
Type | Description |
---|---|
Decorator function. |
kafka_trigger
The kafka_trigger decorator adds <xref:azure.functions.KafkaTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining kafka trigger in the function.json which enables function to be triggered to respond to an event sent to a kafka topic. All optional fields will be given default value by function host when they are parsed by function host.
Ref: https://aka.ms/kafkatrigger
contains the connection string for the eventhub when using Kafka protocol header feature of Azure EventHubs. :param consumer_group: Kafka consumer group used by the trigger. :param avro_schema: This should be used only if a generic record should be generated. :param username: SASL username for use with the PLAIN and SASL-SCRAM-..
mechanisms. Default is empty string. This is equivalent to
'sasl.username' in librdkafka. :param password: SASL password for use with the PLAIN and SASL-SCRAM-..
mechanisms. Default is empty string. This is equivalent to
'sasl.password' in librdkafka. :param ssl_key_location: Path to client's private key (PEM) used for
authentication. Default is empty string. This is equivalent to
'ssl.key.location' in librdkafka. :param ssl_ca_location: Path to CA certificate file for verifying the broker's certificate. This is equivalent to 'ssl.ca.location' in librdkafka. :param ssl_certificate_location: Path to client's certificate. This is equivalent to 'ssl.certificate.location' in librdkafka. :param ssl_key_password: Password for client's certificate. This is equivalent to 'ssl.key.password' in librdkafka. :param schema_registry_url: URL for the Avro Schema Registry. :param schema_registry_username: Username for the Avro Schema Registry. :param schema_registry_password: Password for the Avro Schema Registry. :param o_auth_bearer_method: Either 'default' or 'oidc'. sasl.oauthbearer in librdkafka. :param o_auth_bearer_client_id: Specify only when o_auth_bearer_method is 'oidc'. sasl.oauthbearer.client.id in librdkafka. :param o_auth_bearer_client_secret: Specify only when o_auth_bearer_method is 'oidc'. sasl.oauthbearer.client.secret in librdkafka. :param o_auth_bearer_scope: Specify only when o_auth_bearer_method is 'oidc'. Client use this to specify the scope of the access request to the broker. sasl.oauthbearer.scope in librdkafka. :param o_auth_bearer_token_endpoint_url: Specify only when o_auth_bearer_method is 'oidc'. sasl.oauthbearer.token.endpoint.url in librdkafka. :param o_auth_bearer_extensions: Allow additional information to be provided to the broker. Comma-separated list of key=value pairs. E.g., "supportFeatureX=true,organizationId=sales-emea". sasl.oauthbearer.extensions in librdkafka :param authentication_mode: SASL mechanism to use for authentication. Allowed values: Gssapi, Plain, ScramSha256, ScramSha512. Default is Plain. This is equivalent to 'sasl.mechanism' in librdkafka. :param protocol: Gets or sets the security protocol used to communicate
with brokers. Default is plain text. This is equivalent to
'security.protocol' in librdkafka. TODO :param lag_threshold: Maximum number of unprocessed messages a worker is expected to have at an instance. When target-based scaling is not disabled, this is used to divide total unprocessed event count to determine the number of worker instances, which will then be rounded up to a worker instance count that creates a balanced partition distribution. Default is 1000. :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 :return: Decorator function.
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 | Description |
---|---|
arg_name
Required
|
the variable name used in function code for the parameter that has the kafka event data. |
topic
Required
|
The topic monitored by the trigger. |
broker_list
Required
|
The list of Kafka brokers monitored by the trigger. |
event_hub_connection_string
Required
|
The name of an app setting that Default value: None
|
consumer_group
Required
|
Default value: None
|
avro_schema
Required
|
Default value: None
|
username
Required
|
Default value: None
|
password
Required
|
Default value: None
|
ssl_key_location
Required
|
Default value: None
|
ssl_ca_location
Required
|
Default value: None
|
ssl_certificate_location
Required
|
Default value: None
|
ssl_key_password
Required
|
Default value: None
|
schema_registry_url
Required
|
Default value: None
|
schema_registry_username
Required
|
Default value: None
|
schema_registry_password
Required
|
Default value: None
|
o_auth_bearer_method
Required
|
Default value: None
|
o_auth_bearer_client_id
Required
|
Default value: None
|
o_auth_bearer_client_secret
Required
|
Default value: None
|
o_auth_bearer_scope
Required
|
Default value: None
|
o_auth_bearer_token_endpoint_url
Required
|
Default value: None
|
o_auth_bearer_extensions
Required
|
Default value: None
|
authentication_mode
Required
|
Default value: NotSet
|
protocol
Required
|
Default value: NotSet
|
cardinality
Required
|
Default value: One
|
lag_threshold
Required
|
Default value: 1000
|
data_type
Required
|
Default value: None
|
orchestration_trigger
Register an Orchestrator Function.
orchestration_trigger(context_name: str, orchestration: str | None = None)
Parameters
Name | Description |
---|---|
context_name
Required
|
Parameter name of the DurableOrchestrationContext object. |
orchestration
Required
|
<xref:Optional>[str]
Name of Orchestrator Function. By default, the name of the method is used. Default value: None
|
queue_trigger
The queue_trigger decorator adds <xref:azure.functions.QueueTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
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.
queue_trigger(arg_name: str, queue_name: str, connection: str, data_type: DataType | None = None, **kwargs) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
|
queue_name
Required
|
|
connection
Required
|
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
route
The route decorator adds <xref:azure.functions.HttpTrigger> and <xref:azure.functions.HttpOutput> binding to the <xref:azure.functions.FunctionBuilder> object for building 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
to function name if present or user defined python function name. :param trigger_arg_name: Argument name for HttpRequest, defaults to 'req'. :param binding_arg_name: Argument name for 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
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 | Description |
---|---|
route
|
Route for the http endpoint, if None, it will be set Default value: None
|
trigger_arg_name
|
Default value: req
|
binding_arg_name
|
Default value: $return
|
methods
|
Default value: None
|
auth_level
|
Default value: None
|
trigger_extra_fields
|
Default value: None
|
binding_extra_fields
|
Default value: None
|
schedule
The schedule or timer decorator adds <xref:azure.functions.TimerTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
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.
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 | Description |
---|---|
arg_name
Required
|
The name of the variable that represents the |
schedule
Required
|
|
run_on_startup
Required
|
Default value: None
|
use_monitor
Required
|
Default value: None
|
data_type
Required
|
Default value: None
|
service_bus_queue_trigger
The on_service_bus_queue_change decorator adds <xref:azure.functions.ServiceBusQueueTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining ServiceBusQueueTrigger in the function.json which enables your function be triggered when new message(s) are sent to the service bus 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-service-bus
ServiceBusMessage object in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to Service Bus. :param queue_name: Name of the queue to monitor. :param data_type: Defines how Functions runtime should treat the parameter value. :param access_rights: Access rights for the connection string. :param is_sessions_enabled: True if connecting to a session-aware queue or subscription. :param cardinality: Set to many in order to enable batching. :return: Decorator function.
service_bus_queue_trigger(arg_name: str, connection: str, queue_name: str, data_type: DataType | str | None = None, access_rights: AccessRights | str | None = None, is_sessions_enabled: bool | None = None, cardinality: Cardinality | str | None = None, **kwargs: Any) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
The name of the variable that represents the |
connection
Required
|
|
queue_name
Required
|
|
data_type
Required
|
Default value: None
|
access_rights
Required
|
Default value: None
|
is_sessions_enabled
Required
|
Default value: None
|
cardinality
Required
|
Default value: None
|
service_bus_topic_trigger
The on_service_bus_topic_change decorator adds <xref:azure.functions.ServiceBusTopicTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining ServiceBusTopicTrigger in the function.json which enables function to be triggered when new message(s) are sent to the service bus topic. 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-service-bus
ServiceBusMessage object in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to Service Bus. :param topic_name: Name of the topic to monitor. :param subscription_name: Name of the subscription to monitor. :param data_type: Defines how Functions runtime should treat the parameter value. :param access_rights: Access rights for the connection string. :param is_sessions_enabled: True if connecting to a session-aware queue or subscription. :param cardinality: Set to many in order to enable batching. :return: Decorator function.
service_bus_topic_trigger(arg_name: str, connection: str, topic_name: str, subscription_name: str, data_type: DataType | str | None = None, access_rights: AccessRights | str | None = None, is_sessions_enabled: bool | None = None, cardinality: Cardinality | str | None = None, **kwargs: Any) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
The name of the variable that represents the |
connection
Required
|
|
topic_name
Required
|
|
subscription_name
Required
|
|
data_type
Required
|
Default value: None
|
access_rights
Required
|
Default value: None
|
is_sessions_enabled
Required
|
Default value: None
|
cardinality
Required
|
Default value: None
|
sql_trigger
The sql_trigger decorator adds <xref:azure.functions.SqlTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This decorator will work only with extension bundle 4.x and above. This is equivalent to defining SqlTrigger in the function.json which enables function to be triggered when there are changes in the Sql table. All optional fields will be given default value by function host when they are parsed by function host.
Ref: https://aka.ms/sqlbindings
SqlRowList object in the function code :param table_name: The name of the table monitored by the trigger :param connection_string_setting: The name of an app setting that contains the connection string for the database against which the query or stored procedure is being executed :param leases_table_name: The name of the table used to store leases. If not specified, the leases table name will be Leases_{FunctionId}_{TableId}. :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
sql_trigger(arg_name: str, table_name: str, connection_string_setting: str, leases_table_name: str | None = None, data_type: DataType | None = None, **kwargs) -> Callable[[...], Any]
Parameters
Name | Description |
---|---|
arg_name
Required
|
|
table_name
Required
|
|
connection_string_setting
Required
|
|
leases_table_name
Required
|
Default value: None
|
data_type
Required
|
Default value: None
|
Returns
Type | Description |
---|---|
Decorator function. |
timer_trigger
The schedule or timer decorator adds <xref:azure.functions.TimerTrigger> to the <xref:azure.functions.FunctionBuilder> object for building 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
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.
timer_trigger(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 | Description |
---|---|
arg_name
Required
|
The name of the variable that represents the |
schedule
Required
|
|
run_on_startup
Required
|
Default value: None
|
use_monitor
Required
|
Default value: None
|
data_type
Required
|
Default value: None
|
warm_up_trigger
The warm up decorator adds <xref:azure.functions.WarmUpTrigger> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining WarmUpTrigger 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-warmup
TimerRequest object in function code. :param data_type: Defines how Functions runtime should treat the parameter value. :return: Decorator function.
warm_up_trigger(arg_name: str, data_type: DataType | str | None = None, **kwargs) -> Callable
Parameters
Name | Description |
---|---|
arg_name
Required
|
The name of the variable that represents the |
data_type
Required
|
Default value: None
|
Attributes
app_script_file
Name of function app script file in which all the functions are defined.
Script file defined here is for placeholder purpose, please refer to worker defined script file path as the single point of truth.
Returns
Type | Description |
---|---|
Script file name. |
Azure SDK for Python