Skip to content

Commit cd59c06

Browse files
committed
Corrected CLI cmdlets
1 parent 4c8ea18 commit cd59c06

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

articles/azure-monitor/logs/customer-managed-keys.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,20 @@ N/A
148148

149149
# [Azure CLI](#tab/azure-cli)
150150

151-
```azurecli
152-
az account set —subscription "cluster-subscription-id"
151+
When entering "''" value for ```key-version```, the cluster always uses the last key version in Key Vault and there is no need to update cluster post key rotation.
153152

154-
az monitor log-analytics cluster update —no-wait —name "cluster-name" —resource-group "resource-group-name" —key-name "key-name" —key-vault-uri "key-uri" —key-version "key-version"
153+
```azurecli
154+
az account set --subscription cluster-subscription-id
155155
156-
# Wait for job completion when `—no-wait` was used
157-
$clusterResourceId = az monitor log-analytics cluster list —resource-group "resource-group-name" —query "[?contains(name, "cluster-name")].[id]" —output tsv
158-
az resource wait —created —ids $clusterResourceId —include-response-body true
156+
az monitor log-analytics cluster update --no-wait true --name "cluster-name" --resource-group "resource-group-name" --key-name "key-name" --key-vault-uri "key-uri" --key-version "key-version"
159157
158+
$clusterResourceId = az monitor log-analytics cluster list --resource-group "resource-group-name" --query "[?contains(name, "cluster-name")].[id]" --output tsv
159+
az resource wait --created --ids $clusterResourceId --include-response-body true
160160
```
161161
# [PowerShell](#tab/powershell)
162162

163+
When entering "''" value for ```KeyVersion```, the cluster always uses the last key version in Key Vault and there is no need to update cluster post key rotation.
164+
163165
```powershell
164166
Select-AzSubscription "cluster-subscription-id"
165167
@@ -294,13 +296,13 @@ N/A
294296
# [Azure CLI](#tab/azure-cli)
295297

296298
```azurecli
297-
az account set subscription "storage-account-subscription-id"
299+
az account set --subscription "storage-account-subscription-id"
298300
299301
$storageAccountId = '/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Storage/storageAccounts/<storage name>'
300302
301-
az account set subscription "workspace-subscription-id"
303+
az account set --subscription "workspace-subscription-id"
302304
303-
az monitor log-analytics workspace linked-storage create type Query resource-group "resource-group-name" workspace-name "workspace-name" storage-accounts $storageAccountId
305+
az monitor log-analytics workspace linked-storage create --type Query --resource-group "resource-group-name" --workspace-name "workspace-name" --storage-accounts $storageAccountId
304306
```
305307

306308
# [PowerShell](#tab/powershell)
@@ -348,13 +350,13 @@ N/A
348350
# [Azure CLI](#tab/azure-cli)
349351

350352
```azurecli
351-
az account set subscription "storage-account-subscription-id"
353+
az account set --subscription "storage-account-subscription-id"
352354
353355
$storageAccountId = '/subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Storage/storageAccounts/<storage name>'
354356
355-
az account set subscription "workspace-subscription-id"
357+
az account set --subscription "workspace-subscription-id"
356358
357-
az monitor log-analytics workspace linked-storage create type ALerts resource-group "resource-group-name" workspace-name "workspace-name" storage-accounts $storageAccountId
359+
az monitor log-analytics workspace linked-storage create --type ALerts --resource-group "resource-group-name" --workspace-name "workspace-name" --storage-accounts $storageAccountId
358360
```
359361

360362
# [PowerShell](#tab/powershell)

0 commit comments

Comments
 (0)