Microsoft.TimeSeriesInsights environments/eventSources

Bicep resource definition

The environments/eventSources resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.TimeSeriesInsights/environments/eventSources resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.TimeSeriesInsights/environments/eventSources@2021-06-30-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  kind: 'string'
  parent: resourceSymbolicName
  localTimestamp: {
    format: 'Embedded'
    timeZoneOffset: {
      propertyName: 'string'
    }
  }
  // For remaining properties, see environments/eventSources objects
}

environments/eventSources objects

Set the kind property to specify the type of object.

For Microsoft.EventHub, use:

  kind: 'Microsoft.EventHub'
  properties: {
    consumerGroupName: 'string'
    eventHubName: 'string'
    eventSourceResourceId: 'string'
    ingressStartAt: {
      time: 'string'
      type: 'string'
    }
    keyName: 'string'
    localTimestamp: {
      format: 'Embedded'
      timeZoneOffset: {
        propertyName: 'string'
      }
    }
    serviceBusNamespace: 'string'
    sharedAccessKey: 'string'
    timestampPropertyName: 'string'
  }

For Microsoft.IoTHub, use:

  kind: 'Microsoft.IoTHub'
  properties: {
    consumerGroupName: 'string'
    eventSourceResourceId: 'string'
    ingressStartAt: {
      time: 'string'
      type: 'string'
    }
    iotHubName: 'string'
    keyName: 'string'
    localTimestamp: {
      format: 'Embedded'
      timeZoneOffset: {
        propertyName: 'string'
      }
    }
    sharedAccessKey: 'string'
    timestampPropertyName: 'string'
  }

Property values

environments/eventSources

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
string (required)

Character limit: 1-90

