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
|**Name**| Default | Use the default function name suggested by the template.|
62
-
|**Azure Cosmos DB account connection**| New setting | Select **New**, then choose your **Subscription**, the **Database account** you created earlier, and **Select**. This creates an application setting for your account connection. This setting is used by the binding to connect to the database. |
63
-
|**Collection name**| Items | Name of collection to be monitored. |
64
-
|**Create lease collection if it doesn't exist**| Checked | The collection doesn't already exist, so create it. |
65
-
|**Database name**| Tasks | Name of database with the collection to be monitored. |
62
+
|**Azure Cosmos DB account connection**| New setting | Select **New**, then choose your **Subscription**, the **Database account** you created earlier, and **Select**. This creates an application setting for your account connection. This setting is used by the binding to connection to the database. |
63
+
|**Container name**| Items | Name of container to be monitored. |
64
+
|**Create lease container if it doesn't exist**| Checked | The container doesn't already exist, so create it. |
65
+
|**Database name**| Tasks | Name of database with the container to be monitored. |
66
66
67
67
1. Click **Create** to create your Azure Cosmos DB triggered function. After the function is created, the template-based function code is displayed.
68
68
69
69

70
70
71
71
This function template writes the number of documents and the first document ID to the logs.
72
72
73
-
Next, you connect to your Azure Cosmos DB account and create the `Items`collection in the `Tasks` database.
73
+
Next, you connect to your Azure Cosmos DB account and create the `Items`container in the `Tasks` database.
74
74
75
-
## Create the Items collection
75
+
## Create the Items container
76
76
77
77
1. Open a second instance of the [Azure portal](https://portal.azure.com) in a new tab in the browser.
78
78
@@ -82,33 +82,32 @@ Next, you connect to your Azure Cosmos DB account and create the `Items` collect
82
82
83
83
1. Choose your Azure Cosmos DB account, then select the **Data Explorer**.
84
84
85
-
1.In**Collections**, choose **taskDatabase** and select **New Collection**.
85
+
1.Under**SQL API**, choose **Tasks**database and select **New Container**.
86
86
87
-

87
+

88
88
89
-
1. In **Add Collection**, use the settings shown in the table below the image.
89
+
1. In **Add Container**, use the settings shown in the table below the image.
90
90
91
-

91
+

92
92
93
93
| Setting|Suggested value|Description |
94
94
| ---|---|--- |
95
95
|**Database ID**| Tasks |The name for your new database. This must match the name defined in your function binding. |
96
-
|**Collection ID**| Items | The name for the new collection. This must match the name defined in your function binding. |
97
-
|**Storage capacity**| Fixed (10 GB)|Use the default value. This value is the storage capacity of the database. |
98
-
|**Throughput**|400 RU| Use the default value. If you want to reduce latency, you can scale up the throughput later. |
99
-
|**[Partition key](../cosmos-db/partition-data.md)**| /category|A partition key that distributes data evenly to each partition. Selecting the correct partition key is important in creating a performant collection. |
96
+
|**Container ID**| Items | The name for the new container. This must match the name defined in your function binding. |
97
+
|**[Partition key](../cosmos-db/partition-data.md)**| /category|A partition key that distributes data evenly to each partition. Selecting the correct partition key is important in creating a performant container. |
98
+
|**Throughput**|400 RU| Use the default value. If you want to reduce latency, you can scale up the throughput later. |
100
99
101
-
1. Click **OK** to create the Items collection. It may take a short time for the collection to get created.
100
+
1. Click **OK** to create the Items container. It may take a short time for the container to get created.
102
101
103
-
After the collection specified in the function binding exists, you can test the function by adding documents to this new collection.
102
+
After the container specified in the function binding exists, you can test the function by adding items to this new container.
104
103
105
104
## Test the function
106
105
107
-
1. Expand the new **taskCollection**collection in Data Explorer, choose **Documents**, then select **New Document**.
106
+
1. Expand the new **Items**container in Data Explorer, choose **Items**, then select **New Item**.
108
107
109
-

108
+

110
109
111
-
1. Replace the contents of the new document with the following content, then choose **Save**.
110
+
1. Replace the contents of the new item with the following content, then choose **Save**.
0 commit comments