Skip to content

Commit 99834a9

Browse files
committed
Make Azure CLI commands interactive
1 parent 6936005 commit 99834a9

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

articles/cosmos-db/monitor-resource-logs.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Use the [`az monitor diagnostic-settings create`](/cli/azure/monitor/diagnostic-
6767

6868
1. Use `az monitor diagnostic-settings create` to create the setting.
6969

70-
```azurecli
70+
```azurecli-interactive
7171
az monitor diagnostic-settings create \
7272
--resource $(az cosmosdb show \
7373
--resource-group "<resource-group-name>" \
@@ -86,11 +86,7 @@ Use the [`az monitor diagnostic-settings create`](/cli/azure/monitor/diagnostic-
8686
--logs '[
8787
{
8888
"category": "QueryRuntimeStatistics",
89-
"enabled": true,
90-
"retentionPolicy": {
91-
"enabled": false,
92-
"days": 0
93-
}
89+
"enabled": true
9490
}
9591
]'
9692
```
@@ -100,7 +96,7 @@ Use the [`az monitor diagnostic-settings create`](/cli/azure/monitor/diagnostic-
10096
10197
1. Review the results of creating your new setting using `az monitor diagnostics-settings show`.
10298
103-
```azurecli
99+
```azurecli-interactive
104100
az monitor diagnostic-settings show \
105101
--name "example-setting" \
106102
--resource $(az cosmosdb show \
@@ -119,7 +115,7 @@ Use the [Azure Monitor REST API](/rest/api/monitor/diagnosticsettings/createorup
119115
120116
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).
121117
122-
```azurecli
118+
```azurecli-interactive
123119
diagnosticSettingName="example-setting"
124120
125121
resourceId=$(az cosmosdb show \
@@ -159,7 +155,7 @@ Use the [Azure Monitor REST API](/rest/api/monitor/diagnosticsettings/createorup
159155
160156
1. Use `az rest` again with an HTTP `GET` verb to get the properties of the diagnostic setting.
161157
162-
```azurecli
158+
```azurecli-interactive
163159
diagnosticSettingName="example-setting"
164160
165161
resourceId=$(az cosmosdb show \
@@ -224,7 +220,7 @@ Use an [Bicep template](../azure-resource-manager/bicep/overview.md) to create t
224220
225221
1. Deploy the template using [`az deployment group create`](/cli/azure/deployment/group#az-deployment-group-create).
226222
227-
```azurecli
223+
```azurecli-interactive
228224
az deployment group create \
229225
--resource-group "<resource-group-name>" \
230226
--template-file diagnosticSetting.bicep \
@@ -297,7 +293,7 @@ Use an [Azure Resource Manager template](../azure-resource-manager/templates/ove
297293
298294
1. Deploy the template using [`az deployment group create`](/cli/azure/deployment/group#az-deployment-group-create).
299295
300-
```azurecli
296+
```azurecli-interactive
301297
az deployment group create \
302298
--resource-group "<resource-group-name>" \
303299
--template-file azuredeploy.json \
@@ -334,7 +330,7 @@ Use the Azure CLI to enable full-text query for your Azure Cosmos DB account.
334330
335331
1. Enable full-text query using `az rest` again with an HTTP `PATCH` verb and a JSON payload.
336332
337-
```azurecli
333+
```azurecli-interactive
338334
az rest \
339335
--method "PATCH" \
340336
--url $(az cosmosdb show \
@@ -355,7 +351,7 @@ Use the Azure CLI to enable full-text query for your Azure Cosmos DB account.
355351
356352
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`.
357353
358-
```azurecli
354+
```azurecli-interactive
359355
az rest \
360356
--method "GET" \
361357
--url $(az cosmosdb show \

0 commit comments

Comments
 (0)