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

The following fields are returned by SELECT queries:

OK response definition.

NameDatatypeDescription
etagstringThe ETag of the data source.
kindstringThe kind of the DataSource.
propertiesobjectThe data source properties in raw json format, each kind of data source have it's own schema.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, workspaceName, dataSourceName, subscriptionIdGets a datasource instance.
list_by_workspaceselectresourceGroupName, workspaceName, $filter, subscriptionId$skiptokenGets the first page of data source instances in a workspace with the link to the next page.
create_or_updateinsertresourceGroupName, workspaceName, dataSourceName, subscriptionId, data__kind, data__propertiesCreate or update a data source.
deletedeleteresourceGroupName, workspaceName, dataSourceName, subscriptionIdDeletes a data source instance.

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
$filterstringThe filter to apply on the operation.
dataSourceNamestringName of the datasource.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
workspaceNamestringThe name of the workspace.
$skiptokenstringStarting point of the collection of data source instances.

SELECT examples

Gets a datasource instance.

SELECT
etag,
kind,
properties,
tags
FROM azure.log_analytics.data_sources
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND workspaceName = '{{ workspaceName }}' -- required
AND dataSourceName = '{{ dataSourceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create or update a data source.

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

DELETE examples

Deletes a data source instance.

DELETE FROM azure.log_analytics.data_sources
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND workspaceName = '{{ workspaceName }}' --required
AND dataSourceName = '{{ dataSourceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;