Valid characters:
Can't use:
'<>%&:\?/# or control characters
location The location of the resource. string (required)
tags Key-value pairs of additional properties for the resource. Dictionary of tag names and values. See Tags in templates
kind Set the object type Microsoft.EventHub
Microsoft.IoTHub (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: environments
localTimestamp 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. LocalTimestamp

EventHubEventSourceCreateOrUpdateParametersOrEventHu...

Name Description Value
kind The kind of the event source. 'Microsoft.EventHub' (required)
properties Properties of the EventHub event source that are required on create or update requests. EventHubEventSourceCreationPropertiesOrEventHubEvent... (required)

EventHubEventSourceCreationPropertiesOrEventHubEvent...

Name Description Value
consumerGroupName The name of the event hub's consumer group that holds the partitions from which events will be read. string (required)
eventHubName The name of the event hub. string (required)
eventSourceResourceId The resource id of the event source in Azure Resource Manager. string (required)
ingressStartAt An object that contains the details about the starting point in time to ingest events. IngressStartAtProperties
keyName The name of the SAS key that grants the Time Series Insights service access to the event hub. The shared access policies for this key must grant 'Listen' permissions to the event hub. string (required)
localTimestamp 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. LocalTimestamp
serviceBusNamespace The name of the service bus that contains the event hub. string (required)
sharedAccessKey The value of the shared access key that grants the Time Series Insights service read access to the event hub. This property is not shown in event source responses. string (required)
timestampPropertyName The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. string

IngressStartAtProperties

Name Description Value
time ISO8601 UTC datetime with seconds precision (milliseconds are optional), specifying the date and time that will be the starting point for Events to be consumed. string
type The type of the ingressStartAt, It can be "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". 'CustomEnqueuedTime'
'EarliestAvailable'
'EventSourceCreationTime'

LocalTimestamp

Name Description Value
format An enum that represents the format of the local timestamp property that needs to be set. 'Embedded'
timeZoneOffset An object that represents the offset information for the local timestamp format specified. Should not be specified for LocalTimestampFormat - Embedded. LocalTimestampTimeZoneOffset

LocalTimestampTimeZoneOffset

Name Description Value
propertyName The event property that will be contain the offset information to calculate the local timestamp. When the LocalTimestampFormat is Iana, the property name will contain the name of the column which contains IANA Timezone Name (eg: Americas/Los Angeles). When LocalTimestampFormat is Timespan, it contains the name of property which contains values representing the offset (eg: P1D or 1.00:00:00) string

IoTHubEventSourceCreateOrUpdateParametersOrIoTHubEve...

Name Description Value
kind The kind of the event source. 'Microsoft.IoTHub' (required)
properties Properties of the IoTHub event source that are required on create or update requests. IoTHubEventSourceCreationPropertiesOrIoTHubEventSour... (required)

IoTHubEventSourceCreationPropertiesOrIoTHubEventSour...

Name Description Value
consumerGroupName The name of the iot hub's consumer group that holds the partitions from which events will be read. string (required)
eventSourceResourceId The resource id of the event source in Azure Resource Manager. string (required)
ingressStartAt An object that contains the details about the starting point in time to ingest events. IngressStartAtProperties
iotHubName The name of the iot hub. string (required)
keyName The name of the Shared Access Policy key that grants the Time Series Insights service access to the iot hub. This shared access policy key must grant 'service connect' permissions to the iot hub. string (required)
localTimestamp 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. LocalTimestamp
sharedAccessKey The value of the Shared Access Policy key that grants the Time Series Insights service read access to the iot hub. This property is not shown in event source responses. string (required)
timestampPropertyName The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create a Pay As You Go (PAYG) Environment with an IoT Hub

Deploy to Azure
This template enables you to deploy a Pay As You Go (PAYG) Time Series Insights environment that is configured to consume events from an IoT Hub.
Create an Environment with an Event Hub Event Source

Deploy to Azure
This template enables you to deploy a Time Series Insights environment that is configured to consume events from an Event Hub.

ARM template resource definition

The environments/eventSources resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.TimeSeriesInsights/environments/eventSources resource, add the following JSON to your template.

{
  "type": "Microsoft.TimeSeriesInsights/environments/eventSources",
  "apiVersion": "2021-06-30-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "kind": "string",
  "localTimestamp": {
    "format": "Embedded",
    "timeZoneOffset": {
      "propertyName": "string"
    }
  },
  // For remaining properties, see environments/eventSources objects
}

environments/eventSources objects

Set the kind property to specify the type of object.

For Microsoft.EventHub, use:

  "kind": "Microsoft.EventHub",
  "properties": {
    "consumerGroupName": "string",
    "eventHubName": "string",
    "eventSourceResourceId": "string",
    "ingressStartAt": {
      "time": "string",
      "type": "string"
    },
    "keyName": "string",
    "localTimestamp": {
      "format": "Embedded",
      "timeZoneOffset": {
        "propertyName": "string"
      }
    },
    "serviceBusNamespace": "string",
    "sharedAccessKey": "string",
    "timestampPropertyName": "string"
  }

For Microsoft.IoTHub, use:

  "kind": "Microsoft.IoTHub",
  "properties": {
    "consumerGroupName": "string",
    "eventSourceResourceId": "string",
    "ingressStartAt": {
      "time": "string",
      "type": "string"
    },
    "iotHubName": "string",
    "keyName": "string",
    "localTimestamp": {
      "format": "Embedded",
      "timeZoneOffset": {
        "propertyName": "string"
      }
    },
    "sharedAccessKey": "string",
    "timestampPropertyName": "string"
  }

Property values

environments/eventSources

Name Description Value
type The resource type 'Microsoft.TimeSeriesInsights/environments/eventSources'
apiVersion The resource api version '2021-06-30-preview'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)

Character limit: 1-90

Valid characters:
Can't use:
'<>%&:\?/# or control characters
location The location of the resource. string (required)
tags Key-value pairs of additional properties for the resource. Dictionary of tag names and values. See Tags in templates
kind Set the object type Microsoft.EventHub
Microsoft.IoTHub (required)
localTimestamp 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. LocalTimestamp

EventHubEventSourceCreateOrUpdateParametersOrEventHu...

Name Description Value
kind The kind of the event source. 'Microsoft.EventHub' (required)
properties Properties of the EventHub event source that are required on create or update requests. EventHubEventSourceCreationPropertiesOrEventHubEvent... (required)

EventHubEventSourceCreationPropertiesOrEventHubEvent...

