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: learn-pr/azure/chain-azure-functions-data-using-bindings/includes/3-explore-input-and-output-binding-types-portal-lab.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Let's create a function app that we can use throughout this module. A function a
28
28
29
29
1. On the resource menu or from the **Home** page, select **Create a resource**. The **Create a resource** pane appears.
30
30
31
-
1. In the **Create a resource** menu, select **Compute**, and in the results list select **Function App**. You might need to search for **Function App** in the *Search services and marketplace* window.
31
+
1. In the **Create a resource** menu, select **Web**, and in the results list select **Function App**. You might need to search for **Function App** in the *Search services and marketplace* window.
32
32
33
33
1. Select **Consumption**, then select the **Select** button. The **Create Function App** pane appears.
34
34
@@ -207,7 +207,7 @@ Now that we have a function app, let's create a function. Each function has a tr
207
207
208
208
1. In the command bar, select **Get Function Url**. The **Get Function Url** dialog box appears.
209
209
210
-
1. Select **default (function key)** from the dropdown list, then select the *Copy to clipboard* icon at the end of the URL, and then select **OK** to close the dialog box.
210
+
1. On the **default (function key)** select the *Copy to clipboard* icon at the end of the URL, and then select **Close** to close the dialog box.
211
211
212
212
1. In the address bar of a new browser tab, paste the function URL you copied. Press <kbd>Enter</kbd> to run the request in your browser. The response might take a couple of minutes as the function app initializes. If you receive a timeout error, refresh to resend the request.
Copy file name to clipboardExpand all lines: learn-pr/azure/chain-azure-functions-data-using-bindings/includes/5-read-data-with-input-bindings-portal-lab.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ You need to store the data somewhere. In the previous flowchart, the data store
11
11
## Create an Azure Cosmos DB account
12
12
13
13
> [!NOTE]
14
-
> This exercise is not intended to be a tutorial on Azure Cosmos DB. If you're interested in learning more, see the complete learning path about Azure Cosmos DB at the end of this module.
14
+
> This exercise isn't intended to be a tutorial on Azure Cosmos DB. If you're interested in learning more, see the complete learning path about Azure Cosmos DB at the end of this module.
15
15
16
16
### Create a database account
17
17
@@ -28,6 +28,7 @@ A database account is a container for managing one or more databases. Before we
28
28
| Setting | Value | Description |
29
29
|---|---|---|
30
30
|**Project Details**|
31
+
| Workload Type | Development/Testing | Ensures optimal performance and cost efficiency.
31
32
| Subscription | Concierge Subscription | The Azure subscription that works with the resources in the sandbox. |
32
33
| Resource Group | From the drop-down list, select <rgn>[sandbox resource group name]</rgn> | The resource group for your sandbox. |
33
34
|**Instance Details**|
@@ -61,7 +62,7 @@ Let's use the Data Explorer tool to create a database and container.
61
62
| Setting | Value | Description |
62
63
|---|---|---|
63
64
| Database id | Select **Create new**, and enter *func-io-learn-db* for the Database id | Database names can be 1 to 255 characters long, and can't contain `/, \\, #, ?`, or a trailing space.<br>You can enter whatever you want, but we're using *func-io-learn-db* in this module. |
64
-
| Database Max RU/s |4000 |Accept the default throughput of 4000 request units per second (RU/s). To reduce latency, you can scale up the performance later. |
65
+
| Database Max RU/s |Manual |Adjust to Manual and accept the default of 400 request units per second (RU/s). To reduce latency, you can scale up the performance later. |
65
66
| Container id |*Bookmarks*| Container IDs have the same character requirements as database names. We're using *Bookmarks* in this module.|
66
67
| Partition key | /id | The partition key specifies how the documents in Azure Cosmos DB collections are distributed across logical data partitions. We use the *Partition key* setting as a convenience here because we're not concerned with database performance in this module. To learn more about Azure Cosmos DB partition key strategies, explore the Microsoft Learn Azure Cosmos DB modules. |
67
68
@@ -71,7 +72,7 @@ Let's use the Data Explorer tool to create a database and container.
71
72
72
73
When complete, the Data Explorer displays **func-io-learn-db** in **DATA** under **NOSQL API**.
73
74
74
-
1. Select **func-io-learn-db** to expand it. Notice that your **func-io-learn-db** database contains several child members, including Scale and Bookmarks.
75
+
1. Select **func-io-learn-db** to expand it. Notice that your **func-io-learn-db** database contains child members, including Bookmarks.
75
76
76
77
1. Expand the **Bookmarks** container. Notice that several child members already prepopulate it.
77
78
@@ -162,7 +163,7 @@ You can verify our progress so far by testing the new function.
162
163
163
164
1. In the command bar, select **Get Function Url**. The **Get Function Url** dialog box appears.
164
165
165
-
1. Select **default (function key)** from the drop-down list, then select the *Copy to clipboard* icon, and select **OK**.
166
+
1. On the **default (function key)**, select the *Copy to clipboard* icon, and select **Close**.
166
167
167
168
1. Paste the function URL you copied into the address bar of a new browser tab. Append the query string value `&name=<your name>` to the end of the URL, replacing `<your name>` with your name, and then press <kbd>Enter</kbd>. The Azure function should return a personalized response in the browser.
168
169
@@ -199,7 +200,7 @@ To read data from the database, you need to define an input binding. As you see
199
200
| **Partition key** | `/id` | Add the partition key that you defined when you created the _Bookmarks_ Azure Cosmos DB collection. The key entered here (specified in input binding format `<key>`) must match the one in the collection. |
200
201
| **SQL Query (optional)** | _Leave blank_ | You're only retrieving one document at a time based on the ID. So, filtering with the Document ID setting is better than using a SQL Query in this instance. You could craft a SQL Query to return one entry (`SELECT * from b where b.ID = id`). That query would indeed return a document, but it would return it in a document collection. Your code would have to manipulate a collection unnecessarily. Use the SQL Query approach when you want to get multiple documents. |
201
202
202
-
To clarify why we're using these settings, we want to look up a bookmark with a specific ID, so we tied the **Document ID** that our function receives in the query string to the input binding. This syntax is known as a *binding expression*. The function is triggered by an HTTP request that uses a query string to specify the ID to look up. Because IDs are unique in our collection, the binding returns either 0 (not found) or 1 (found) documents.
203
+
To clarify why we're using these settings, we want to look up a bookmark with a specific ID, so we tied the **Document ID** that our function receives in the query string to the input binding. This syntax is known as a *binding expression*. An HTTP request triggers the function that uses a query string to specify the ID to look up. Because IDs are unique in our collection, the binding returns either 0 (not found) or 1 (found) documents.
203
204
204
205
1. To save this input binding configuration, select **Add**.
205
206
@@ -388,7 +389,7 @@ Let's examine what this code is doing.
388
389
389
390
1. In the command bar, select **Get function URL**. The **Get function URL** dialog box appears.
390
391
391
-
1. From the **Key** drop-down list, select **default** under **Function key**, and then select the *Copy to clipboard* icon at the end of the URL.
392
+
1. On the **default (function key)**, select the *Copy to clipboard* icon.
392
393
393
394
1. Paste the function key you copied into the address bar of a new browser tab, and then add the query string value `&id=docs` to the end of the URL. The resulting URL should resemble the following example:
394
395
@@ -404,6 +405,6 @@ Let's examine what this code is doing.
404
405
405
406
1. Replace `&id=docs` with `&id=missing`, press <kbd>Enter</kbd>, and observe the response. We defined five bookmarks and created a meaningful error response if the requested bookmark doesn't exist.
406
407
407
-
In this unit, you created your first input binding manually to read from an Azure Cosmos DB database. The amount of code you wrote to search our database and read data was minimal, thanks to bindings. You did most of your work configuring the binding declaratively, and the platform took care of the rest.
408
+
In this unit, you created your first input binding manually to read from an Azure Cosmos DB database. The amount of code you wrote to search our database and read data was minimal because of bindings. You did most of your work configuring the binding declaratively, and the platform took care of the rest.
408
409
409
410
In the next unit, you'll add more data to our bookmarks collection through an Azure Cosmos DB output binding.
Copy file name to clipboardExpand all lines: learn-pr/azure/chain-azure-functions-data-using-bindings/includes/7-write-data-with-output-bindings-portal-lab.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,7 +138,7 @@ Let's break down what this code does:
138
138
* Posting a message to our queue is as simple as setting the `context.bindings.newmessage` parameter.
139
139
140
140
> [!NOTE]
141
-
> The only task you performed was to create a queue binding. You never created the queue explicitly. You are witnessing the power of bindings! As the following notification declares, the queue is automatically created for you if it doesn't exist.
141
+
> The only task you performed was to create a queue binding. You never created the queue explicitly. You're witnessing the power of bindings! As the following notification declares, the queue is automatically created for you if it doesn't exist.
142
142
>
143
143
> :::image type="content" source="../media/7-q-auto-create-small.png" alt-text="Screenshot showing message that the queue will be auto-created.":::.
144
144
>
@@ -209,7 +209,7 @@ So, that's it. Let's see our work in action in the next section.
209
209
210
210
1. To open the **run.ps1** file in the code editor, select your **HttpTrigger3** function from the breadcrumb at the top of the pane.
211
211
212
-
1. In the Function menu, under **Developer**, select **Code + Test**. The **Code + Test** pane for your **HttpTrigger3** function appears, displaying the default content of **run.ps1**.
212
+
1. In the Function menu, select **Code + Test**. The **Code + Test** pane for your **HttpTrigger3** function appears, displaying the default content of **run.ps1**.
213
213
214
214
1. Replace the content in the file with the following code.
215
215
@@ -250,7 +250,7 @@ Let's break down what this code does:
250
250
* Posting a message to our queue is as simple as calling `Push-OutputBinding` with the name of the queue output binding (`newmessage`) and the value of the `$newBookmark` object.
251
251
252
252
> [!NOTE]
253
-
> The only task you performed was to create a queue binding. You never created the queue explicitly. You are witnessing the power of bindings! As the following notification declares, the queue is automatically created for you if it doesn't exist.
253
+
> The only task you performed was to create a queue binding. You never created the queue explicitly. You're witnessing the power of bindings! As the following notification declares, the queue is automatically created for you if it doesn't exist.
254
254
>
255
255
> :::image type="content" source="../media/7-q-auto-create-small.png" alt-text="Screenshot showing UI tool tip that the queue will be auto-created." border="false":::
0 commit comments