Skip to content

Commit dc2835a

Browse files
committed
Tweaks to wording.
1 parent 8b34711 commit dc2835a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

articles/azure-functions/functions-add-output-binding-cosmos-db-vs-code.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ A binding is added to the `bindings` array in your *function.json*, which should
220220

221221
# [v2](#tab/v2)
222222

223-
Binding attributes are defined directly in the *function_app.py* file. You use the queue_output decorator to add an [Azure Cosmos DB output binding](/azure/azure-functions/functions-bindings-triggers-python#azure-cosmos-db-output-binding).
224-
225-
Add the following decorator to your function code in *function_app.py*:
223+
Binding attributes are defined directly in the *function_app.py* file. You use the `cosmos_db_output` decorator to add an [Azure Cosmos DB output binding](/azure/azure-functions/functions-bindings-triggers-python#azure-cosmos-db-output-binding):
226224

227225
```python
228226
@app.cosmos_db_output(arg_name="outputDocument", database_name="my-database",
@@ -386,7 +384,7 @@ The document `{"id": "name"}` is created in the database collection specified in
386384

387385
# [v2](#tab/v2)
388386

389-
Update *HttpExample\\function_app.py* to match the following code, add the `outputDocument` parameter to the function definition and `outputDocument.set()` under the `if name:` statement:
387+
Update *HttpExample\\function_app.py* to match the following code. Add the `outputDocument` parameter to the function definition and `outputDocument.set()` under the `if name:` statement:
390388

391389
```python
392390
import azure.functions as func
@@ -397,8 +395,7 @@ app = func.FunctionApp()
397395
@app.function_name(name="HttpTrigger1")
398396
@app.route(route="hello", auth_level=func.AuthLevel.ANONYMOUS)
399397
@app.queue_output(arg_name="msg", queue_name="outqueue", connection="AzureWebJobsStorage")
400-
@app.cosmos_db_output(arg_name="outputDocument", database_name="my-database",
401-
collection_name="my-container", connection_string_setting="CosmosDbConnectionString")
398+
@app.cosmos_db_output(arg_name="outputDocument", database_name="my-database", collection_name="my-container" connection_string_setting="CosmosDbConnectionString")
402399
def test_function(req: func.HttpRequest, msg: func.Out[func.QueueMessage],
403400
outputDocument: func.Out[func.Document]) -> func.HttpResponse:
404401
logging.info('Python HTTP trigger function processed a request.')

0 commit comments

Comments
 (0)