Inputs - List By Streaming Job

Lists all of the inputs under the specified streaming job.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs?api-version=2020-03-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs?$select={$select}&api-version=2020-03-01

URI Parameters

Name In Required Type Description
jobName
path True

string

The name of the streaming job.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

$select
query

string

The $select OData query parameter. This is a comma-separated list of structural properties to include in the response, or "" to include all properties. By default, all properties are returned except diagnostics. Currently only accepts '' as a valid value.

Responses

Name Type Description
200 OK

InputListResult

Successfully listed the inputs under the specified streaming job.

Other Status Codes

Error

Error.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

List all inputs in a streaming job
List all inputs in a streaming job and include diagnostic information using the $select OData query parameter

List all inputs in a streaming job

Sample request

GET https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg8440/providers/Microsoft.StreamAnalytics/streamingjobs/sj9597/inputs?api-version=2020-03-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg8440/providers/Microsoft.StreamAnalytics/streamingjobs/sj9597/inputs/input7225",
      "name": "input7225",
      "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
      "properties": {
        "type": "Reference",
        "datasource": {
          "type": "Microsoft.Storage/Blob",
          "properties": {
            "storageAccounts": [
              {
                "accountName": "someAccountName"
              }
            ],
            "container": "differentContainer",
            "pathPattern": "{date}/{time}",
            "dateFormat": "yyyy/MM/dd",
            "timeFormat": "HH"
          }
        },
        "serialization": {
          "type": "Csv",
          "properties": {
            "fieldDelimiter": "|",
            "encoding": "UTF8"
          }
        },
        "etag": "a4ceb697-1c8f-40c8-b951-fb5ee4757437"
      }
    },
    {
      "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg8440/providers/Microsoft.StreamAnalytics/streamingjobs/sj9597/inputs/input8899",
      "name": "input8899",
      "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
      "properties": {
        "type": "Stream",
        "datasource": {
          "type": "Microsoft.Storage/Blob",
          "properties": {
            "sourcePartitionCount": 32,
            "storageAccounts": [
              {
                "accountName": "someAccountName"
              }
            ],
            "container": "state",
            "pathPattern": "{date}/{time}",
            "dateFormat": "yyyy/MM/dd",
            "timeFormat": "HH"
          }
        },
        "serialization": {
          "type": "Csv",
          "properties": {
            "fieldDelimiter": "|",
            "encoding": "UTF8"
          }
        },
        "etag": "3b35d57c-02f4-4b41-8e1d-af02a86c2fa1"
      }
    },
    {
      "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg8440/providers/Microsoft.StreamAnalytics/streamingjobs/sj9597/inputs/input7425",
      "name": "input7425",
      "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
      "properties": {
        "type": "Stream",
        "datasource": {
          "type": "Microsoft.ServiceBus/EventHub",
          "properties": {
            "eventHubName": "sdkeventhub",
            "consumerGroupName": "differentConsumerGroupName",
            "serviceBusNamespace": "sdktest",
            "sharedAccessPolicyName": "RootManageSharedAccessKey"
          }
        },
        "serialization": {
          "type": "Avro",
          "properties": {}
        },
        "etag": "7548f259-81b5-4ea7-b896-25c6717d98ba"
      }
    },
    {
      "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg8440/providers/Microsoft.StreamAnalytics/streamingjobs/sj9597/inputs/input7970",
      "name": "input7970",
      "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
      "properties": {
        "type": "Stream",
        "datasource": {
          "type": "Microsoft.Devices/IotHubs",
          "properties": {
            "iotHubNamespace": "iothub",
            "sharedAccessPolicyName": "owner",
            "endpoint": "messages/operationsMonitoringEvents",
            "consumerGroupName": "sdkconsumergroup"
          }
        },
        "serialization": {
          "type": "Csv",
          "properties": {
            "fieldDelimiter": "|",
            "encoding": "UTF8"
          }
        },
        "etag": "e2d847e0-c95b-48ef-9e14-1afc1f2270cb"
      }
    }
  ]
}

List all inputs in a streaming job and include diagnostic information using the $select OData query parameter

Sample request

GET https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg3276/providers/Microsoft.StreamAnalytics/streamingjobs/sj7804/inputs?$select=*&api-version=2020-03-01

Sample response

{
  "value": [
    {
      "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg3276/providers/Microsoft.StreamAnalytics/streamingjobs/sj7804/inputs/inputtest",
      "name": "inputtest",
      "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
      "properties": {
        "type": "Stream",
        "datasource": {
          "type": "Microsoft.Storage/Blob",
          "properties": {
            "storageAccounts": [
              {
                "accountName": "someAccountName"
              }
            ],
            "container": "state",
            "pathPattern": ""
          }
        },
        "serialization": {
          "type": "Json",
          "properties": {
            "encoding": "UTF8"
          }
        },
        "diagnostics": {
          "conditions": [
            {
              "since": "2017-05-11T04:38:42.4938687Z",
              "code": "INP-3",
              "message": "Could not deserialize the input event as Json. Some possible reasons: 1) Malformed events 2) Input source configured with incorrect serialization format"
            }
          ]
        },
        "etag": "ca88f8fa-605b-4c7f-8695-46f5faa60cd0"
      }
    }
  ]
}

