You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-dotnet-class-library.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -283,7 +283,7 @@ You can also build your app with ReadyToRun from the command line. For more info
283
283
284
284
## Supported types for bindings
285
285
286
-
Each binding has its own supported types; for instance, a blob trigger attribute can be applied to a string parameter, a POCO parameter, a `CloudBlockBlob` parameter, or any of several other supported types. The [binding reference article for blob bindings](functions-bindings-storage-blob-trigger.md#usage) lists all supported parameter types. For more information, see [Triggers and bindings](functions-triggers-bindings.md) and the [binding reference docs for each binding type](functions-triggers-bindings.md#next-steps).
286
+
Each binding has its own supported types; for instance, a blob trigger attribute can be applied to a string parameter, a POCO parameter, a `CloudBlockBlob` parameter, or any of several other supported types. The [binding reference article for blob bindings](functions-bindings-storage-blob-trigger.md#usage) lists all supported parameter types. For more information, see [Triggers and bindings](functions-triggers-bindings.md) and the [binding reference docs for each binding type](functions-triggers-bindings.md#related-content).
287
287
288
288
[!INCLUDE [HTTP client best practices](../../includes/functions-http-client-best-practices.md)]
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-reference-csharp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,7 +89,7 @@ The `#r` statement is explained [later in this article](#referencing-external-as
89
89
90
90
## Supported types for bindings
91
91
92
-
Each binding has its own supported types; for instance, a blob trigger can be used with a string parameter, a POCO parameter, a `CloudBlockBlob` parameter, or any of several other supported types. The [binding reference article for blob bindings](functions-bindings-storage-blob-trigger.md#usage) lists all supported parameter types for blob triggers. For more information, see [Triggers and bindings](functions-triggers-bindings.md) and the [binding reference docs for each binding type](functions-triggers-bindings.md#next-steps).
92
+
Each binding has its own supported types; for instance, a blob trigger can be used with a string parameter, a POCO parameter, a `CloudBlockBlob` parameter, or any of several other supported types. The [binding reference article for blob bindings](functions-bindings-storage-blob-trigger.md#usage) lists all supported parameter types for blob triggers. For more information, see [Triggers and bindings](functions-triggers-bindings.md) and the [binding reference docs for each binding type](functions-triggers-bindings.md#related-content).
93
93
94
94
[!INCLUDE [HTTP client best practices](../../includes/functions-http-client-best-practices.md)]
In this article, you learn the high-level concepts surrounding functions triggers and bindings.
13
13
14
-
Triggers cause a function to run. A trigger defines how a function is invoked and a function must have exactly one trigger. Triggers usually also pass data into your function, as you would with method calls.
14
+
Triggers cause a function to run. A trigger defines how a function is invoked and a function must have exactly one trigger. Triggers can also pass data into your function, as you would with method calls.
15
15
16
-
Binding to a function is a way of declaratively connecting another resource to the function; bindings either pass data into your function (an *input binding*) or enable you to write data out from your function (an *output binding*) using *binding parameters*. Your function trigger is essentially a special kind of input binding.
16
+
Binding to a function is a way of declaratively connecting your functions to other resources; bindings either pass data into your function (an *input binding*) or enable you to write data out from your function (an *output binding*) using *binding parameters*. Your function trigger is essentially a special type of input binding.
17
17
18
18
You can mix and match different bindings to suit your function's specific scenario. Bindings are optional and a function might have one or multiple input and/or output bindings.
19
19
@@ -26,11 +26,10 @@ Consider the following examples of how you could implement different functions.
26
26
| A new queue message arrives which runs a function to write to another queue. | Queue<sup>*</sup> |*None*| Queue<sup>*</sup> |
27
27
| A scheduled job reads Blob Storage contents and creates a new Azure Cosmos DB document. | Timer | Blob Storage | Azure Cosmos DB |
28
28
| The Event Grid is used to read an image from Blob Storage and a document from Azure Cosmos DB to send an email. | Event Grid | Blob Storage and Azure Cosmos DB | SendGrid |
29
-
| A webhook that uses Microsoft Graph to update an Excel sheet. | HTTP |*None*| Microsoft Graph |
30
29
31
30
<sup>\*</sup> Represents different queues
32
31
33
-
These examples aren't meant to be exhaustive, but are provided to illustrate how you can use triggers and bindings together.
32
+
These examples aren't meant to be exhaustive, but are provided to illustrate how you can use triggers and bindings together. For a more comprehensive set of scenarios, see [Azure Functions scenarios](functions-scenarios.md).
34
33
35
34
>[!TIP]
36
35
>Functions doesn't require you to use input and output bindings to connect to Azure services. You can always create an Azure SDK client in your code and use it instead for your data transfers. For more information, see [Connect to services](functions-reference.md#connect-to-services).
@@ -41,24 +40,26 @@ Triggers and bindings are defined differently depending on the development langu
41
40
42
41
Bindings can be either input or output bindings. Not all services support both input and output bindings. See your specific binding extension for [specific bindings code examples](#bindings-code-examples).
43
42
43
+
This example shows an HTTP triggered function with an output binding that writes a message to an Azure Storage queue.
44
+
44
45
::: zone pivot="programming-language-csharp"
45
-
For C# class library functions, triggers and bindings are configured by decorating methods and parameters with C# attributes, where the specific attribute applied might depend on the C# runtime model, as you can see in this Queue storage trigger example:
46
+
For C# class library functions, triggers and bindings are configured by decorating methods and parameters with C# attributes, where the specific attribute applied might depend on the C# runtime model:
This example shows the HTTP trigger definition (`HttpTrigger`) on the `Run` method for a function named `HttpExample` that returns a `MultiResponse` object:
50
+
The HTTP trigger (`HttpTrigger`) is defined on the `Run` method for a function named `HttpExample` that returns a `MultiResponse` object:
This example shows the `MultiResponse` object definition which both returns an `HttpResponse` to the HTTP request and writes messages to a storage queue using a `QueueOutput` binding:
54
+
This example shows the `MultiResponse` object definition which both returns an `HttpResponse` to the HTTP request and also writes a message to a storage queue using a `QueueOutput` binding:
For more information, see the [C# isolated worker model guide](dotnet-isolated-process-guide.md#methods-recognized-as-functions).
58
59
59
60
### [In-process model](#tab/in-process)
60
61
61
-
This example shows the HTTP trigger definition (`HttpTrigger`) on the `Run` method for a function named `HttpExample` that writes to a storage queue defined by the `Queue` and `StorageAccount` attributes on the `msg` parameter:
62
+
The HTTP trigger (`HttpTrigger`) is defined on the `Run` method for a function named `HttpExample` that writes to a storage queue defined by the `Queue` and `StorageAccount` attributes on the `msg` parameter:
@@ -69,7 +70,7 @@ For more information, see the [C# in-process model guide](functions-dotnet-class
69
70
Legacy C# Script functions use a function.json definition file. For more information, see the [Azure Functions C# script (.csx) developer reference](functions-reference-csharp.md).
70
71
::: zone-end
71
72
::: zone pivot="programming-language-java"
72
-
For Java functions, triggers and bindings are configured by annotating specific methods and parameters. This example shows the HTTP trigger definition on the `run` method for a function named `HttpTriggerQueueOutput` where the trigger is defined in the `@HttpTrigger` annotation that writes to a storage queue defined by the `@QueueOutput`annocation on the `message` parameter:
73
+
For Java functions, triggers and bindings are configured by annotating specific methods and parameters. This HTTP trigger (`@HttpTrigger`) is defined on the `run` method for a function named `HttpTriggerQueueOutput`, which writes to a storage queue defined by the `@QueueOutput`annotation on the `message` parameter:
The `http` method on the exported `app` object defines an HTTP trigger, and the `storageQueue` method on `output` defines an output binding on this trigger.
This example `function.json` file defines the function.
104
+
This example `function.json` file defines the HTTP trigger function that returns an HTTP response and writes to a storage queue.
104
105
105
106
```json
106
107
{
@@ -127,9 +128,19 @@ This example `function.json` file defines the function.
127
128
}
128
129
```
129
130
130
-
### [TypeScript](#tab/typescript/node-v3)
131
+
---
131
132
132
-
This example `function.json` file defines the function.
133
+
::: zone-end
134
+
::: zone pivot="programming-language-typescript"
135
+
### [v4](#tab/node-v4)
136
+
137
+
The `http` method on the exported `app` object defines an HTTP trigger, and the `storageQueue` method on `output` defines an output binding on this trigger.
In Python for Functions version 1, this example `function.json` file defines the function:
190
+
In Python for Functions version 1, this example `function.json` file defines an HTTP trigger function that returns an HTTP response and writes to a storage queue.
<sup>1</sup> [Support will end for version 1.x of the Azure Functions runtime on September 14, 2026](https://aka.ms/azure-functions-retirements/hostv1). We highly recommend that you [migrate your apps to version 4.x](../articles/azure-functions/migrate-version-1-version-4.md) for full support.
36
+
Notes:
37
37
38
-
<sup>2</sup> Starting with the version 2.x runtime, all bindings except HTTP and Timer must be registered. See [Register binding extensions](../articles/azure-functions/functions-bindings-register.md).
39
-
40
-
<sup>3</sup> Triggers aren't supported in the Consumption plan. Requires [runtime-driven triggers](../articles/azure-functions/functions-networking-options.md#elastic-premium-plan-with-virtual-network-triggers).
41
-
42
-
<sup>4</sup> Supported only in Kubernetes, IoT Edge, and other self-hosted modes only.
38
+
1.[Support will end for version 1.x of the Azure Functions runtime on September 14, 2026](https://aka.ms/azure-functions-retirements/hostv1). We highly recommend that you [migrate your apps to version 4.x](../articles/azure-functions/migrate-version-1-version-4.md) for full support.
39
+
2. Starting with the version 2.x runtime, all bindings except HTTP and Timer must be registered. See [Register binding extensions](../articles/azure-functions/functions-bindings-register.md).
40
+
3. Triggers aren't supported in the Consumption plan. Requires [runtime-driven triggers](../articles/azure-functions/functions-networking-options.md#elastic-premium-plan-with-virtual-network-triggers).
41
+
4. Supported in Kubernetes, IoT Edge, and other self-hosted modes only.
0 commit comments