Skip to main content

event_sources

Creates, updates, deletes, gets or lists an event_sources resource.

Overview

Nameevent_sources
TypeResource
Idazure.time_series_insights.event_sources

Fields

The following fields are returned by SELECT queries:

The event source definition was successfully retrieved and is in the response.

NameDatatypeDescription
kindstringThe kind of the event source.
locationstringThe geo-location where the resource lives
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, environmentName, eventSourceNameGets the event source with the specified name in the specified environment.
list_by_environmentselectsubscriptionId, resourceGroupName, environmentNameLists all the available event sources associated with the subscription and within the specified resource group and environment.
create_or_updateinsertsubscriptionId, resourceGroupName, environmentName, eventSourceName, data__kindCreate or update an event source under the specified environment.
updateupdatesubscriptionId, resourceGroupName, environmentName, eventSourceName, data__kindUpdates the event source with the specified name in the specified subscription, resource group, and environment.
deletedeletesubscriptionId, resourceGroupName, environmentName, eventSourceNameDeletes the event source with the specified name in the specified subscription, resource group, and environment

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
environmentNamestringThe name of the Time Series Insights environment associated with the specified resource group.
eventSourceNamestringThe name of the Time Series Insights event source associated with the specified environment.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Gets the event source with the specified name in the specified environment.

SELECT
kind,
location,
tags
FROM azure.time_series_insights.event_sources
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND environmentName = '{{ environmentName }}' -- required
AND eventSourceName = '{{ eventSourceName }}' -- required
;

INSERT examples

Create or update an event source under the specified environment.

INSERT INTO azure.time_series_insights.event_sources (
data__kind,
data__localTimestamp,
data__location,
data__tags,
subscriptionId,
resourceGroupName,
environmentName,
eventSourceName
)
SELECT
'{{ kind }}' /* required */,
'{{ localTimestamp }}',
'{{ location }}',
'{{ tags }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ environmentName }}',
'{{ eventSourceName }}'
RETURNING
kind,
location,
tags
;

UPDATE examples

Updates the event source with the specified name in the specified subscription, resource group, and environment.

UPDATE azure.time_series_insights.event_sources
SET
data__kind = '{{ kind }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND environmentName = '{{ environmentName }}' --required
AND eventSourceName = '{{ eventSourceName }}' --required
AND data__kind = '{{ kind }}' --required
RETURNING
kind,
location,
tags;

DELETE examples

Deletes the event source with the specified name in the specified subscription, resource group, and environment

DELETE FROM azure.time_series_insights.event_sources
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND environmentName = '{{ environmentName }}' --required
AND eventSourceName = '{{ eventSourceName }}' --required
;