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**.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-how-to-azure-devops.md
+41-10Lines changed: 41 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ To create a YAML-based pipeline, first build your app, and then deploy the app.
25
25
26
26
How you build your app in Azure Pipelines depends on your app's programming language. Each language has specific build steps that create a deployment artifact. A deployment artifact is used to deploy your function app in Azure.
27
27
28
-
#### .NET
28
+
#[C\#](#tab/csharp)
29
29
30
30
You can use the following sample to create a YAML file to build a .NET app:
31
31
@@ -56,7 +56,7 @@ steps:
56
56
artifactName: 'drop'
57
57
```
58
58
59
-
#### JavaScript
59
+
# [JavaScript](#tab/javascript)
60
60
61
61
You can use the following sample to create a YAML file to build a JavaScript app:
62
62
@@ -84,13 +84,44 @@ steps:
84
84
artifactName: 'drop'
85
85
```
86
86
87
-
#### Python
87
+
# [Python](#tab/python)
88
88
89
-
You can use the following sample to create a YAML file to build a Python app. Python is supported only for Linux Azure Functions. The YAML for Python 3.7 can be built by replacing all the instances of 3.6 with 3.7 in this YAML.
89
+
You can use one of the following samples to create a YAML file to build an app for a specific Python version. Python is supported only for function apps running on Linux.
90
+
91
+
**Version 3.7**
92
+
93
+
```yaml
94
+
pool:
95
+
vmImage: ubuntu-16.04
96
+
steps:
97
+
- task: UsePythonVersion@0
98
+
displayName: "Setting python version to 3.7 as required by functions"
0 commit comments