Skip to content

Commit 9c6af3a

Browse files
Learn Editor: Update merge.md
1 parent 7d25178 commit 9c6af3a

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

articles/cosmos-db/merge.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,24 @@ Install-Module @parameters
9393
Use [`az extension add`](/cli/azure/extension#az-extension-add) to install the [cosmosdb-preview](https://github.com/azure/azure-cli-extensions/tree/main/src/cosmosdb-preview) Azure CLI extension.
9494

9595

96+
97+
98+
99+
100+
101+
102+
103+
104+
96105
```azurecli-interactive
97106
az extension add \
98107
--name cosmosdb-preview
99108
```
100109

101110

111+
112+
113+
102114
---
103115

104116
#### [API for NoSQL](#tab/nosql/azure-powershell)
@@ -143,13 +155,21 @@ az cosmosdb sql container merge \
143155
For **shared throughput databases**, start the merge by using `az cosmosdb sql database merge`.
144156

145157

158+
159+
160+
146161
```azurecli
147162
az cosmosdb sql database merge \
148163
--account-name '<cosmos-account-name>'
149164
--name '<cosmos-database-name>'
150165
--resource-group '<resource-group-name>'
151166
```
152167

168+
169+
```http
170+
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/partitionMerge?api-version=2023-11-15-preview
171+
```
172+
153173
#### [API for MongoDB](#tab/mongodb/azure-powershell)
154174

155175
Use `Invoke-AzCosmosDBMongoDBCollectionMerge` with the `-WhatIf` parameter to preview the merge without actually performing the operation.
@@ -179,17 +199,36 @@ Invoke-AzCosmosDBMongoDBCollectionMerge @parameters
179199

180200
#### [API for MongoDB](#tab/mongodb/azure-cli)
181201

182-
Start the merge by using [`az cosmosdb mongodb collection merge`](/cli/azure/cosmosdb/mongodb/collection#az-cosmosdb-mongodb-collection-merge).
202+
For **shared-throughput databases**, start the merge by using [`az cosmosdb mongodb database merge`](/cli/azure/cosmosdb/mongodb/database?view=azure-cli-latest).
203+
204+
205+
206+
```azurecli
207+
az cosmosdb mongodb database merge \
208+
--account-name '<cosmos-account-name>'
209+
--name '<cosmos-database-name>'
210+
--resource-group '<resource-group-name>'
211+
```
212+
213+
214+
```http
215+
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/partitionMerge?api-version=2023-11-15-preview
216+
```
217+
218+
For **provisioned containers**, start the merge by using [`az cosmosdb mongodb collection merge`](/cli/azure/cosmosdb/mongodb/collection#az-cosmosdb-mongodb-collection-merge).
183219

184220
```azurecli-interactive
185221
az cosmosdb mongodb collection merge \
186222
--resource-group '<resource-group-name>' \
187223
--account-name '<cosmos-account-name>' \
188224
--database-name '<cosmos-database-name>' \
189225
--name '<cosmos-collection-name>'
226+
190227
```
191228

192229

230+
231+
193232
---
194233

195234
### Monitor merge operations

0 commit comments

Comments
 (0)