data_sources
Creates, updates, deletes, gets or lists a data_sources
resource.
Overview
Name | data_sources |
Type | Resource |
Id | azure.log_analytics.data_sources |
Fields
- vw_data_sources
- data_sources
Name | Datatype | Description |
---|---|---|
$filter | text | field from the properties object |
dataSourceName | text | field from the properties object |
etag | text | The ETag of the data source. |
kind | text | The kind of the DataSource. |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
workspaceName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
etag | string | The ETag of the data source. |
kind | string | The kind of the DataSource. |
properties | object | JSON object |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | dataSourceName, resourceGroupName, subscriptionId, workspaceName | Gets a datasource instance. |
list_by_workspace | SELECT | $filter, resourceGroupName, subscriptionId, workspaceName | Gets the first page of data source instances in a workspace with the link to the next page. |
create_or_update | INSERT | dataSourceName, resourceGroupName, subscriptionId, workspaceName, data__kind, data__properties | Create or update a data source. |
delete | DELETE | dataSourceName, resourceGroupName, subscriptionId, workspaceName | Deletes a data source instance. |
SELECT
examples
Gets the first page of data source instances in a workspace with the link to the next page.
- vw_data_sources
- data_sources
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 }}';
SELECT
etag,
kind,
properties,
tags
FROM azure.log_analytics.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: properties
value: []
- name: etag
value: string
- name: kind
value: []
- name: tags
value: object
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 }}';