Definitions

Name Description
AuthenticationMode

Authentication Mode. Valid modes are ConnectionString, Msi and 'UserToken'.

AvroSerialization

Describes how data from an input is serialized or how data is serialized when written to an output in Avro format.

AzureSqlReferenceInputDataSource

Describes an Azure SQL database reference input data source.

BlobReferenceInputDataSource

Describes a blob input data source that contains reference data.

BlobStreamInputDataSource

Describes a blob input data source that contains stream data.

Compression

Describes how input data is compressed

CompressionType

Indicates the type of compression that the input uses. Required on PUT (CreateOrReplace) requests.

CsvSerialization

Describes how data from an input is serialized or how data is serialized when written to an output in CSV format.

DiagnosticCondition

Condition applicable to the resource, or to the job overall, that warrant customer attention.

Diagnostics

Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention.

Encoding

Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output.

Error

Common error representation.

EventHubStreamInputDataSource

Describes an Event Hub input data source that contains stream data.

EventHubV2StreamInputDataSource

Describes an Event Hub input data source that contains stream data.

EventSerializationType

Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.

FileReferenceInputDataSource

Describes a file input data source that contains reference data.

GatewayMessageBusStreamInputDataSource

Describes a blob input data source that contains stream data.

Input

An input object, containing all information associated with the named input. All inputs are contained under a streaming job.

InputListResult

Object containing a list of inputs under a streaming job.

IoTHubStreamInputDataSource

Describes an IoT Hub input data source that contains stream data.

JsonOutputSerializationFormat

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.

JsonSerialization

Describes how data from an input is serialized or how data is serialized when written to an output in JSON format.

ParquetSerialization

Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format.

ReferenceInputProperties

The properties that are associated with an input containing reference data.

RefreshType

Indicates the type of data refresh option.

StorageAccount

The properties that are associated with an Azure Storage account

StreamInputProperties

The properties that are associated with an input containing stream data.

AuthenticationMode

Authentication Mode. Valid modes are ConnectionString, Msi and 'UserToken'.

Name Type Description
ConnectionString

string

Msi

string

UserToken

string

AvroSerialization

Describes how data from an input is serialized or how data is serialized when written to an output in Avro format.

Name Type Description
type string:

Avro

Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.

AzureSqlReferenceInputDataSource

Describes an Azure SQL database reference input data source.

Name Type Description
properties.database

string

This element is associated with the datasource element. This is the name of the database that output will be written to.

properties.deltaSnapshotQuery

string

This element is associated with the datasource element. This query is used to fetch incremental changes from the SQL database. To use this option, we recommend using temporal tables in Azure SQL Database.

properties.fullSnapshotQuery

string

This element is associated with the datasource element. This query is used to fetch data from the sql database.

properties.password

string

This element is associated with the datasource element. This is the password that will be used to connect to the SQL Database instance.

properties.refreshRate

string

This element is associated with the datasource element. This indicates how frequently the data will be fetched from the database. It is of DateTime format.

properties.refreshType

RefreshType

Indicates the type of data refresh option.

properties.server

string

This element is associated with the datasource element. This is the name of the server that contains the database that will be written to.

properties.table

string

This element is associated with the datasource element. The name of the table in the Azure SQL database..

properties.user

string

This element is associated with the datasource element. This is the user name that will be used to connect to the SQL Database instance.

type string:

Microsoft.Sql/Server/Database

Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests.

BlobReferenceInputDataSource

Describes a blob input data source that contains reference data.

Name Type Default value Description
properties.authenticationMode

AuthenticationMode

ConnectionString

Authentication Mode.

properties.container

string

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.

properties.dateFormat

string

The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.

properties.pathPattern

string

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/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.

properties.storageAccounts

StorageAccount[]

A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.

properties.timeFormat

string

The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.

type string:

Microsoft.Storage/Blob

Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests.

BlobStreamInputDataSource

Describes a blob input data source that contains stream data.

Name Type Default value Description
properties.authenticationMode

AuthenticationMode

ConnectionString

Authentication Mode.

properties.container

string

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.

properties.dateFormat

string

The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.

properties.pathPattern

string

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/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.

properties.sourcePartitionCount

integer

The partition count of the blob input data source. Range 1 - 1024.

properties.storageAccounts

StorageAccount[]

A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.

properties.timeFormat

string

The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.

type string:

Microsoft.Storage/Blob

Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.

Compression

Describes how input data is compressed

Name Type Default value Description
type

CompressionType

None

Indicates the type of compression that the input uses. Required on PUT (CreateOrReplace) requests.

CompressionType

Indicates the type of compression that the input uses. Required on PUT (CreateOrReplace) requests.

