你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Blueprint Class

Functions container class where all the functions loaded in it can be registered in FunctionRegister subclasses but itself can not be indexed directly. The class contains all existing supported trigger and binding decorator functions.

Inheritance
Blueprint
Blueprint
Blueprint

Constructor

Blueprint(*args, **kwargs)

Methods

activity_trigger

Register an Activity Function.

assistant_create_output

The assistantCreate output binding creates a new assistant with a specified system prompt.

parameter value :param kwargs: Keyword arguments for specifying additional binding fields to include in the binding json

assistant_post_input

The assistantPost output binding sends a message to the assistant and saves the response in its internal state.

assistant to respond to. :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_query_input

The assistantQuery input binding fetches the assistant history and passes it to the function.

history to fetch. The timestamp should be in ISO 8601 format - for example, 2023-08-01T00:00:00Z. :param id: The ID of the Assistant to query. :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

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_input

The blob_input decorator adds <xref:azure.functions.BlobInput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining BlobInput in the function.json which enables function to write message(s) 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

that specifies how to connect to Azure Blobs. :param data_type: Defines how Functions runtime should treat the

parameter value.

fields to include in the binding json.

blob_output

The blob_output decorator adds <xref:azure.functions.BlobOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining BlobOutput in the function.json which enables function to write message(s) 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

fields to include in the binding json. :return: 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.

cosmos_db_input

The cosmos_db_input decorator adds <xref:azure.functions.CosmosDBInput> 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 CosmosDBInput in the function.json which

enables function to read from CosmosDB.

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 input object in function code :param connection: The name of an app setting or setting container that

specifies how to connect to the Azure Cosmos DB account being monitored containing your Azure Cosmos DB connection string

document :param partition_key: Specifies the partition key value for the lookup :param id: The ID of the document to retrieve :param sql_query: An Azure Cosmos DB SQL query used for retrieving multiple documents :param preferred_locations: (Optional) Defines preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. Values should be comma-separated. For example, East US,South Central US,North Europe :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_input_v3

The cosmos_db_input_v3 decorator adds <xref:azure.functions.CosmosDBInput> 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 CosmosDBInput in the function.json which enables function to read from CosmosDB. 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 input object in function code. :param database_name: The database containing the document. :param collection_name: The name of the collection that contains the document. :param connection_string_setting: The name of the app setting containing your Azure Cosmos DB connection string. :param id: The ID of the document to retrieve. :param sql_query: An Azure Cosmos DB SQL query used for retrieving multiple documents. :param partition_key: Specifies the partition key value for the lookup. :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_output

The cosmos_db_output decorator adds <xref:azure.functions.CosmosDBOutput> 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 CosmosDBOutput in the function.json which enables function to write to the CosmosDB. 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

output 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 :param database_name: The name of the Azure Cosmos DB database with the collection being monitored :param container_name: The name of the container being monitored :param create_if_not_exists: A boolean value to indicate whether the collection is created when it doesn't exist :param partition_key: When CreateIfNotExists is true, it defines the partition key path for the created collection :param container_throughput: When createIfNotExists is true, it defines the throughput of the created container PreferredLocations, it can leverage multi-region writes in the Azure Cosmos DB service :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_output_v3

The cosmos_db_output_v3 decorator adds <xref:azure.functions.CosmosDBOutput> 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 CosmosDBOutput

in the function.json which enables function to write to the CosmosDB. 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

output 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 create_if_not_exists: A boolean value to indicate whether the collection is created when it doesn't exist. :param partition_key: When CreateIfNotExists is true, it defines the partition key path for the created collection. :param collection_throughput: When CreateIfNotExists is true, it defines the throughput of the created collection. :param use_multiple_write_locations: When set to true along with PreferredLocations, it can leverage multi-region writes in the Azure Cosmos DB service. :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

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_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_output

The dapr_binding_output decorator adds <xref:azure.functions.DaprBindingOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprBindingOutput in the function.json which enables function to send a value to a Dapr output 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-binding-output-binding

output object in function code. :param binding_name: The configured name of the binding. :param operation: The configured operation. :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_invoke_output

The dapr_invoke_output decorator adds <xref:azure.functions.DaprInvokeOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprInvokeOutput in the function.json which enables function to invoke another Dapr App. 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-invoke-output-binding

output object in function code. :param app_id: The dapr app name to invoke. :param method_name: The method name of the app to invoke. :param http_verb: The http verb of the app to invoke. :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_publish_output

The dapr_publish_output decorator adds <xref:azure.functions.DaprPublishOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprPublishOutput in the function.json which enables function to publish 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-dapr-publish-output-binding

output object in function code. :param pub_sub_name: The pub/sub name to publish to. :param topic: The name of the topic to publish to. :param dapr_address: Dapr address, it is optional field, by default ßit will be set to http://localhost:{daprHttpPort}. :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_secret_input

