Skip to content

Commit 670049e

Browse files
author
dksimpson
committed
Edits and screenshot borders
1 parent 1681787 commit 670049e

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

articles/azure-functions/functions-create-cosmos-db-triggered-function.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.custom: cc996988-fb4f-47
1111

1212
Learn how to create a function triggered when data is added to or changed in Azure Cosmos DB. To learn more about Azure Cosmos DB, see [Azure Cosmos DB: Serverless database computing using Azure Functions](../cosmos-db/serverless-computing-database.md).
1313

14-
![View message in the logs.](./media/functions-create-cosmos-db-triggered-function/quickstart-completed.png)
14+
:::image type="content" source="./media/functions-create-cosmos-db-triggered-function/quickstart-completed.png" alt-text="Azure Cosmos DB code":::
1515

1616
## Prerequisites
1717

@@ -22,6 +22,9 @@ To complete this tutorial:
2222
> [!NOTE]
2323
> [!INCLUDE [SQL API support only](../../includes/functions-cosmosdb-sqlapi-note.md)]
2424
25+
## Sign in to Azure
26+
Sign in to the [Azure portal](https://portal.azure.com/) with your Azure account.
27+
2528
## Create an Azure Cosmos DB account
2629

2730
You must have an Azure Cosmos DB account that uses the SQL API before you create the trigger.
@@ -42,28 +45,29 @@ Next, you create a function in the new function app.
4245

4346
1. On the **New Function** page, enter `cosmos` in the search field and then choose the **Azure Cosmos DB trigger** template.
4447

45-
![Functions page in the Azure portal](./media/functions-create-cosmos-db-triggered-function/function-choose-cosmos.png)
48+
:::image type="content" source="./media/functions-create-cosmos-db-triggered-function/function-choose-cosmos.png" alt-text="Functions page in the Azure portal":::
4649

47-
1. Configure the new trigger with the settings as specified in the table below the image.
4850

49-
![Create the Azure Cosmos DB triggered function](./media/functions-create-cosmos-db-triggered-function/functions-cosmosdb-trigger-settings.png)
51+
1. Configure the new trigger with the settings as specified in the following table:
5052

5153
| Setting | Suggested value | Description |
5254
| ------------ | ---------------- | ------------------------------------------ |
5355
| **New Function** | Accept the default name | The name of the function. |
5456
| **Cosmos DB account connection** | Accept the default new name | Select **New**, the **Database Account** you created earlier, and then **OK**. This action creates an application setting for your account connection. This setting is used by the binding to connection to the database. |
55-
| **Database name** | Tasks | Name of database with the container to be monitored. |
56-
| **Collection name** | Items | Name of container to be monitored. |
57+
| **Database name** | Tasks | Name of the database that includes the collection to be monitored. |
58+
| **Collection name** | Items | Name of the collection to be monitored. |
5759
| **Collection name for leases** | leases | Name of the collection to store the leases. |
58-
| **Create lease container if it does not exist** | Yes | Because the container doesn't already exist, so create it. |
60+
| **Create lease collection if it does not exist** | Yes | Checks for existence of the lease collection and automatically creates it. |
61+
62+
:::image type="content" source="./media/functions-create-cosmos-db-triggered-function/functions-cosmosdb-trigger-settings.png" alt-text="Create the Azure Cosmos DB triggered function":::
5963

6064
1. Select **Create Function**.
6165

6266
Azure creates the Cosmos DB trigger function.
6367

6468
1. To display the template-based function code, select **Code + Test**.
6569

66-
![Cosmos DB function template in C#](./media/functions-create-cosmos-db-triggered-function/function-cosmosdb-template.png)
70+
:::image type="content" source="./media/functions-create-cosmos-db-triggered-function/function-cosmosdb-template.png" alt-text="Cosmos DB function template in C#":::
6771

6872
This function template writes the number of documents and the first document ID to the logs.
6973

@@ -102,7 +106,7 @@ After the container specified in the function binding exists, you can test the f
102106

103107
1. Expand the new **Items** container in Data Explorer, choose **Items**, then select **New Item**.
104108

105-
![Create an item in Items container](./media/functions-create-cosmos-db-triggered-function/create-item-in-container.png)
109+
:::image type="content" source="./media/functions-create-cosmos-db-triggered-function/create-item-in-container.png" alt-text="Create an item in Items container":::
106110

107111
1. Replace the contents of the new item with the following content, then choose **Save**.
108112

Loading
-56.7 KB
Loading

includes/cosmos-db-create-dbaccount.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,11 @@
1010
ms.custom: include file
1111
---
1212

13-
1. Go to the [Azure portal](https://portal.azure.com/) to create an Azure Cosmos DB account. At your homepage choose **Create a resource** from the **Azure services** panel.
13+
1. From the Azure portal menu or the **Home page**, select **Create a resource**.
1414

15-
![Create a resource](./media/cosmos-db-create-dbaccount/azure-cosmos-db-create-resource-1.png)
15+
1. On the **New** page, search for and select **Azure Cosmos DB**.
1616

17-
1. Search for and select **Azure Cosmos DB**.
18-
19-
![The Azure portal resources drop-down](./media/cosmos-db-create-dbaccount/create-nosql-db-databases-json-tutorial-updated-1.png)
20-
21-
1. Select **Create**.
22-
23-
![Create Azure Cosmos DB resource](./media/cosmos-db-create-dbaccount/azure-cosmos-db-create-account-1.png)
17+
1. On the **Azure Cosmos DB** page, select **Create**.
2418

2519
1. On the **Create Azure Cosmos DB Account** page, enter the basic settings for the new Azure Cosmos account.
2620

0 commit comments

Comments
 (0)