Name Description Value
consumerGroupName The name of the event hub's consumer group that holds the partitions from which events will be read. string (required)
eventHubName The name of the event hub. string (required)
eventSourceResourceId The resource id of the event source in Azure Resource Manager. string (required)
ingressStartAt An object that contains the details about the starting point in time to ingest events. IngressStartAtProperties
keyName The name of the SAS key that grants the Time Series Insights service access to the event hub. The shared access policies for this key must grant 'Listen' permissions to the event hub. string (required)
localTimestamp 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. LocalTimestamp
serviceBusNamespace The name of the service bus that contains the event hub. string (required)
sharedAccessKey The value of the shared access key that grants the Time Series Insights service read access to the event hub. This property is not shown in event source responses. string (required)
timestampPropertyName The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. string

IngressStartAtProperties

Name Description Value
time ISO8601 UTC datetime with seconds precision (milliseconds are optional), specifying the date and time that will be the starting point for Events to be consumed. string
type The type of the ingressStartAt, It can be "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". 'CustomEnqueuedTime'
'EarliestAvailable'
'EventSourceCreationTime'

LocalTimestamp

Name Description Value
format An enum that represents the format of the local timestamp property that needs to be set. 'Embedded'
timeZoneOffset An object that represents the offset information for the local timestamp format specified. Should not be specified for LocalTimestampFormat - Embedded. LocalTimestampTimeZoneOffset

LocalTimestampTimeZoneOffset

Name Description Value
propertyName The event property that will be contain the offset information to calculate the local timestamp. When the LocalTimestampFormat is Iana, the property name will contain the name of the column which contains IANA Timezone Name (eg: Americas/Los Angeles). When LocalTimestampFormat is Timespan, it contains the name of property which contains values representing the offset (eg: P1D or 1.00:00:00) string

IoTHubEventSourceCreateOrUpdateParametersOrIoTHubEve...

Name Description Value
kind The kind of the event source. 'Microsoft.IoTHub' (required)
properties Properties of the IoTHub event source that are required on create or update requests. IoTHubEventSourceCreationPropertiesOrIoTHubEventSour... (required)

IoTHubEventSourceCreationPropertiesOrIoTHubEventSour...

Name Description Value
consumerGroupName The name of the iot hub's consumer group that holds the partitions from which events will be read. string (required)
eventSourceResourceId The resource id of the event source in Azure Resource Manager. string (required)
ingressStartAt An object that contains the details about the starting point in time to ingest events. IngressStartAtProperties
iotHubName The name of the iot hub. string (required)
keyName The name of the Shared Access Policy key that grants the Time Series Insights service access to the iot hub. This shared access policy key must grant 'service connect' permissions to the iot hub. string (required)
localTimestamp 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. LocalTimestamp
sharedAccessKey The value of the Shared Access Policy key that grants the Time Series Insights service read access to the iot hub. This property is not shown in event source responses. string (required)
timestampPropertyName The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create a Pay As You Go (PAYG) Environment with an IoT Hub

Deploy to Azure
This template enables you to deploy a Pay As You Go (PAYG) Time Series Insights environment that is configured to consume events from an IoT Hub.
Create an Environment with an Event Hub Event Source

Deploy to Azure
This template enables you to deploy a Time Series Insights environment that is configured to consume events from an Event Hub.

Terraform (AzAPI provider) resource definition

The environments/eventSources resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.TimeSeriesInsights/environments/eventSources resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.TimeSeriesInsights/environments/eventSources@2021-06-30-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  // For remaining properties, see environments/eventSources objects
  body = jsonencode({
    kind = "string"
    localTimestamp = {
      format = "Embedded"
      timeZoneOffset = {
        propertyName = "string"
      }
    }
  })
}

environments/eventSources objects

Set the kind property to specify the type of object.

For Microsoft.EventHub, use:

  kind = "Microsoft.EventHub"
  properties = {
    consumerGroupName = "string"
    eventHubName = "string"
    eventSourceResourceId = "string"
    ingressStartAt = {
      time = "string"
      type = "string"
    }
    keyName = "string"
    localTimestamp = {
      format = "Embedded"
      timeZoneOffset = {
        propertyName = "string"
      }
    }
    serviceBusNamespace = "string"
    sharedAccessKey = "string"
    timestampPropertyName = "string"
  }

