Skip to main content

data_sources

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

Overview

Namedata_sources
TypeResource
Idazure.log_analytics.data_sources

Fields

NameDatatypeDescription
$filtertextfield from the properties object
dataSourceNametextfield from the properties object
etagtextThe ETag of the data source.
kindtextThe kind of the DataSource.
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
workspaceNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdataSourceName, resourceGroupName, subscriptionId, workspaceNameGets a datasource instance.
list_by_workspaceSELECT$filter, resourceGroupName, subscriptionId, workspaceNameGets the first page of data source instances in a workspace with the link to the next page.
create_or_updateINSERTdataSourceName, resourceGroupName, subscriptionId, workspaceName, data__kind, data__propertiesCreate or update a data source.
deleteDELETEdataSourceName, resourceGroupName, subscriptionId, workspaceNameDeletes a data source instance.

SELECT examples

Gets the first page of data source instances in a workspace with the link to the next page.

SELECT
$filter,
dataSourceName,
etag,
kind,
resourceGroupName,
subscriptionId,
tags,
workspaceName
FROM azure.log_analytics.vw_data_sources
WHERE $filter = '{{ $filter }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';

INSERT example

Use the following StackQL query and manifest file to create a new data_sources resource.

/*+ create */
INSERT INTO azure.log_analytics.data_sources (
dataSourceName,
resourceGroupName,
subscriptionId,
workspaceName,
data__kind,
data__properties,
properties,
etag,
kind,
tags
)
SELECT
'{{ dataSourceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ workspaceName }}',
'{{ data__kind }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ etag }}',
'{{ kind }}',
'{{ tags }}'
;

DELETE example

Deletes the specified data_sources resource.

/*+ delete */
DELETE FROM azure.log_analytics.data_sources
WHERE dataSourceName = '{{ dataSourceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND workspaceName = '{{ workspaceName }}';