Name Type Description
Deflate

string

GZip

string

None

string

CsvSerialization

Describes how data from an input is serialized or how data is serialized when written to an output in CSV format.

Name Type Description
properties.encoding

Encoding

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.

properties.fieldDelimiter

string

Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.

type string:

Csv

Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.

DiagnosticCondition

Condition applicable to the resource, or to the job overall, that warrant customer attention.

Name Type Description
code

string

The opaque diagnostic code.

message

string

The human-readable message describing the condition in detail. Localized in the Accept-Language of the client request.

since

string

The UTC timestamp of when the condition started. Customers should be able to find a corresponding event in the ops log around this time.

Diagnostics

Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention.

Name Type Description
conditions

DiagnosticCondition[]

A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention.

Encoding

Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output.

Name Type Description
UTF8

string

Error

Common error representation.

Name Type Description
error

Error

Error definition properties.

EventHubStreamInputDataSource

Describes an Event Hub input data source that contains stream data.

Name Type Default value Description
authenticationMode

AuthenticationMode

ConnectionString

Authentication Mode.

properties.consumerGroupName

string

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.

properties.eventHubName

string

The name of the Event Hub. Required on PUT (CreateOrReplace) requests.

serviceBusNamespace

string

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.

sharedAccessPolicyKey

string

The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.

sharedAccessPolicyName

string

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.

type string:

Microsoft.ServiceBus/EventHub

Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.

EventHubV2StreamInputDataSource

Describes an Event Hub input data source that contains stream data.

Name Type Default value Description
authenticationMode

AuthenticationMode

ConnectionString

Authentication Mode.

properties.consumerGroupName

string

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.

properties.eventHubName

string

The name of the Event Hub. Required on PUT (CreateOrReplace) requests.

serviceBusNamespace

string

The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.

sharedAccessPolicyKey

string

The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.

sharedAccessPolicyName

string

The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.

type string:

Microsoft.EventHub/EventHub

Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.

EventSerializationType

Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.

Name Type Description
Avro

string

Csv

string

Json

string

Parquet

string

FileReferenceInputDataSource

Describes a file input data source that contains reference data.

Name Type Description
properties.path

string

The path of the file.

type string:

File

Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests.

GatewayMessageBusStreamInputDataSource

Describes a blob input data source that contains stream data.

Name Type Description
properties.topic

string

The name of the Service Bus topic.

type string:

GatewayMessageBus

Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.

Input

An input object, containing all information associated with the named input. All inputs are contained under a streaming job.

Name Type Description
id

string

Resource Id

name

string

Resource name

properties InputProperties:

The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.

type

string

Resource type

InputListResult

Object containing a list of inputs under a streaming job.

Name Type Description
nextLink

string

The link (url) to the next page of results.

value

Input[]

A list of inputs under a streaming job. Populated by a 'List' operation.

IoTHubStreamInputDataSource

Describes an IoT Hub input data source that contains stream data.

Name Type Description
properties.consumerGroupName

string

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.

properties.endpoint

string

The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.).

properties.iotHubNamespace

string

The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests.

properties.sharedAccessPolicyKey

string

The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.

properties.sharedAccessPolicyName

string

The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required on PUT (CreateOrReplace) requests.

type string:

Microsoft.Devices/IotHubs

Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.

JsonOutputSerializationFormat

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.

Name Type Description
Array

string

LineSeparated

string

JsonSerialization

Describes how data from an input is serialized or how data is serialized when written to an output in JSON format.

Name Type Description
properties.encoding

Encoding

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.

properties.format

JsonOutputSerializationFormat

This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property 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. Default value is 'lineSeparated' if left null.

type string:

Json

Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.

ParquetSerialization

Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format.

Name Type Description
type string:

Parquet

Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.

ReferenceInputProperties

The properties that are associated with an input containing reference data.

Name Type Description
compression

Compression

Describes how input data is compressed

datasource ReferenceInputDataSource:

Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests.

diagnostics

Diagnostics

Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention.

etag

string

The current entity tag for the input. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.

partitionKey

string

partitionKey Describes a key in the input data which is used for partitioning the input data

serialization Serialization:

Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.

type string:

Reference

Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests.

RefreshType

Indicates the type of data refresh option.

Name Type Description
RefreshPeriodicallyWithDelta

string

RefreshPeriodicallyWithFull

string

Static

string

StorageAccount

The properties that are associated with an Azure Storage account

Name Type Description
accountKey

string

The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.

accountName

string

The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.

StreamInputProperties

The properties that are associated with an input containing stream data.

Name Type Description
compression

Compression

Describes how input data is compressed

datasource StreamInputDataSource:

Describes an input data source that contains stream data. Required on PUT (CreateOrReplace) requests.

diagnostics

Diagnostics

Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention.

etag

string

The current entity tag for the input. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.

partitionKey

string

partitionKey Describes a key in the input data which is used for partitioning the input data

serialization Serialization:

Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.

type string:

Stream

Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests.