Skip to content

Commit 31cbebc

Browse files
committed
Line edits
1 parent cc969a0 commit 31cbebc

9 files changed

+79
-80
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
Suppose you run a social networking site for professionals. You're allowing your users to upload their headshot images to be posted on their profile. To reduce the workload on the web server, you want to create a serverless back end using Azure Functions to process this data. You want to create an image thumbnail and then save it to permanent storage.
1+
Suppose you run a social networking site for professionals. You're allowing your users to upload their headshot images to be posted on their profile. To reduce the workload on the web server, you want to create a serverless back end using Azure Functions to process this data. You want to create an image thumbnail, and then save it to permanent storage.
22

33
The power of Azure Functions comes mainly from the integrations that it offers with a range of data sources and services, which are defined with *bindings*. With bindings, developers interact with other data sources and services without worrying about how the data flows to and from their function.
44

55
## Learning objectives
66

7-
In this module, you will:
7+
In this module, you'll:
88

9-
- Explore the types of data sources that can be accessed through bindings
10-
- Read data from Azure Cosmos DB by using Azure Functions
11-
- Store data in Azure Cosmos DB by using Azure Functions
12-
- Send messages to Azure Queue Storage by using Azure Functions
9+
- Explore the types of data sources that can be accessed through bindings.
10+
- Read data from Azure Cosmos DB by using Azure Functions.
11+
- Store data in Azure Cosmos DB by using Azure Functions.
12+
- Send messages to Azure Queue Storage by using Azure Functions.

learn-pr/azure/chain-azure-functions-data-using-bindings/includes/2-explore-input-and-output-binding-types-portal-lesson.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Accessing and processing data are key tasks in many software solutions. Consider
44
- You want to post incoming messages to a queue for processing by another component in your enterprise.
55
- Your service needs to grab gamer scores from a queue and update an online scoreboard.
66

7-
All of these examples are about moving data. The data source and destinations differ from scenario to scenario, but the pattern is similar. You connect to a data source, and you read and write data. Azure Functions helps you integrate with data and services by using bindings.
7+
All of these examples are about moving data. The data source and destinations differ from scenario to scenario, but the pattern is similar. You connect to a data source, and you read and write data. Azure Functions helps you integrate with data and services by using bindings.
88

99
## What is a binding?
1010

@@ -14,15 +14,15 @@ In Azure Functions, bindings provide a declarative way to connect to data from w
1414

1515
There are two kinds of bindings you can use with functions:
1616

17-
- **Input binding** - Connects to a data **source**. Our function can read data from these input sources.
17+
- **Input binding**: Connects to a data **source**. Our function can read data from these input sources.
1818

19-
- **Output binding** - Connects to a data **destination**. Our function can write data to these output destinations.
19+
- **Output binding**: Connects to a data **destination**. Our function can write data to these output destinations.
2020

2121
There are also _triggers_, which are special types of input bindings that cause a function to run. For example, an Azure Event Grid notification can be configured as a trigger. When an event occurs, the function runs.
2222

2323
### Types of supported bindings
2424

25-
The *type* of binding defines where we're reading or sending data. There's a binding to respond to web requests, and a large selection of bindings to interact directly with various Azure services and third-party services.
25+
The _type_ of binding defines where we're reading or sending data. There's a binding to respond to web requests, and a large selection of bindings to interact directly with various Azure services and third-party services.
2626

2727
A binding type can be used as an input, an output, or both. For example, a function can write to a Blob Storage output binding, but a Blob Storage update could trigger another function.
2828

@@ -42,21 +42,21 @@ These types are just a sample. There are more, plus functions have an extensibil
4242

4343
Three properties are required in all bindings, though you might have to supply more properties based on the type of binding and storage you're using.
4444

45-
- **Name** - Defines the function parameter through which you access the data. For example, in a queue input binding, this property is the name of the function parameter that receives the queue message content.
45+
- **Name**: Defines the function parameter through which you access the data. For example, in a queue input binding, this property is the name of the function parameter that receives the queue message content.
4646

47-
- **Type** - Identifies the type of binding. For example, the type of data or service you want to interact with.
47+
- **Type**: Identifies the type of binding. For example, the type of data or service you want to interact with.
4848

49-
- **Direction** - Indicates the direction data is flowing. For example, is it an input or output binding?
49+
- **Direction**: Indicates the direction data is flowing. For example, is it an input or output binding?
5050

5151
Additionally, most binding types also need a fourth property:
5252

53-
- **Connection** - Provides the name of an app setting key that contains the connection string. Bindings use connection strings stored in app settings to keep secrets out of the function code. Connection strings make your code more configurable and secure.
53+
- **Connection**: Provides the name of an app setting key that contains the connection string. Bindings use connection strings stored in app settings to keep secrets out of the function code. Connection strings make your code more configurable and secure.
5454

5555
## Create a binding
5656

57-
Bindings are defined in JSON. A binding is configured in your function's configuration file, which is named *function.json* and lives in the same folder as your function code.
57+
Bindings are defined in JSON. A binding is configured in your function's configuration file, which is named _function.json_ and lives in the same folder as your function code.
5858

59-
Let's examine a sample *input binding*:
59+
Let's examine a sample _input binding_:
6060

6161
```json
6262
...
@@ -72,13 +72,13 @@ Bindings are defined in JSON. A binding is configured in your function's configu
7272

7373
To create this binding, we:
7474

75-
1. Create a binding in our *function.json* file.
75+
1. Create a binding in our _function.json_ file.
7676

7777
1. Provide the value for the `name` variable. In this example, the variable holds the blob data.
7878

7979
1. Provide the storage `type`. In the preceding example, we're using Blob Storage.
8080

81-
1. Provide the `path`, which specifies the container and the item name that goes in it. The `path` property is required when using the blob trigger, and should be provided in the style shown here, with curly braces around the filename portion of the path. This syntax creates a *binding expression* that allows you to reference the blob's name in other bindings, and in your function's code. In this example, a parameter on the function named *filename* would be populated with the filename of the blob that triggered the function.
81+
1. Provide the `path`, which specifies the container and the item name that goes in it. The `path` property is required when using the blob trigger and should be provided in the style shown here, with curly braces around the filename portion of the path. This syntax creates a _binding expression_ that allows you to reference the blob's name in other bindings and in your function's code. In this example, a parameter on the function named _filename_ would be populated with the filename of the blob that triggered the function.
8282

8383
1. Provide the `connection` string setting name defined in the application's settings file. The name is used as a key to find the connection string to connect to your storage account.
8484

learn-pr/azure/chain-azure-functions-data-using-bindings/includes/3-explore-input-and-output-binding-types-portal-lab.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The parameter `req` is the *trigger binding*, and the parameter `res` is the *ou
1212

1313
::: zone pivot="powershell"
1414

15-
:::image type="content" source="../media/3-default-http-trigger-implementation-powershell-small.png" alt-text="Screenshot of Code and Test pane showing default code for HTTP trigger function template." lightbox="../media/3-default-http-trigger-implementation-powershell.png":::
15+
:::image type="content" source="../media/3-default-http-trigger-implementation-powershell-small.png" alt-text="Screenshot of Code and Test pane showing default code for HTTP trigger function template." lightbox="../media/3-default-http-trigger-implementation-powershell.png":::
1616

1717
The parameter `Request` is the *trigger binding*, and the parameter `Response` is the *output binding*.
1818

@@ -99,7 +99,7 @@ Now that we have a function app, it's time to create a function. Each function h
9999

100100
:::image type="content" source="../media/3-add-function-small.png" alt-text="Screenshot for the Create Function pane." lightbox="../media/3-add-function.png":::
101101

102-
1. In the **Select a template** section, select the **HTTP trigger** template, then select **Next**.
102+
1. In the **Select a template** section, select the **HTTP trigger** template, and then select **Next**.
103103

104104
1. In the **Template details** section, confirm the following settings.
105105

@@ -301,15 +301,15 @@ Now that we have a function app, let's create a function. Each function has a tr
301301
302302
:::image type="content" source="../media/3-function-integration-vertical-small.png" alt-text="Screenshot of vertical flow diagram showing Trigger and Inputs leading to Function and Function leading to Outputs." lightbox="../media/3-function-integration-vertical.png":::
303303
304-
You can see that we can't add more than _one_ trigger. To change a trigger for a function, you need to delete the trigger and create a new one. However, the **Inputs** and **Outputs** sections enable you to add more than one binding, so the request can accept more than one input value and return more than one output value.
304+
You can see that we can't add more than *one* trigger. To change a trigger for a function, you need to delete the trigger and create a new one. However, the **Inputs** and **Outputs** sections enable you to add more than one binding, so the request can accept more than one input value and return more than one output value.
305305
306306
1. In the **Inputs** box, select **Add input**. The **Create Input** pane appears. Select the dropdown list for **Binding Type** to view a list of all possible input binding types.
307307
308308
:::image type="content" source="../media/3-function-input-bindings.png" alt-text="Screenshot of the Add input options.":::
309309
310310
Take a moment to consider how you might use each of these input bindings in a solution.
311311
312-
Later in this module, we add input bindings, but for now, select **Cancel** to dismiss this pane.
312+
Later in this module, we add input bindings. For now, select **Cancel** to dismiss this pane.
313313
314314
1. In the **Outputs** box, select **Add output**. The **Create Output** pane appears. Select the dropdown list for **Binding Type** to view a list of all possible output binding types.
315315
@@ -341,8 +341,8 @@ Now that we have a function app, let's create a function. Each function has a tr
341341
342342
:::image type="content" source="../media/3-function-output-bindings.png" alt-text="Screenshot of the Add output options.":::
343343
344-
As you can see, there are several output binding types. Later in this module, we add output bindings but, for now, select **Cancel** to dismiss this pane.
344+
As you can see, there are several output binding types. Later in this module, we add output bindings. For now, select **Cancel** to dismiss this pane.
345345
346346
::: zone-end
347347
348-
So far, we learned how to create a function app and add a function to it. We saw a simple function in action--one that runs when an HTTP request is made. We also explored the Azure portal and the types of input and output bindings that are available to functions. In the next unit, we'll use an input binding to read text from a database.
348+
So far, we learned how to create a function app and add a function to it. We saw a simple function in action, which is one that runs when an HTTP request is made. We also explored the Azure portal and the types of input and output bindings that are available to functions. In the next unit, we'll use an input binding to read text from a database.

learn-pr/azure/chain-azure-functions-data-using-bindings/includes/4-read-data-with-input-bindings-portal-lesson.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ To connect to a data source, you need to configure an *input binding*. An input
44

55
Azure chain functions can have multiple types of input. However, not all types support both input and output. Use an input function whenever you want to ingest data of that type. Here, we look at the input function types that support input bindings and when to use them.
66

7-
- **Azure Blob Storage** - Blob Storage bindings allow you to read from a blob.
7+
- **Azure Blob Storage**: Blob Storage bindings allow you to read from a blob.
88

9-
- **Azure Cosmos DB** - Azure Cosmos DB input bindings use the SQL API to retrieve one or more Azure Cosmos DB documents, and pass them to the input parameter of the function. The document ID, or query parameters, can be determined based on the trigger that invokes the function.
9+
- **Azure Cosmos DB**: Azure Cosmos DB input bindings use the SQL API to retrieve one or more Azure Cosmos DB documents, and pass them to the input parameter of the function. The document ID, or query parameters, can be determined based on the trigger that invokes the function.
1010

11-
- **Mobile Apps** - A Mobile Apps input binding loads a record from a mobile table endpoint and passes it into your function.
11+
- **Mobile Apps**: A Mobile Apps input binding loads a record from a mobile table endpoint and passes it into your function.
1212

13-
- **Azure Table storage** - You can read data and work with Azure Table storage.
13+
- **Azure Table storage**: You can read data and work with Azure Table storage.
1414

15-
A full listing of supported bindings is available [here](/azure/azure-functions/functions-triggers-bindings?tabs=csharp#supported-bindings)
15+
A full listing of supported bindings is available [here.](/azure/azure-functions/functions-triggers-bindings?tabs=csharp#supported-bindings)
1616

1717
To create a binding as an input, you must define `direction` as `in`. The parameters for each type of binding might vary.
1818

1919
## What is a binding expression?
2020

21-
A binding expression is specialized text in *function.json*, function parameters, or code that is evaluated when the function is invoked, to yield a value. For example, if you have a Service Bus Queue binding, you could use a binding expression to obtain the name of the queue from App Settings.
21+
A binding expression is specialized text in *function.json*, function parameters, or code that is evaluated when the function is invoked to yield a value. For example, if you have a Service Bus Queue binding, you could use a binding expression to obtain the name of the queue from App Settings.
2222

2323
### Types of binding expressions
2424

@@ -31,7 +31,7 @@ There are several types of binding expressions, including:
3131
- New GUID
3232
- Current date and time
3333

34-
Most binding expressions are identified by being wrapped in curly braces. However, app setting binding expressions are wrapped in percent signs, rather than curly braces. For example, if the blob output binding path is `%Environment%/newblob.txt`, and the Environment app setting value is *Development*, a blob is created in the Development container.
34+
Most binding expressions are identified by being wrapped in curly braces. However, app setting binding expressions are wrapped in percent signs rather than curly braces. For example, if the blob output binding path is `%Environment%/newblob.txt`, and the Environment app setting value is *Development*, a blob is created in the Development container.
3535

3636
## Summary
3737

0 commit comments

Comments
 (0)