The dapr_secret_input decorator adds <xref:azure.functions.DaprSecretInput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprSecretInput in the function.json which enables function to read secret from underlying secret store component. 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-secret-input-binding

input object in function code. :param secret_store_name: The name of the secret store to get the secret from. :param key: The key identifying the name of the secret to get. :param metadata: An array of metadata properties in the form "key1=value1&key2=value2". :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_state_input

The dapr_state_input decorator adds <xref:azure.functions.DaprStateInput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprStateInput in the function.json which enables function to read state from underlying state store component. 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-state-input-binding

input object in function code. :param state_store: State store containing the state. :param key: The name of the key. :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_state_output

The dapr_state_output decorator adds <xref:azure.functions.DaprStateOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprStateOutput in the function.json which enables function to write to the dapr state store. 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-state-output-binding

output object in function code. :param state_store: State store containing the state for keys. :param key: The name of the key. :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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.

durable_client_input

Register a Durable-client Function.

embeddings_input

The embeddings input decorator creates embeddings which will be used to measure the relatedness of text strings.

Ref: https://platform.openai.com/docs/guides/embeddings

embeddings for. :param input_type: The type of the input. :param model: The ID of the model to use. :param max_chunk_length: The maximum number of characters to chunk the input into. Default value: 8 * 1024 :param max_overlap: The maximum number of characters to overlap between chunks. Default value: 128 :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

embeddings_store_output

Supported list of embeddings store is extensible, and more can be added by authoring a specially crafted NuGet package. Visit the currently supported vector specific folder for specific usage information:

  • Azure AI Search

  • Azure Data Explorer

  • Azure Cosmos DB using MongoDB

variable which contains a connection string value :param collection: The collection or table to search. :param model: The ID of the model to use. :param max_chunk_length: The maximum number of characters to chunk the input into. :param max_overlap: The maximum number of characters to overlap between chunks. :param data_type: Optional. Defines how Functions runtime should treat the parameter value. Default value: None :param kwargs: Keyword arguments for specifying additional binding fields to include in the binding json

entity_trigger

Register an Entity Function.

event_grid_output

The event_grid_output decorator adds <xref:azure.functions.EventGridOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining output binding in the function.json which enables function to write events to a custom topic. All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/eventgridtrigger

represents the event. :param data_type: Defines how Functions runtime should treat the parameter value. :param topic_endpoint_uri: The name of an app setting that contains the URI for the custom topic. :param topic_key_setting: The name of an app setting that contains an access key for the custom topic. :param connection: The value of the common prefix for the setting that contains the topic endpoint URI. :return: Decorator 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.

event_hub_output

The event_hub_output decorator adds <xref:azure.functions.EventHubOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining EventHubOutput in the function.json which enables function to write message(s) 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

output object in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to Event Hub. :param event_hub_name: The name of the event hub. :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.

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_input_binding

The generic_input_binding decorator adds <xref:azure.functions.GenericInputBinding> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining a generic input binding in the function.json which enables function to read data from a custom defined input source. 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_output_binding

The generic_output_binding decorator adds <xref:azure.functions.GenericOutputBinding> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining a generic output binding in the function.json which enables function to write data from a custom defined output source. 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

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_output

The kafka_output decorator adds <xref:azure.functions.KafkaOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining output binding in the function.json which enables function to write events 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/kafkaoutput

represents the event. :param topic: The topic monitored by the trigger. :param broker_list: The list of Kafka brokers monitored 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 max_message_bytes: Maximum transmit message size. Default is 1MB :param batch_size: Maximum number of messages batched in one MessageSet Default is 10000. :param enable_idempotence: When set to true, the producer will ensure

that messages are successfully produced exactly once and in the original produce order. Default is false.

enforced locally and limits the time a produced message waits for successful delivery. A time of 0 is infinite. This is the maximum time

used to deliver a message (including retries). Delivery error occurs

when either the retry count or the message timeout are exceeded. Default is 300000. :param request_timeout_ms: The ack timeout of the producer request in milliseconds. Default is 5000. :param max_retries: How many times to retry sending a failing Message. Default is 2147483647. Retrying may cause reordering unless 'EnableIdempotence' is set to 'True'. :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. :param linger_ms: Linger.MS property provides the time between batches of messages being sent to cluster. Larger value allows more batching results in high throughput. :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

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_output

The queue_output decorator adds <xref:azure.functions.QueueOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining QueueOutput in the function.json which enables function to write message(s) 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

queue output 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.

fields to include in the binding json.

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.

retry

The retry decorator adds <xref:azure.functions.RetryPolicy> to the function settings object for building Function object used in worker function indexing model. This is equivalent to defining RetryPolicy in the function.json which enables function to retry on failure. All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/azure_functions_retries

