Skip to content

Commit 8ba62ff

Browse files
authored
Merge pull request #112564 from rioriost/patch-2
Update functions-bindings-cosmosdb-v2-trigger.md
2 parents 62ffff7 + c2d7fa2 commit 8ba62ff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

articles/azure-functions/functions-bindings-cosmosdb-v2-trigger.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,12 @@ import azure.functions as func
280280
app = func.FunctionApp()
281281

282282
@app.function_name(name="CosmosDBTrigger")
283-
@app.cosmos_db_trigger(arg_name="documents",
283+
@app.cosmos_db_trigger(name="documents",
284+
connection="CONNECTION_SETTING",
284285
database_name="DB_NAME",
285-
collection_name="COLLECTION_NAME",
286-
connection_string_setting="CONNECTION_SETTING",
287-
lease_collection_name="leases", create_lease_collection_if_not_exists="true")
286+
container_name="CONTAINER_NAME",
287+
lease_container_name="leases",
288+
create_lease_container_if_not_exists="true")
288289
def test_function(documents: func.DocumentList) -> str:
289290
if documents:
290291
logging.info('Document id: %s', documents[0]['id'])

0 commit comments

Comments
 (0)