Microsoft.StreamAnalytics streamingjobs/inputs 2016-03-01

Template format

To create a Microsoft.StreamAnalytics/streamingjobs/inputs resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "apiVersion": "2016-03-01",
  "properties": {
    "type": "string",
    "datasource": {
      "type": "string",
      "properties": {
      }
    },
    "serialization": {
      "type": "string",
      "properties": {
      }
    }
  }
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.StreamAnalytics/streamingjobs/inputs object

Name Type Required Value
name string Yes The name of the input.
type enum Yes inputs
-or-
Microsoft.StreamAnalytics/streamingjobs/inputs

See Set name and type for child resources.
apiVersion enum Yes 2016-03-01
properties object Yes The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - InputProperties object

InputProperties object

Name Type Required Value
type enum No Stream or Reference
datasource object No StreamInputDataSource or ReferenceInputDataSource
serialization object No Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Serialization object

StreamInputDataSource

Name Type Required Value
type enum No Microsoft.Storage/Blob, Microsoft.ServiceBus/EventHub, Microsoft.Devices/IotHubs
properties object No The properties associated with the object. See StreamInputDataSourceProperties.

ReferenceInputDataSource

Name Type Required Value
type enum No Microsoft.Storage/Blob
properties object No The properties associated with the object. See ReferenceInputDataSourceProperties.

Serialization object

Name Type Required Value
type enum No Csv, Json, Avro
properties object No The properties associated with the object. - SerializationProperties

StreamInputDataSourceProperties

The values you provide for the properties vary by object type. The available types are:

Microsoft.Storage/Blob

"datasource": {
    "type": "Microsoft.Storage/Blob",
    "properties": {
        "storageAccounts": [
            {
                "accountName": "string",
                "accountKey": "string"    
            }
        ],
        "container": "string",
        "pathPattern": "string",
        "dateFormat": "string",
        "timeFormat": "string",
        "sourcePartitionCount": integer
    }
}
Name Type Required Value
storageAccounts array No A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests - storageAccounts
container string No The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
pathPattern string No The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
dateFormat string No The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
timeFormat string No The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.
sourcePartitionCount integer No The partition count of the blob input data source. Range 1 - 256.

storageAccounts

Name Type Required Value
accountName string No The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.

Microsoft.ServiceBus/EventHub

"datasource": {
    "type": "Microsoft.ServiceBus/EventHub",
    "properties": {
        "serviceBusNamespace": "string",
        "sharedAccessPolicyName": "string",
        "sharedAccessPolicyKey": "string",
        "eventHubName": "string",
        "consumerGroupName": "string"
    }
}
Name Type Required Value
serviceBusNamespace string No The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyName string No The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyKey string No The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.
eventHubName string No The name of the Event Hub. Required on PUT (CreateOrReplace) requests.
consumerGroupName string No The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group.

Microsoft.Devices/IotHubs

"datasource": {
    "type": "Microsoft.Devices/IotHubs",
    "properties": {
        "iotHubNamespace": "string",
        "sharedAccessPolicyName": "string",
        "sharedAccessPolicyKey": "string",
        "consumerGroupName": "string",
        "endpoint": "string"
    }
}
Name Type Required Value
iotHubNamespace string No The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyName string No The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required on PUT (CreateOrReplace) requests.
sharedAccessPolicyKey string No The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.
consumerGroupName string No The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input uses the Iot Hub's default consumer group.
endpoint string No The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.).

ReferenceInputDataSourceProperties

The values you provide for the properties vary by object type. The available types are:

Microsoft.Storage/Blob

"datasource": {
    "type": "Microsoft.Storage/Blob",
    "properties": {
        "storageAccounts": [
            {
                "accountName": "string",
                "accountKey": "string"    
            }
        ],
        "container": "string",
        "pathPattern": "string",
        "dateFormat": "string",
        "timeFormat": "string"
    }
}
Name Type Required Value
storageAccounts array No A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests - storageAccounts
container string No The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.
pathPattern string No The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.
dateFormat string No The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.
timeFormat string No The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.

storageAccounts

Name Type Required Value
accountName string No The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.
accountKey string No The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.

SerializationProperties

The values you provide for the properties vary by object type. The available types are:

Csv

"serialization": {
    "type": "Csv",
    "properties": {
        "fieldDelimiter": "string",
        "encoding": "UTF8"
    }
}
Name Type Required Value
fieldDelimiter string No Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.
encoding enum No Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests. - UTF8

Json

"serialization": {
    "type": "Json",
    "properties": {
        "encoding": "UTF8",
        "format": "string"
    }
}
Name Type Required Value
encoding enum No Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests. - UTF8
format enum No Specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects - LineSeparated, Array

Avro

"serialization": {
    "type": "Avro",
    "properties": {
        "encoding": "UTF8"
    }
}
Name Type Required Value
encoding enum No Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests. - UTF8

CompressionProperties

The values you provide for the properties vary by object type. Currently, none of the supported compression types require additional properties. The available types are:

None

"compression": { 
  "type": "None", 
  "properties": { 
  } 
}
Name Type Required Value
Event compression type String No The compression type used to read the incoming data stream, such as None (default).

GZip

"compression": { 
  "type": "GZip", 
  "properties": { 
  } 
}
Name Type Required Value
Event compression type String No The compression type used to read the incoming data stream, such as GZip.

Deflate

"compression": { 
  "type": "Deflate", 
  "properties": { 
  } 
}
Name Type Required Value
Event compression type String No The compression type used to read the incoming data stream, such as Deflate.