linked_storage_accounts
Creates, updates, deletes, gets or lists a linked_storage_accounts resource.
Overview
| Name | linked_storage_accounts |
| Type | Resource |
| Id | azure.log_analytics.linked_storage_accounts |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_workspace
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
dataSourceType | string | Linked storage accounts type. Known values are: "CustomLogs", "AzureWatson", "Query", "Ingestion", and "Alerts". (CustomLogs, AzureWatson, Query, Ingestion, Alerts) |
storageAccountIds | array | Linked storage accounts resources ids. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
dataSourceType | string | Linked storage accounts type. Known values are: "CustomLogs", "AzureWatson", "Query", "Ingestion", and "Alerts". (CustomLogs, AzureWatson, Query, Ingestion, Alerts) |
storageAccountIds | array | Linked storage accounts resources ids. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, workspace_name, data_source_type, subscription_id | Gets all linked storage account of a specific data source type associated with the specified workspace. | |
list_by_workspace | select | resource_group_name, workspace_name, subscription_id | Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type. | |
create_or_update | insert | resource_group_name, workspace_name, data_source_type, subscription_id, properties | Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. | |
create_or_update | replace | resource_group_name, workspace_name, data_source_type, subscription_id, properties | Create or Update a link relation between current workspace and a group of storage accounts of a specific data source type. | |
delete | delete | resource_group_name, workspace_name, data_source_type, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
data_source_type | string | Linked storage accounts type. Known values are: "CustomLogs", "AzureWatson", "Query", "Ingestion", and "Alerts". Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
workspace_name | string | The name of the workspace. Required. |
SELECT examples
- get
- list_by_workspace
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
;
Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: linked_storage_accounts
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the linked_storage_accounts resource.
- name: workspace_name
value: "{{ workspace_name }}"
description: Required parameter for the linked_storage_accounts resource.
- name: data_source_type
value: "{{ data_source_type }}"
description: Required parameter for the linked_storage_accounts resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the linked_storage_accounts resource.
- name: properties
description: |
Linked storage accounts properties. Required.
value:
dataSourceType: "{{ dataSourceType }}"
storageAccountIds:
- "{{ storageAccountIds }}"
REPLACE examples
- create_or_update
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
- delete
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
;