@@ -67,7 +67,7 @@ Use the [`az monitor diagnostic-settings create`](/cli/azure/monitor/diagnostic-
67
67
68
68
1 . Use ` az monitor diagnostic-settings create ` to create the setting.
69
69
70
- ``` azurecli
70
+ ``` azurecli-interactive
71
71
az monitor diagnostic-settings create \
72
72
--resource $(az cosmosdb show \
73
73
--resource-group "<resource-group-name>" \
@@ -86,11 +86,7 @@ Use the [`az monitor diagnostic-settings create`](/cli/azure/monitor/diagnostic-
86
86
--logs '[
87
87
{
88
88
"category": "QueryRuntimeStatistics",
89
- "enabled": true,
90
- "retentionPolicy": {
91
- "enabled": false,
92
- "days": 0
93
- }
89
+ "enabled": true
94
90
}
95
91
]'
96
92
```
@@ -100,7 +96,7 @@ Use the [`az monitor diagnostic-settings create`](/cli/azure/monitor/diagnostic-
100
96
101
97
1. Review the results of creating your new setting using `az monitor diagnostics-settings show`.
102
98
103
- ```azurecli
99
+ ```azurecli-interactive
104
100
az monitor diagnostic-settings show \
105
101
--name "example-setting" \
106
102
--resource $(az cosmosdb show \
@@ -119,7 +115,7 @@ Use the [Azure Monitor REST API](/rest/api/monitor/diagnosticsettings/createorup
119
115
120
116
1. Create the diagnostic setting for your Azure Cosmos DB resource using an HTTP `PUT` request and [`az rest`](/cli/azure/reference-index#az-rest).
121
117
122
- ```azurecli
118
+ ```azurecli-interactive
123
119
diagnosticSettingName="example-setting"
124
120
125
121
resourceId=$(az cosmosdb show \
@@ -159,7 +155,7 @@ Use the [Azure Monitor REST API](/rest/api/monitor/diagnosticsettings/createorup
159
155
160
156
1. Use `az rest` again with an HTTP `GET` verb to get the properties of the diagnostic setting.
161
157
162
- ```azurecli
158
+ ```azurecli-interactive
163
159
diagnosticSettingName="example-setting"
164
160
165
161
resourceId=$(az cosmosdb show \
@@ -224,7 +220,7 @@ Use an [Bicep template](../azure-resource-manager/bicep/overview.md) to create t
224
220
225
221
1. Deploy the template using [`az deployment group create`](/cli/azure/deployment/group#az-deployment-group-create).
226
222
227
- ```azurecli
223
+ ```azurecli-interactive
228
224
az deployment group create \
229
225
--resource-group "<resource-group-name>" \
230
226
--template-file diagnosticSetting.bicep \
@@ -297,7 +293,7 @@ Use an [Azure Resource Manager template](../azure-resource-manager/templates/ove
297
293
298
294
1. Deploy the template using [`az deployment group create`](/cli/azure/deployment/group#az-deployment-group-create).
299
295
300
- ```azurecli
296
+ ```azurecli-interactive
301
297
az deployment group create \
302
298
--resource-group "<resource-group-name>" \
303
299
--template-file azuredeploy.json \
@@ -334,7 +330,7 @@ Use the Azure CLI to enable full-text query for your Azure Cosmos DB account.
334
330
335
331
1. Enable full-text query using `az rest` again with an HTTP `PATCH` verb and a JSON payload.
336
332
337
- ```azurecli
333
+ ```azurecli-interactive
338
334
az rest \
339
335
--method "PATCH" \
340
336
--url $(az cosmosdb show \
@@ -355,7 +351,7 @@ Use the Azure CLI to enable full-text query for your Azure Cosmos DB account.
355
351
356
352
1. Wait a few minutes for the operation to complete. Check the status of full-text query by using `az rest` again with HTTP `GET`.
357
353
358
- ```azurecli
354
+ ```azurecli-interactive
359
355
az rest \
360
356
--method "GET" \
361
357
--url $(az cosmosdb show \
0 commit comments