Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions articles/documentdb/change-streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,20 @@ az resource show --ids "/subscriptions/<sub id>/resourceGroups/<resource group n

3. Send PATCH request to enable the feature.

# [Bash](#tab/bash)

```bash
az resource patch --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" --api-version 2024-10-01-preview --properties "{\"previewFeatures\": [ \"ChangeStreams\"]}"
```

# [PowerShell](#tab/powershell)

```powershell
az resource patch --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" --api-version 2024-10-01-preview --properties '{\"previewFeatures\": [\"ChangeStreams\"]}'
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PowerShell example passes an invalid JSON string to --properties. Because the argument is wrapped in single quotes, the \" sequences are preserved and az receives {\"previewFeatures\": ...}, which isn't valid JSON (it starts with a backslash outside a JSON string). Use a PowerShell-safe quoting approach that results in {"previewFeatures": ["ChangeStreams"]} being passed to the CLI (for example, single quotes around a JSON string that contains unescaped double quotes).

Suggested change
az resource patch --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" --api-version 2024-10-01-preview --properties '{\"previewFeatures\": [\"ChangeStreams\"]}'
az resource patch --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" --api-version 2024-10-01-preview --properties '{"previewFeatures": ["ChangeStreams"]}'

Copilot uses AI. Check for mistakes.
```

---
Comment on lines +41 to +53
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tabbed content block (tab headers, code fences, and the terminating ---) isn't indented under step 3, so it will render outside the numbered list item and can break the step formatting. Indent the entire tabbed block to nest it under the 3. list item (consistent with other docs that use tabs inside lists).

Suggested change
# [Bash](#tab/bash)
```bash
az resource patch --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" --api-version 2024-10-01-preview --properties "{\"previewFeatures\": [ \"ChangeStreams\"]}"
```
# [PowerShell](#tab/powershell)
```powershell
az resource patch --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" --api-version 2024-10-01-preview --properties '{\"previewFeatures\": [\"ChangeStreams\"]}'
```
---
# [Bash](#tab/bash)
```bash
az resource patch --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" --api-version 2024-10-01-preview --properties "{\"previewFeatures\": [ \"ChangeStreams\"]}"

PowerShell

az resource patch --ids "/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/Microsoft.DocumentDB/mongoClusters/<cluster-name>" --api-version 2024-10-01-preview --properties '{\"previewFeatures\": [\"ChangeStreams\"]}'

Copilot uses AI. Check for mistakes.

4. Verify result:
- Ensure the response payload includes `"previewFeatures": ["ChangeStreams"]`.
- If you encounter the error "change streams isn't supported on this cluster," please create a support request.
Expand Down
Loading