For Microsoft.IoTHub, use:

  kind = "Microsoft.IoTHub"
  properties = {
    consumerGroupName = "string"
    eventSourceResourceId = "string"
    ingressStartAt = {
      time = "string"
      type = "string"
    }
    iotHubName = "string"
    keyName = "string"
    localTimestamp = {
      format = "Embedded"
      timeZoneOffset = {
        propertyName = "string"
      }
    }
    sharedAccessKey = "string"
    timestampPropertyName = "string"
  }

Property values

environments/eventSources

Name Description Value
type The resource type "Microsoft.TimeSeriesInsights/environments/eventSources@2021-06-30-preview"
name The resource name string (required)

Character limit: 1-90

Valid characters:
Can't use:
'<>%&:\?/# or control characters
location The location of the resource. string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: environments
tags Key-value pairs of additional properties for the resource. Dictionary of tag names and values.
kind Set the object type Microsoft.EventHub
Microsoft.IoTHub (required)
localTimestamp 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. LocalTimestamp

EventHubEventSourceCreateOrUpdateParametersOrEventHu...

Name Description Value
kind The kind of the event source. "Microsoft.EventHub" (required)
properties Properties of the EventHub event source that are required on create or update requests. EventHubEventSourceCreationPropertiesOrEventHubEvent... (required)

EventHubEventSourceCreationPropertiesOrEventHubEvent...

Name Description Value
consumerGroupName The name of the event hub's consumer group that holds the partitions from which events will be read. string (required)
eventHubName The name of the event hub. string (required)
eventSourceResourceId The resource id of the event source in Azure Resource Manager. string (required)
ingressStartAt An object that contains the details about the starting point in time to ingest events. IngressStartAtProperties
keyName The name of the SAS key that grants the Time Series Insights service access to the event hub. The shared access policies for this key must grant 'Listen' permissions to the event hub. string (required)
localTimestamp 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. LocalTimestamp
serviceBusNamespace The name of the service bus that contains the event hub. string (required)
sharedAccessKey The value of the shared access key that grants the Time Series Insights service read access to the event hub. This property is not shown in event source responses. string (required)
timestampPropertyName The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. string

IngressStartAtProperties

Name Description Value
time ISO8601 UTC datetime with seconds precision (milliseconds are optional), specifying the date and time that will be the starting point for Events to be consumed. string
type The type of the ingressStartAt, It can be "EarliestAvailable", "EventSourceCreationTime", "CustomEnqueuedTime". "CustomEnqueuedTime"
"EarliestAvailable"
"EventSourceCreationTime"

LocalTimestamp

Name Description Value
format An enum that represents the format of the local timestamp property that needs to be set. "Embedded"
timeZoneOffset An object that represents the offset information for the local timestamp format specified. Should not be specified for LocalTimestampFormat - Embedded. LocalTimestampTimeZoneOffset

LocalTimestampTimeZoneOffset

Name Description Value
propertyName The event property that will be contain the offset information to calculate the local timestamp. When the LocalTimestampFormat is Iana, the property name will contain the name of the column which contains IANA Timezone Name (eg: Americas/Los Angeles). When LocalTimestampFormat is Timespan, it contains the name of property which contains values representing the offset (eg: P1D or 1.00:00:00) string

IoTHubEventSourceCreateOrUpdateParametersOrIoTHubEve...

Name Description Value
kind The kind of the event source. "Microsoft.IoTHub" (required)
properties Properties of the IoTHub event source that are required on create or update requests. IoTHubEventSourceCreationPropertiesOrIoTHubEventSour... (required)

IoTHubEventSourceCreationPropertiesOrIoTHubEventSour...

Name Description Value
consumerGroupName The name of the iot hub's consumer group that holds the partitions from which events will be read. string (required)
eventSourceResourceId The resource id of the event source in Azure Resource Manager. string (required)
ingressStartAt An object that contains the details about the starting point in time to ingest events. IngressStartAtProperties
iotHubName The name of the iot hub. string (required)
keyName The name of the Shared Access Policy key that grants the Time Series Insights service access to the iot hub. This shared access policy key must grant 'service connect' permissions to the iot hub. string (required)
localTimestamp 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. LocalTimestamp
sharedAccessKey The value of the Shared Access Policy key that grants the Time Series Insights service read access to the iot hub. This property is not shown in event source responses. string (required)
timestampPropertyName The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used. string