attempts. :param maximum_interval: The maximum delay interval between retry attempts. :param setting_extra_fields: Keyword arguments for specifying additional setting fields. :return: 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

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.

semantic_search_input

The semantic search feature allows you to import documents into a vector database using an output binding and query the documents in that database using an input binding. For example, you can have a function that imports documents into a vector database and another function that issues queries to OpenAI using content stored in the vector database as

context (also known as the Retrieval Augmented Generation, or RAG technique).

Ref: https://platform.openai.com/docs/guides/embeddings

contains a connection string value. :param collection: The name of the collection or table to search or store. :param query: The semantic query text to use for searching. :param embeddings_model: The ID of the model to use for embeddings. The default value is "text-embedding-ada-002". :param chat_model: The name of the Large Language Model to invoke for chat responses. The default value is "gpt-3.5-turbo". :param system_prompt: Optional. The system prompt to use for prompting the large language model. :param max_knowledge_count: Optional. The number of knowledge items to inject into the SystemPrompt. Default value: 1 :param data_type: Optional. Defines how Functions runtime should treat the parameter value. Default value: None :param kwargs: Keyword arguments for specifying additional binding fields to include in the binding json

service_bus_queue_output

The service_bus_queue_output decorator adds <xref:azure.functions.ServiceBusQueueOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining ServiceBusQueueOutput in the function.json which enables function to write message(s) 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

bus queue output 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. :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_output

The service_bus_topic_output decorator adds <xref:azure.functions.ServiceBusTopicOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining ServiceBusTopicOutput in the function.json which enables function to write message(s) 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

bus topic output 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, defaults to DataType.UNDEFINED. :param access_rights: Access rights for the connection string. :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_input

The sql_input decorator adds <xref:azure.functions.SqlInput> 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 SqlInput in the function.json which enables the function to read from a Sql database. All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/sqlbindings

SqlRowList input object in function code :param command_text: The Transact-SQL query command or name of the stored procedure executed by the binding :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 command_type: A CommandType value, which is Text for a query and StoredProcedure for a stored procedure :param parameters: Zero or more parameter values passed to the command during execution as a single string. Must follow the format @param1=param1,@param2=param2 :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_output

The sql_output decorator adds <xref:azure.functions.SqlOutput> 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 SqlOutput in the function.json which enables the function to write to a Sql database. All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/sqlbindings

Sql output object in function code :param command_text: The Transact-SQL query command or name of the stored procedure executed by the binding :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 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

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

table_input

The table_input decorator adds <xref:azure.functions.TableInput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining TableInput in the function.json which enables function to read a table in an Azure Storage or Cosmos DB account All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/tablesbindings

the table or entity in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to the table service. :param table_name: The Name of the table :param row_key: The row key of the table entity to read. :param partition_key: The partition key of the table entity to read. :param take: The maximum number of entities to return :param filter: An OData filter expression for the entities to return

from the table.

table_output

The table_output decorator adds <xref:azure.functions.TableOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining TableOutput in the function.json which enables function to write entities to a table in an Azure Storage All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/tablesbindings

the table or entity in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to the table service. :param table_name: The Name of the table :param row_key: The row key of the table entity to read. :param partition_key: The partition key of the table entity to read. :param data_type: Defines how Functions runtime should treat the

parameter value.

text_completion_input

The textCompletion input binding can be used to invoke the OpenAI Chat Completions API and return the results to the function.

Ref: https://platform.openai.com/docs/guides/text-generation/chat-completions-vs-completions # NoQA

The examples below define "who is" HTTP-triggered functions with a hardcoded "who is {name}?" prompt, where {name} is the substituted with the value in the HTTP request path. The OpenAI input binding invokes the OpenAI GPT endpoint to surface the answer to the prompt to the function, which then returns the result text as the response content.

string. :param model: the ID of the model to use. :param temperature: The sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. :param top_p: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. It's generally recommend to use this or temperature :param max_tokens: The maximum number of tokens to generate in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096). :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
str

Parameter name of the Activity input.

activity
Required
<xref:Optional>[str]

Name of Activity Function.

Default value: None

assistant_create_output

The assistantCreate output binding creates a new assistant with a specified system prompt.

parameter value :param kwargs: Keyword arguments for specifying additional binding fields to include in the binding json

