Skip to content

Commit 2cc7703

Browse files
committed
Reverting 2 samples that we need confirmation on.
1 parent 6b87495 commit 2cc7703

File tree

1 file changed

+2
-39
lines changed

1 file changed

+2
-39
lines changed

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

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,25 +1607,7 @@ The following example shows a function that retrieves a single document. The fun
16071607

16081608
# [v2](#tab/python-v2)
16091609

1610-
```python
1611-
@app.route()
1612-
@app.cosmos_db_input(
1613-
arg_name="documents",
1614-
database_name="ToDoItems",
1615-
collection_name="Items",
1616-
connection_string_setting="CosmosDBConnection")
1617-
def test_function(req: func.HttpRequest,
1618-
todoitems: func.DocumentList) -> func.HttpResponse:
1619-
id = req.params.get('id')
1620-
partitionKeyValue = req.params.get('partitionKeyValue')
1621-
if not todoitems:
1622-
logging.warning("ToDoItems not found")
1623-
else:
1624-
logging.info("Found ToDo item, Text=%s",
1625-
todoitems[0]['description'])
1626-
1627-
return 'OK'
1628-
```
1610+
No equivalent sample for v2 at this time.
16291611

16301612
# [v1](#tab/python-v1)
16311613

@@ -1691,26 +1673,7 @@ The following example shows a function that retrieves a single document. The fun
16911673

16921674
# [v2](#tab/python-v2)
16931675

1694-
```python
1695-
@app.function_name()
1696-
@app.route(route="todoitems/{partitionKey}/{id}")
1697-
@app.cosmos_db_input(
1698-
arg_name="todoitems",
1699-
database_name="ToDoItems",
1700-
collection_name="Items",
1701-
connection_string_setting="CONNECTION_STRING",
1702-
partition_key="{partitionKey}",
1703-
id="{id}")
1704-
def test_function(req: func.HttpRequest,
1705-
todoitems: func.DocumentList) -> func.HttpResponse:
1706-
if not todoitems:
1707-
logging.warning("ToDo items not found")
1708-
else:
1709-
logging.info("Found ToDo item, Text=%s",
1710-
todoitems[0]['description'])
1711-
1712-
return 'OK'
1713-
```
1676+
No equivalent sample for v2 at this time.
17141677

17151678
# [v1](#tab/python-v1)
17161679

0 commit comments

Comments
 (0)