event_sources
Creates, updates, deletes, gets or lists an event_sources resource.
Overview
| Name | event_sources |
| Type | Resource |
| Id | azure_extras.time_series_insights.event_sources |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_environment
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
kind | string | The kind of the event source. Required. Known values are: "Microsoft.EventHub" and "Microsoft.IoTHub". |
location | string | Resource location. Required. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
value | array | Result of the List EventSources operation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, environment_name, event_source_name, subscription_id | Gets the event source with the specified name in the specified environment. | |
list_by_environment | select | resource_group_name, environment_name, subscription_id | Lists all the available event sources associated with the subscription and within the specified resource group and environment. | |
create_or_update | insert | resource_group_name, environment_name, event_source_name, subscription_id, location, kind | Create or update an event source under the specified environment. | |
update | update | resource_group_name, environment_name, event_source_name, subscription_id, kind | Updates the event source with the specified name in the specified subscription, resource group, and environment. | |
create_or_update | replace | resource_group_name, environment_name, event_source_name, subscription_id, location, kind | Create or update an event source under the specified environment. | |
delete | delete | resource_group_name, environment_name, event_source_name, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
environment_name | string | The name of the Time Series Insights environment associated with the specified resource group. Required. |
event_source_name | string | The name of the Time Series Insights event source associated with the specified environment. Required. |
resource_group_name | string | Name of an Azure Resource group. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_environment
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
;
Lists all the available event sources associated with the subscription and within the specified resource group and environment.
SELECT
value
FROM azure_extras.time_series_insights.event_sources
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND environment_name = '{{ environment_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: event_sources
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the event_sources resource.
- name: environment_name
value: "{{ environment_name }}"
description: Required parameter for the event_sources resource.
- name: event_source_name
value: "{{ event_source_name }}"
description: Required parameter for the event_sources resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the event_sources resource.
- name: location
value: "{{ location }}"
description: |
The location of the resource. Required.
- name: tags
value: "{{ tags }}"
description: |
Key-value pairs of additional properties for the resource.
- name: kind
value: "{{ kind }}"
description: |
The kind of the event source. Required. Known values are: "Microsoft.EventHub" and "Microsoft.IoTHub".
- name: localTimestamp
description: |
An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used and the corresponding timezone offset information. If a value isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed with the events.
value:
format: "{{ format }}"
timeZoneOffset:
propertyName: "{{ propertyName }}"
UPDATE examples
- update
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
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
- delete
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
;