Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def monitor_exception_handler(ex):
from azure.mgmt.monitor.v2018_01_01.models import ErrorResponseException as ErrorResponseException_v2018_01_01
from azure.mgmt.monitor.v2018_03_01.models import ErrorResponseException as ErrorResponseException_v2018_03_01
from azure.mgmt.monitor.v2019_06_01.models import ErrorResponseException as ErrorResponseException_v2019_06_01
from msrestazure.azure_exceptions import CloudError

from knack.util import CLIError

Expand All @@ -22,7 +23,8 @@ def monitor_exception_handler(ex):
ErrorResponseException_v2017_05_01,
ErrorResponseException_v2018_01_01,
ErrorResponseException_v2018_03_01,
ErrorResponseException_v2019_06_01
ErrorResponseException_v2019_06_01,
CloudError
)):
# work around for issue: https://github.com/Azure/azure-sdk-for-python/issues/1556
try:
Expand Down
18 changes: 12 additions & 6 deletions src/azure-cli/azure/cli/command_modules/monitor/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,8 +1221,10 @@
type: command
short-summary: Create some linked storage accounts for log analytics workspace.
examples:
- name: Create two linked storage accounts for a log analytics workspace
text: az monitor log-analytics workspace linked-storage create --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts SA1 SA2
- name: Create two linked storage accounts for a log analytics workspace using the name of the storage account.
text: az monitor log-analytics workspace linked-storage create --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts StorageAccount1 StorageAccount2
- name: Create one linked storage accounts for a log analytics workspace using the resource id of the storage account.
text: az monitor log-analytics workspace linked-storage create --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000001
"""

helps['monitor log-analytics workspace linked-storage delete'] = """
Expand All @@ -1237,16 +1239,20 @@
type: command
short-summary: Add some linked storage accounts with specific data source type for log analytics workspace.
examples:
- name: Add two linked storage accounts for a log analytics workspace
text: az monitor log-analytics workspace linked-storage add --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts SA1 SA2
- name: Add two linked storage accounts for a log analytics workspace using the name of the storage account.
text: az monitor log-analytics workspace linked-storage add --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts StorageAccount1 StorageAccount2
- name: Add one linked storage accounts for a log analytics workspace using the resource id of the storage account.
text: az monitor log-analytics workspace linked-storage add --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000001
"""

helps['monitor log-analytics workspace linked-storage remove'] = """
type: command
short-summary: Remove some linked storage accounts with specific data source type for log analytics workspace
examples:
- name: Remove two linked storage accounts for a log analytics workspace
text: az monitor log-analytics workspace linked-storage remove --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts SA1 SA2.
- name: Remove two linked storage accounts for a log analytics workspace using the name of the storage account.
text: az monitor log-analytics workspace linked-storage remove --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts StorageAccount1 StorageAccount2
- name: Remove one linked storage accounts for a log analytics workspace using the resource id of the storage account.
text: az monitor log-analytics workspace linked-storage remove --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/cli000001
"""

helps['monitor log-analytics workspace linked-storage list'] = """
Expand Down