Skip to main content

linked_storage_accounts

Creates, updates, deletes, gets or lists a linked_storage_accounts resource.

Overview

Namelinked_storage_accounts
TypeResource
Idazure.log_analytics.linked_storage_accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
dataSourceTypestringLinked storage accounts type. Known values are: "CustomLogs", "AzureWatson", "Query", "Ingestion", and "Alerts". (CustomLogs, AzureWatson, Query, Ingestion, Alerts)
storageAccountIdsarrayLinked storage accounts resources ids.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, workspace_name, data_source_type, subscription_idGets all linked storage account of a specific data source type associated with the specified workspace.
list_by_workspaceselectresource_group_name, workspace_name, subscription_idGets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type.
create_or_updateinsertresource_group_name, workspace_name, data_source_type, subscription_id, propertiesCreate or Update a link relation between current workspace and a group of storage accounts of a specific data source type.
create_or_updatereplaceresource_group_name, workspace_name, data_source_type, subscription_id, propertiesCreate or Update a link relation between current workspace and a group of storage accounts of a specific data source type.
deletedeleteresource_group_name, workspace_name, data_source_type, subscription_idDeletes all linked storage accounts of a specific data source type associated with the specified workspace.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
data_source_typestringLinked storage accounts type. Known values are: "CustomLogs", "AzureWatson", "Query", "Ingestion", and "Alerts". Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
workspace_namestringThe name of the workspace. Required.

SELECT examples

Gets all linked storage account of a specific data source type associated with the specified workspace.

SELECT
id,
name,
dataSourceType,
storageAccountIds,
systemData,
type
FROM azure.log_analytics.linked_storage_accounts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND data_source_type = '{{ data_source_type }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type.

INSERT INTO azure.log_analytics.linked_storage_accounts (
properties,
resource_group_name,
workspace_name,
data_source_type,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ workspace_name }}',
'{{ data_source_type }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type.

REPLACE azure.log_analytics.linked_storage_accounts
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND data_source_type = '{{ data_source_type }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes all linked storage accounts of a specific data source type associated with the specified workspace.

DELETE FROM azure.log_analytics.linked_storage_accounts
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND workspace_name = '{{ workspace_name }}' --required
AND data_source_type = '{{ data_source_type }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;