Skip to main content

event_sources

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

Overview

Nameevent_sources
TypeResource
Idazure_extras.time_series_insights.event_sources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
kindstringThe kind of the event source. Required. Known values are: "Microsoft.EventHub" and "Microsoft.IoTHub".
locationstringResource location. Required.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, environment_name, event_source_name, subscription_idGets the event source with the specified name in the specified environment.
list_by_environmentselectresource_group_name, environment_name, subscription_idLists all the available event sources associated with the subscription and within the specified resource group and environment.
create_or_updateinsertresource_group_name, environment_name, event_source_name, subscription_id, location, kindCreate or update an event source under the specified environment.
updateupdateresource_group_name, environment_name, event_source_name, subscription_id, kindUpdates the event source with the specified name in the specified subscription, resource group, and environment.
create_or_updatereplaceresource_group_name, environment_name, event_source_name, subscription_id, location, kindCreate or update an event source under the specified environment.
deletedeleteresource_group_name, environment_name, event_source_name, subscription_idDeletes 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
environment_namestringThe name of the Time Series Insights environment associated with the specified resource group. Required.
event_source_namestringThe name of the Time Series Insights event source associated with the specified environment. Required.
resource_group_namestringName of an Azure Resource group. Required.
subscription_idstring

SELECT examples

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

SELECT
id,
name,
kind,
location,
tags,
type
FROM azure_extras.time_series_insights.event_sources
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND event_source_name = '{{ event_source_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update an event source under the specified environment.

INSERT INTO azure_extras.time_series_insights.event_sources (
location,
tags,
kind,
localTimestamp,
resource_group_name,
environment_name,
event_source_name,
subscription_id
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ kind }}' /* required */,
'{{ localTimestamp }}',
'{{ resource_group_name }}',
'{{ environment_name }}',
'{{ event_source_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
kind,
location,
tags,
type
;

UPDATE examples

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

UPDATE azure_extras.time_series_insights.event_sources
SET
kind = '{{ kind }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND environment_name = '{{ environment_name }}' --required
AND event_source_name = '{{ event_source_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND kind = '{{ kind }}' --required
RETURNING
id,
name,
kind,
location,
tags,
type;

REPLACE examples

Create or update an event source under the specified environment.

REPLACE azure_extras.time_series_insights.event_sources
SET
location = '{{ location }}',
tags = '{{ tags }}',
kind = '{{ kind }}',
localTimestamp = '{{ localTimestamp }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND environment_name = '{{ environment_name }}' --required
AND event_source_name = '{{ event_source_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
AND kind = '{{ kind }}' --required
RETURNING
id,
name,
kind,
location,
tags,
type;

DELETE examples

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

DELETE FROM azure_extras.time_series_insights.event_sources
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND environment_name = '{{ environment_name }}' --required
AND event_source_name = '{{ event_source_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;