Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az monitor log-analytics workspace linked-storage

Manage linked storage account for log analytics workspace.

Commands

Name Description Type Status
az monitor log-analytics workspace linked-storage add

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

Core GA
az monitor log-analytics workspace linked-storage create

Create some linked storage accounts for log analytics workspace.

Core GA
az monitor log-analytics workspace linked-storage delete

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

Core GA
az monitor log-analytics workspace linked-storage list

List all linked storage accounts for a log analytics workspace.

Core GA
az monitor log-analytics workspace linked-storage remove

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

Core GA
az monitor log-analytics workspace linked-storage show

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

Core GA

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 {Alerts, AzureWatson, CustomLogs, Ingestion, Query}
 --workspace-name
 [--acquire-policy-token]
 [--change-reference]

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.

Property Value
Accepted values: Alerts, AzureWatson, CustomLogs, Ingestion, Query
--workspace-name -n

Name of the Log Analytics Workspace.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments

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 --data-source-type --type {Alerts, AzureWatson, CustomLogs, Ingestion, Query}
 --resource-group
 --storage-accounts
 --workspace-name
 [--acquire-policy-token]
 [--change-reference]

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

--data-source-type --type

Data source type for the linked storage account.

Property Value
Accepted values: Alerts, AzureWatson, CustomLogs, Ingestion, Query
--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. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--workspace-name -n

The name of the workspace.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments

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 [--acquire-policy-token]
 [--change-reference]
 [--data-source-type --type {Alerts, AzureWatson, CustomLogs, Ingestion, Query}]
 [--ids]
 [--resource-group]
 [--subscription]
 [--workspace-name]
 [--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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--data-source-type --type

Data source type for the linked storage account.

Property Value
Parameter group: Resource Id Arguments
Accepted values: Alerts, AzureWatson, CustomLogs, Ingestion, Query
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--workspace-name -n

The name of the workspace.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False

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

Examples

List all linked storage accounts for a log analytics workspace.

az monitor log-analytics workspace linked-storage list --resource-group 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

The name of the 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 remove --resource-group
 --storage-accounts
 --type {Alerts, AzureWatson, CustomLogs, Ingestion, Query}
 --workspace-name
 [--acquire-policy-token]
 [--change-reference]

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.

Property Value
Accepted values: Alerts, AzureWatson, CustomLogs, Ingestion, Query
--workspace-name -n

Name of the Log Analytics Workspace.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments

az monitor log-analytics workspace linked-storage show

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

az monitor log-analytics workspace linked-storage show [--data-source-type --type {Alerts, AzureWatson, CustomLogs, Ingestion, Query}]
 [--ids]
 [--resource-group]
 [--subscription]
 [--workspace-name]

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--data-source-type --type

Data source type for the linked storage account.

Property Value
Parameter group: Resource Id Arguments
Accepted values: Alerts, AzureWatson, CustomLogs, Ingestion, Query
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--workspace-name -n

The name of the workspace.

Property Value
Parameter group: Resource Id Arguments

Feedback

Was this page helpful?