az monitor log-analytics workspace linked-storage

Manage linked storage account for log analytics workspace.

Commands

az monitor log-analytics workspace linked-storage add

Add some linked storage accounts with specific data source type for log analytics workspace.

az monitor log-analytics workspace linked-storage create

Create some linked storage accounts for log analytics workspace.

az monitor log-analytics workspace linked-storage delete

Delete all linked storage accounts with specific data source type for log analytics workspace.

az monitor log-analytics workspace linked-storage list

List all linked storage accounts for a log analytics workspace.

az monitor log-analytics workspace linked-storage remove

Remove some linked storage accounts with specific data source type for log analytics workspace.

az monitor log-analytics workspace linked-storage show

List all linked storage accounts with specific data source type for a log analytics workspace.

az monitor log-analytics workspace linked-storage add

Add some linked storage accounts with specific data source type for log analytics workspace.

az monitor log-analytics workspace linked-storage add --resource-group
                                                      --storage-accounts
                                                      --type {AzureWatson, CustomLogs}
                                                      --workspace-name
                                                      [--subscription]

Examples

Add two linked storage accounts for a log analytics workspace using the name of the storage account.

az monitor log-analytics workspace linked-storage add --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts StorageAccount1 StorageAccount2

Add one linked storage accounts for a log analytics workspace using the resource id of the storage account.

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

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--storage-accounts

List of Name or ID of Azure Storage Account.

--type

Data source type for the linked storage account.

accepted values: AzureWatson, CustomLogs
--workspace-name -n

Name of the Log Analytics Workspace.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az monitor log-analytics workspace linked-storage create

Create some linked storage accounts for log analytics workspace.

az monitor log-analytics workspace linked-storage create --resource-group
                                                         --type {AzureWatson, CustomLogs}
                                                         --workspace-name
                                                         [--storage-accounts]
                                                         [--subscription]

Examples

Create two linked storage accounts for a log analytics workspace using the name of the storage account.

az monitor log-analytics workspace linked-storage create --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts StorageAccount1 StorageAccount2

Create one linked storage accounts for a log analytics workspace using the resource id of the storage account.

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

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--type

Data source type for the linked storage account.

accepted values: AzureWatson, CustomLogs
--workspace-name -n

Name of the Log Analytics Workspace.

Optional Parameters

--storage-accounts

List of Name or ID of Azure Storage Account.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az monitor log-analytics workspace linked-storage delete

Delete all linked storage accounts with specific data source type for log analytics workspace.

az monitor log-analytics workspace linked-storage delete --resource-group
                                                         --type {AzureWatson, CustomLogs}
                                                         --workspace-name
                                                         [--subscription]
                                                         [--yes]

Examples

Delete all linked storage accounts with a specific type for a log analytics workspace

az monitor log-analytics workspace linked-storage delete --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--type

Data source type for the linked storage account.

accepted values: AzureWatson, CustomLogs
--workspace-name -n

Name of the Log Analytics Workspace.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az monitor log-analytics workspace linked-storage list

List all linked storage accounts for a log analytics workspace.

az monitor log-analytics workspace linked-storage list --resource-group
                                                       --workspace-name
                                                       [--query-examples]
                                                       [--subscription]

Examples

List all linked storage accounts for a log analytics workspace

az monitor log-analytics workspace linked-storage list -g MyResourceGroup --workspace-name MyWorkspace

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--workspace-name -n

Name of the Log Analytics Workspace.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az monitor log-analytics workspace linked-storage remove

Remove some linked storage accounts with specific data source type for log analytics workspace.

az monitor log-analytics workspace linked-storage remove --resource-group
                                                         --storage-accounts
                                                         --type {AzureWatson, CustomLogs}
                                                         --workspace-name
                                                         [--subscription]

Examples

Remove two linked storage accounts for a log analytics workspace using the name of the storage account.

az monitor log-analytics workspace linked-storage remove --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace --storage-accounts StorageAccount1 StorageAccount2

Remove one linked storage accounts for a log analytics workspace using the resource id of the storage account.

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

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--storage-accounts

List of Name or ID of Azure Storage Account.

--type

Data source type for the linked storage account.

accepted values: AzureWatson, CustomLogs
--workspace-name -n

Name of the Log Analytics Workspace.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az monitor log-analytics workspace linked-storage show

List all linked storage accounts with specific data source type for a log analytics workspace.

az monitor log-analytics workspace linked-storage show --resource-group
                                                       --type {AzureWatson, CustomLogs}
                                                       --workspace-name
                                                       [--query-examples]
                                                       [--subscription]

Examples

Show all linked storage accounts with a specific type for a log analytics workspace

az monitor log-analytics workspace linked-storage show --type AzureWatson -g MyResourceGroup --workspace-name MyWorkspace

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--type

Data source type for the linked storage account.

accepted values: AzureWatson, CustomLogs
--workspace-name -n

Name of the Log Analytics Workspace.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.