assistant_create_output(arg_name: str, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

assistant_post_input

The assistantPost output binding sends a message to the assistant and saves the response in its internal state.

assistant to respond to. :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_post_input(arg_name: str, id: str, user_message: str, model: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
id
Required
user_message
Required
model
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

assistant_query_input

The assistantQuery input binding fetches the assistant history and passes it to the function.

history to fetch. The timestamp should be in ISO 8601 format - for example, 2023-08-01T00:00:00Z. :param id: The ID of the Assistant to query. :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_query_input(arg_name: str, id: str, timestamp_utc: str, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
id
Required
timestamp_utc
Required
data_type
Required
Default value: None

Returns

Type Description

Decorator 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.

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_input

The blob_input decorator adds <xref:azure.functions.BlobInput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining BlobInput in the function.json which enables function to write message(s) 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

that specifies how to connect to Azure Blobs. :param data_type: Defines how Functions runtime should treat the

parameter value.

fields to include in the binding json.

blob_input(arg_name: str, path: str, connection: str, data_type: DataType | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
path
Required
connection
Required
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

blob_output

The blob_output decorator adds <xref:azure.functions.BlobOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining BlobOutput in the function.json which enables function to write message(s) 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

fields to include in the binding json. :return: Decorator function.

blob_output(arg_name: str, path: str, connection: str, data_type: DataType | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required

The name of the variable that represents the blob in function code.

path
Required

The path to the blob.

connection
Required

The name of an app setting or setting collection that specifies how to connect to Azure Blobs.

data_type
Required

Defines how Functions runtime should treat the parameter value.

Default value: None
kwargs
Required

Keyword arguments for specifying additional binding

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_input

The cosmos_db_input decorator adds <xref:azure.functions.CosmosDBInput> 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 CosmosDBInput in the function.json which

enables function to read from CosmosDB.

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 input object in function code :param connection: The name of an app setting or setting container that

specifies how to connect to the Azure Cosmos DB account being monitored containing your Azure Cosmos DB connection string

document :param partition_key: Specifies the partition key value for the lookup :param id: The ID of the document to retrieve :param sql_query: An Azure Cosmos DB SQL query used for retrieving multiple documents :param preferred_locations: (Optional) Defines preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. Values should be comma-separated. For example, East US,South Central US,North Europe :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_input(arg_name: str, connection: str, database_name: str, container_name: str, partition_key: str | None = None, id: str | None = None, sql_query: str | None = None, preferred_locations: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
connection
Required
database_name
Required
container_name
Required
partition_key
Required
Default value: None
id
Required
Default value: None
sql_query
Required
Default value: None
preferred_locations
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

cosmos_db_input_v3

The cosmos_db_input_v3 decorator adds <xref:azure.functions.CosmosDBInput> 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 CosmosDBInput in the function.json which enables function to read from CosmosDB. 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 input object in function code. :param database_name: The database containing the document. :param collection_name: The name of the collection that contains the document. :param connection_string_setting: The name of the app setting containing your Azure Cosmos DB connection string. :param id: The ID of the document to retrieve. :param sql_query: An Azure Cosmos DB SQL query used for retrieving multiple documents. :param partition_key: Specifies the partition key value for the lookup. :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_input_v3(arg_name: str, database_name: str, collection_name: str, connection_string_setting: str, id: str | None = None, sql_query: str | None = None, partition_key: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
database_name
Required
collection_name
Required
connection_string_setting
Required
id
Required
Default value: None
sql_query
Required
Default value: None
partition_key
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

cosmos_db_output

The cosmos_db_output decorator adds <xref:azure.functions.CosmosDBOutput> 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 CosmosDBOutput in the function.json which enables function to write to the CosmosDB. 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

output 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 :param database_name: The name of the Azure Cosmos DB database with the collection being monitored :param container_name: The name of the container being monitored :param create_if_not_exists: A boolean value to indicate whether the collection is created when it doesn't exist :param partition_key: When CreateIfNotExists is true, it defines the partition key path for the created collection :param container_throughput: When createIfNotExists is true, it defines the throughput of the created container PreferredLocations, it can leverage multi-region writes in the Azure Cosmos DB service :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_output(arg_name: str, connection: str, database_name: str, container_name: str, create_if_not_exists: bool | None = None, partition_key: str | None = None, container_throughput: int | None = None, preferred_locations: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
connection
Required
database_name
Required
container_name
Required
create_if_not_exists
Required
Default value: None
partition_key
Required
Default value: None
container_throughput
Required
Default value: None
preferred_locations
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

cosmos_db_output_v3

The cosmos_db_output_v3 decorator adds <xref:azure.functions.CosmosDBOutput> 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 CosmosDBOutput

in the function.json which enables function to write to the CosmosDB. 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

output 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 create_if_not_exists: A boolean value to indicate whether the collection is created when it doesn't exist. :param partition_key: When CreateIfNotExists is true, it defines the partition key path for the created collection. :param collection_throughput: When CreateIfNotExists is true, it defines the throughput of the created collection. :param use_multiple_write_locations: When set to true along with PreferredLocations, it can leverage multi-region writes in the Azure Cosmos DB service. :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_output_v3(arg_name: str, database_name: str, collection_name: str, connection_string_setting: str, create_if_not_exists: bool | None = None, partition_key: str | None = None, collection_throughput: int | None = None, use_multiple_write_locations: bool | None = None, preferred_locations: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
database_name
Required
collection_name
Required
connection_string_setting
Required
create_if_not_exists
Required
Default value: None
partition_key
Required
Default value: None
collection_throughput
Required
Default value: None
use_multiple_write_locations
Required
Default value: None
preferred_locations
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_output

The dapr_binding_output decorator adds <xref:azure.functions.DaprBindingOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprBindingOutput in the function.json which enables function to send a value to a Dapr output 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-binding-output-binding

output object in function code. :param binding_name: The configured name of the binding. :param operation: The configured operation. :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_output(arg_name: str, binding_name: str, operation: str, dapr_address: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
binding_name
Required
operation
Required
dapr_address
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_invoke_output

The dapr_invoke_output decorator adds <xref:azure.functions.DaprInvokeOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprInvokeOutput in the function.json which enables function to invoke another Dapr App. 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-invoke-output-binding

output object in function code. :param app_id: The dapr app name to invoke. :param method_name: The method name of the app to invoke. :param http_verb: The http verb of the app to invoke. :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_invoke_output(arg_name: str, app_id: str, method_name: str, http_verb: str, dapr_address: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
app_id
Required
method_name
Required
http_verb
Required
dapr_address
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

dapr_publish_output

The dapr_publish_output decorator adds <xref:azure.functions.DaprPublishOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprPublishOutput in the function.json which enables function to publish 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-dapr-publish-output-binding

output object in function code. :param pub_sub_name: The pub/sub name to publish to. :param topic: The name of the topic to publish to. :param dapr_address: Dapr address, it is optional field, by default ßit will be set to http://localhost:{daprHttpPort}. :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_publish_output(arg_name: str, pub_sub_name: str, topic: str, dapr_address: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
pub_sub_name
Required
topic
Required
dapr_address
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

dapr_secret_input

The dapr_secret_input decorator adds <xref:azure.functions.DaprSecretInput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprSecretInput in the function.json which enables function to read secret from underlying secret store component. 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-secret-input-binding

input object in function code. :param secret_store_name: The name of the secret store to get the secret from. :param key: The key identifying the name of the secret to get. :param metadata: An array of metadata properties in the form "key1=value1&key2=value2". :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_secret_input(arg_name: str, secret_store_name: str, key: str, metadata: str, dapr_address: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
secret_store_name
Required
key
Required
metadata
Required
dapr_address
Required
Default value: None
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_state_input

The dapr_state_input decorator adds <xref:azure.functions.DaprStateInput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprStateInput in the function.json which enables function to read state from underlying state store component. 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-state-input-binding

input object in function code. :param state_store: State store containing the state. :param key: The name of the key. :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_state_input(arg_name: str, state_store: str, key: str, dapr_address: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
state_store
Required
key
Required
dapr_address
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

dapr_state_output

The dapr_state_output decorator adds <xref:azure.functions.DaprStateOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining DaprStateOutput in the function.json which enables function to write to the dapr state store. 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-state-output-binding

output object in function code. :param state_store: State store containing the state for keys. :param key: The name of the key. :param dapr_address: Dapr address, it is optional field, by default it will be set to http://localhost:{daprHttpPort}. :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_state_output(arg_name: str, state_store: str, key: str, dapr_address: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
state_store
Required
key
Required
dapr_address
Required
Default value: None
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.

durable_client_input

Register a Durable-client Function.

durable_client_input(client_name: str, task_hub: str | None = None, connection_name: str | None = None)

Parameters

Name Description
client_name
Required
str

Parameter name of durable client.

task_hub
Required
<xref:Optional>[str]

Used in scenarios where multiple function apps share the same storage account but need to be isolated from each other. If not specified, the default value from host.json is used. This value must match the value used by the target orchestrator functions.

Default value: None
connection_name
Required
<xref:Optional>[str]

The name of an app setting that contains a storage account connection string. The storage account represented by this connection string must be the same one used by the target orchestrator functions. If not specified, the default storage account connection string for the function app is used.

Default value: None

embeddings_input

The embeddings input decorator creates embeddings which will be used to measure the relatedness of text strings.

Ref: https://platform.openai.com/docs/guides/embeddings

embeddings for. :param input_type: The type of the input. :param model: The ID of the model to use. :param max_chunk_length: The maximum number of characters to chunk the input into. Default value: 8 * 1024 :param max_overlap: The maximum number of characters to overlap between chunks. Default value: 128 :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

embeddings_input(arg_name: str, input: str, input_type: InputType, model: str | None = None, max_chunk_length: int | None = 8192, max_overlap: int | None = 128, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
input
Required
input_type
Required
model
Required
Default value: None
max_chunk_length
Required
Default value: 8192
max_overlap
Required
Default value: 128
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

embeddings_store_output

Supported list of embeddings store is extensible, and more can be added by authoring a specially crafted NuGet package. Visit the currently supported vector specific folder for specific usage information:

  • Azure AI Search

  • Azure Data Explorer

  • Azure Cosmos DB using MongoDB

variable which contains a connection string value :param collection: The collection or table to search. :param model: The ID of the model to use. :param max_chunk_length: The maximum number of characters to chunk the input into. :param max_overlap: The maximum number of characters to overlap between chunks. :param data_type: Optional. Defines how Functions runtime should treat the parameter value. Default value: None :param kwargs: Keyword arguments for specifying additional binding fields to include in the binding json

embeddings_store_output(arg_name: str, input: str, input_type: InputType, connection_name: str, collection: str, model: OpenAIModels | None = OpenAIModels.DefaultEmbeddingsModel, max_chunk_length: int | None = 8192, max_overlap: int | None = 128, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
input
Required
input_type
Required
connection_name
Required
collection
Required
model
Required
Default value: DefaultEmbeddingsModel
max_chunk_length
Required
Default value: 8192
max_overlap
Required
Default value: 128
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
str

Parameter name of the Entity input.

entity_name
Required
<xref:Optional>[str]

Name of Entity Function.

Default value: None

event_grid_output

The event_grid_output decorator adds <xref:azure.functions.EventGridOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining output binding in the function.json which enables function to write events to a custom topic. All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/eventgridtrigger

represents the event. :param data_type: Defines how Functions runtime should treat the parameter value. :param topic_endpoint_uri: The name of an app setting that contains the URI for the custom topic. :param topic_key_setting: The name of an app setting that contains an access key for the custom topic. :param connection: The value of the common prefix for the setting that contains the topic endpoint URI. :return: Decorator function.

event_grid_output(arg_name: str, topic_endpoint_uri: str | None = None, topic_key_setting: str | None = None, connection: str | None = None, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required

The variable name used in function code that

topic_endpoint_uri
Required
Default value: None
topic_key_setting
Required
Default value: None
connection
Required
Default value: None
data_type
Required
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.

event_hub_output

The event_hub_output decorator adds <xref:azure.functions.EventHubOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining EventHubOutput in the function.json which enables function to write message(s) 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

output object in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to Event Hub. :param event_hub_name: The name of the event hub. :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.

event_hub_output(arg_name: str, connection: str, event_hub_name: str, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
connection
Required
event_hub_name
Required
data_type
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_input_binding

The generic_input_binding decorator adds <xref:azure.functions.GenericInputBinding> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining a generic input binding in the function.json which enables function to read data from a custom defined input source. 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_input_binding(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.

generic_output_binding

The generic_output_binding decorator adds <xref:azure.functions.GenericOutputBinding> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining a generic output binding in the function.json which enables function to write data from a custom defined output source. 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_output_binding(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.

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_output

The kafka_output decorator adds <xref:azure.functions.KafkaOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining output binding in the function.json which enables function to write events 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/kafkaoutput

represents the event. :param topic: The topic monitored by the trigger. :param broker_list: The list of Kafka brokers monitored 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 max_message_bytes: Maximum transmit message size. Default is 1MB :param batch_size: Maximum number of messages batched in one MessageSet Default is 10000. :param enable_idempotence: When set to true, the producer will ensure

that messages are successfully produced exactly once and in the original produce order. Default is false.

enforced locally and limits the time a produced message waits for successful delivery. A time of 0 is infinite. This is the maximum time

used to deliver a message (including retries). Delivery error occurs

when either the retry count or the message timeout are exceeded. Default is 300000. :param request_timeout_ms: The ack timeout of the producer request in milliseconds. Default is 5000. :param max_retries: How many times to retry sending a failing Message. Default is 2147483647. Retrying may cause reordering unless 'EnableIdempotence' is set to 'True'. :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. :param linger_ms: Linger.MS property provides the time between batches of messages being sent to cluster. Larger value allows more batching results in high throughput. :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

kafka_output(arg_name: str, topic: str, broker_list: str, 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, max_message_bytes: int = 1000000, batch_size: int = 10000, enable_idempotence: bool = False, message_timeout_ms: int = 300000, request_timeout_ms: int = 5000, max_retries: int = 2147483647, authentication_mode: BrokerAuthenticationMode | str | None = 'NOTSET', protocol: BrokerProtocol | str | None = 'NOTSET', linger_ms: int = 5, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
topic
Required
broker_list
Required
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
max_message_bytes
Required
Default value: 1000000
batch_size
Required
Default value: 10000
enable_idempotence
Required
Default value: False
message_timeout_ms
Required
Default value: 300000
request_timeout_ms
Required
Default value: 5000
max_retries
Required
Default value: 2147483647
authentication_mode
Required
Default value: NOTSET
protocol
Required
Default value: NOTSET
linger_ms
Required
Default value: 5
data_type
Required
Default value: None

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
str

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_output

The queue_output decorator adds <xref:azure.functions.QueueOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining QueueOutput in the function.json which enables function to write message(s) 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

queue output 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.

fields to include in the binding json.

queue_output(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.

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.

retry

The retry decorator adds <xref:azure.functions.RetryPolicy> to the function settings object for building Function object used in worker function indexing model. This is equivalent to defining RetryPolicy in the function.json which enables function to retry on failure. All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/azure_functions_retries

attempts. :param maximum_interval: The maximum delay interval between retry attempts. :param setting_extra_fields: Keyword arguments for specifying additional setting fields. :return: Decorator function.

retry(strategy: str, max_retry_count: str, delay_interval: str | None = None, minimum_interval: str | None = None, maximum_interval: str | None = None, setting_extra_fields: Dict[str, Any] | None = None) -> Callable[[...], Any]

Parameters

Name Description
strategy
Required

The retry strategy to use.

max_retry_count
Required

The maximum number of retry attempts.

delay_interval
Required

The delay interval between retry attempts.

Default value: None
minimum_interval
Required

The minimum delay interval between retry

Default value: None
maximum_interval
Required
Default value: None
setting_extra_fields
Required
Default value: None

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

semantic_search_input

The semantic search feature allows you to import documents into a vector database using an output binding and query the documents in that database using an input binding. For example, you can have a function that imports documents into a vector database and another function that issues queries to OpenAI using content stored in the vector database as

context (also known as the Retrieval Augmented Generation, or RAG technique).

Ref: https://platform.openai.com/docs/guides/embeddings

contains a connection string value. :param collection: The name of the collection or table to search or store. :param query: The semantic query text to use for searching. :param embeddings_model: The ID of the model to use for embeddings. The default value is "text-embedding-ada-002". :param chat_model: The name of the Large Language Model to invoke for chat responses. The default value is "gpt-3.5-turbo". :param system_prompt: Optional. The system prompt to use for prompting the large language model. :param max_knowledge_count: Optional. The number of knowledge items to inject into the SystemPrompt. Default value: 1 :param data_type: Optional. Defines how Functions runtime should treat the parameter value. Default value: None :param kwargs: Keyword arguments for specifying additional binding fields to include in the binding json

semantic_search_input(arg_name: str, connection_name: str, collection: str, query: str | None = None, embeddings_model: OpenAIModels | None = OpenAIModels.DefaultEmbeddingsModel, chat_model: OpenAIModels | None = OpenAIModels.DefaultChatModel, system_prompt: str | None = 'You are a helpful assistant. You are responding to requests\n    from a user about internal emails and documents. You can and\n    should refer to the internal documents to help respond to\n    requests. If a user makes a request that\'s not covered by the\n    internal emails and documents, explain that you don\'t know the\n    answer or that you don\'t have access to the information.\n\n    The following is a list of documents that you can refer to when\n    answering questions. The documents are in the format\n    [filename]: [text] and are separated by newlines. If you answer\n    a question by referencing any of the documents, please cite the\n    document in your answer. For example, if you answer a question\n    by referencing info.txt, you should add "Reference: info.txt"\n    to the end of your answer on a separate line.', max_knowledge_count: int | None = 1, data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
connection_name
Required
collection
Required
query
Required
Default value: None
embeddings_model
Required
Default value: DefaultEmbeddingsModel
chat_model
Required
Default value: DefaultChatModel
system_prompt
Required
Default value: You are a helpful assistant. You are responding to requests from a user about internal emails and documents. You can and should refer to the internal documents to help respond to requests. If a user makes a request that's not covered by the internal emails and documents, explain that you don't know the answer or that you don't have access to the information. The following is a list of documents that you can refer to when answering questions. The documents are in the format [filename]: [text] and are separated by newlines. If you answer a question by referencing any of the documents, please cite the document in your answer. For example, if you answer a question by referencing info.txt, you should add "Reference: info.txt" to the end of your answer on a separate line.
max_knowledge_count
Required
Default value: 1
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

service_bus_queue_output

The service_bus_queue_output decorator adds <xref:azure.functions.ServiceBusQueueOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining ServiceBusQueueOutput in the function.json which enables function to write message(s) 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

bus queue output 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. :return: Decorator function.

service_bus_queue_output(arg_name: str, connection: str, queue_name: str, data_type: DataType | str | None = None, access_rights: AccessRights | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required

The name of the variable that represents service

connection
Required
queue_name
Required
data_type
Required
Default value: None
access_rights
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_output

The service_bus_topic_output decorator adds <xref:azure.functions.ServiceBusTopicOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining ServiceBusTopicOutput in the function.json which enables function to write message(s) 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

bus topic output 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, defaults to DataType.UNDEFINED. :param access_rights: Access rights for the connection string. :return: Decorator function.

service_bus_topic_output(arg_name: str, connection: str, topic_name: str, subscription_name: str | None = None, data_type: DataType | str | None = None, access_rights: AccessRights | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required

The name of the variable that represents service

connection
Required
topic_name
Required
subscription_name
Required
Default value: None
data_type
Required
Default value: None
access_rights
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_input

The sql_input decorator adds <xref:azure.functions.SqlInput> 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 SqlInput in the function.json which enables the function to read from a Sql database. All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/sqlbindings

SqlRowList input object in function code :param command_text: The Transact-SQL query command or name of the stored procedure executed by the binding :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 command_type: A CommandType value, which is Text for a query and StoredProcedure for a stored procedure :param parameters: Zero or more parameter values passed to the command during execution as a single string. Must follow the format @param1=param1,@param2=param2 :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_input(arg_name: str, command_text: str, connection_string_setting: str, command_type: str | None = 'Text', parameters: str | None = None, data_type: DataType | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
command_text
Required
connection_string_setting
Required
command_type
Required
Default value: Text
parameters
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

sql_output

The sql_output decorator adds <xref:azure.functions.SqlOutput> 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 SqlOutput in the function.json which enables the function to write to a Sql database. All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/sqlbindings

Sql output object in function code :param command_text: The Transact-SQL query command or name of the stored procedure executed by the binding :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 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_output(arg_name: str, command_text: str, connection_string_setting: str, data_type: DataType | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
command_text
Required
connection_string_setting
Required
data_type
Required
Default value: None

Returns

Type Description

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

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.

table_input

The table_input decorator adds <xref:azure.functions.TableInput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining TableInput in the function.json which enables function to read a table in an Azure Storage or Cosmos DB account All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/tablesbindings

the table or entity in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to the table service. :param table_name: The Name of the table :param row_key: The row key of the table entity to read. :param partition_key: The partition key of the table entity to read. :param take: The maximum number of entities to return :param filter: An OData filter expression for the entities to return

from the table.

table_input(arg_name: str, connection: str, table_name: str, row_key: str | None = None, partition_key: str | None = None, take: int | None = None, filter: str | None = None, data_type: DataType | str | None = None) -> Callable[[...], Any]

Parameters

Name Description
data_type

Defines how Functions runtime should treat the parameter value.

Default value: None
arg_name
Required
Default value: None
connection
Required
Default value: None
table_name
Required
Default value: None
row_key
Default value: None
partition_key
Default value: None
take
Default value: None
filter
Default value: None

Returns

Type Description

Decorator function.

table_output

The table_output decorator adds <xref:azure.functions.TableOutput> to the <xref:azure.functions.FunctionBuilder> object for building Function object used in worker function indexing model. This is equivalent to defining TableOutput in the function.json which enables function to write entities to a table in an Azure Storage All optional fields will be given default value by function host when they are parsed by function host.

Ref: https://aka.ms/tablesbindings

the table or entity in function code. :param connection: The name of an app setting or setting collection that specifies how to connect to the table service. :param table_name: The Name of the table :param row_key: The row key of the table entity to read. :param partition_key: The partition key of the table entity to read. :param data_type: Defines how Functions runtime should treat the

parameter value.

table_output(arg_name: str, connection: str, table_name: str, row_key: str | None = None, partition_key: str | None = None, data_type: DataType | str | None = None) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
connection
Required
table_name
Required
row_key
Required
Default value: None
partition_key
Required
Default value: None
data_type
Required
Default value: None

Returns

Type Description

Decorator function.

text_completion_input

The textCompletion input binding can be used to invoke the OpenAI Chat Completions API and return the results to the function.

Ref: https://platform.openai.com/docs/guides/text-generation/chat-completions-vs-completions # NoQA

The examples below define "who is" HTTP-triggered functions with a hardcoded "who is {name}?" prompt, where {name} is the substituted with the value in the HTTP request path. The OpenAI input binding invokes the OpenAI GPT endpoint to surface the answer to the prompt to the function, which then returns the result text as the response content.

string. :param model: the ID of the model to use. :param temperature: The sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. :param top_p: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. It's generally recommend to use this or temperature :param max_tokens: The maximum number of tokens to generate in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096). :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

text_completion_input(arg_name: str, prompt: str, model: OpenAIModels | None = OpenAIModels.DefaultChatModel, temperature: str | None = '0.5', top_p: str | None = None, max_tokens: str | None = '100', data_type: DataType | str | None = None, **kwargs) -> Callable[[...], Any]

Parameters

Name Description
arg_name
Required
prompt
Required
model
Required
Default value: DefaultChatModel
temperature
Required
Default value: 0.5
top_p
Required
Default value: None
max_tokens
Required
Default value: 100
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.