Skip to content

Commit 070bce5

Browse files
Merge pull request #291558 from yuyully/patch-3
Update functions-event-hub-cosmos-db.md
2 parents 1af755c + eb8cdbb commit 070bce5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

articles/azure-functions/functions-event-hub-cosmos-db.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ az eventhubs eventhub create \
120120
--resource-group $RESOURCE_GROUP \
121121
--name $EVENT_HUB_NAME \
122122
--namespace-name $EVENT_HUB_NAMESPACE \
123-
--message-retention 1
123+
--retention-time 1 \
124+
--cleanup-policy Delete
124125
az eventhubs eventhub authorization-rule create \
125126
--resource-group $RESOURCE_GROUP \
126127
--name $EVENT_HUB_AUTHORIZATION_RULE \
@@ -139,7 +140,8 @@ az eventhubs eventhub create ^
139140
--resource-group %RESOURCE_GROUP% ^
140141
--name %EVENT_HUB_NAME% ^
141142
--namespace-name %EVENT_HUB_NAMESPACE% ^
142-
--message-retention 1
143+
--retention-time 1 ^
144+
--cleanup-policy Delete
143145
az eventhubs eventhub authorization-rule create ^
144146
--resource-group %RESOURCE_GROUP% ^
145147
--name %EVENT_HUB_AUTHORIZATION_RULE% ^
@@ -213,7 +215,7 @@ az functionapp create \
213215
--storage-account $STORAGE_ACCOUNT \
214216
--consumption-plan-location $LOCATION \
215217
--runtime java \
216-
--functions-version 3
218+
--functions-version 4
217219
```
218220

219221
# [Cmd](#tab/cmd)
@@ -229,7 +231,7 @@ az functionapp create ^
229231
--storage-account %STORAGE_ACCOUNT% ^
230232
--consumption-plan-location %LOCATION% ^
231233
--runtime java ^
232-
--functions-version 3
234+
--functions-version 4
233235
```
234236

235237
---
@@ -486,8 +488,8 @@ public class Function {
486488
@CosmosDBOutput(
487489
name = "databaseOutput",
488490
databaseName = "TelemetryDb",
489-
containerName = "TelemetryInfo",
490-
connection = "CosmosDBConnectionSetting")
491+
collectionName = "TelemetryInfo",
492+
connectionStringSetting = "CosmosDBConnectionSetting")
491493
OutputBinding<TelemetryItem> document,
492494
final ExecutionContext context) {
493495

0 commit comments

Comments
 (0)