Inputs - Test
Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test?api-version=2020-03-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
input
|
path | True |
string |
The name of the input. |
job
|
path | True |
string |
The name of the streaming job. |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. Regex pattern: |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
name |
string |
Resource name |
properties | InputProperties: |
The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The test operation completed successfully. |
|
202 Accepted |
The test request was successfully initiated. |
|
Other Status Codes |
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
Test the connection for an input
Sample request
POST https://management.azure.com/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourcegroups/sjrg8440/providers/Microsoft.StreamAnalytics/streamingjobs/sj9597/inputs/input7225/test?api-version=2020-03-01
Sample response
{
"status": "TestSucceeded"
}
Definitions
Name | Description |
---|---|
Authentication |
Authentication Mode. Valid modes are |
Avro |
Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. |
Azure |
Describes an Azure SQL database reference input data source. |
Blob |
Describes a blob input data source that contains reference data. |
Blob |
Describes a blob input data source that contains stream data. |
Compression |
Describes how input data is compressed |
Compression |
Indicates the type of compression that the input uses. Required on PUT (CreateOrReplace) requests. |
Csv |
Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. |
Diagnostic |
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. |
Error |
Describes the error that occurred. |
Event |
Describes an Event Hub input data source that contains stream data. |
Event |
Describes an Event Hub input data source that contains stream data. |
Event |
Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. |
File |
Describes a file input data source that contains reference data. |
Gateway |
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. |
Io |
Describes an IoT Hub input data source that contains stream data. |
Json |
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. |
Json |
Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. |
Parquet |
Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. |
Reference |
The properties that are associated with an input containing reference data. |
Refresh |
Indicates the type of data refresh option. |
Resource |
Describes the status of the test operation along with error information, if applicable. |
Storage |
The properties that are associated with an Azure Storage account |
Stream |
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 |
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. |
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 | 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 |
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. |
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 | 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 |
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. |
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 | 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 |
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 |
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 definition properties. |
ErrorResponse
Describes the error that occurred.
Name | Type | Description |
---|---|---|
code |
string |
Error code associated with the error that occurred. |
message |
string |
Describes the error in detail. |
EventHubStreamInputDataSource
Describes an Event Hub input data source that contains stream data.
Name | Type | Default value | Description |
---|---|---|---|
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. |
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 | 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. |
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:
Gateway |
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 |
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. |
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 |
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 |
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 |
Describes how input data is compressed |
|
datasource | ReferenceInputDataSource: |
Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests. |
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 |
ResourceTestStatus
Describes the status of the test operation along with error information, if applicable.
Name | Type | Description |
---|---|---|
error |
Describes the error that occurred. |
|
status |
string |
The status of the test operation. |
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 |
Describes how input data is compressed |
|
datasource | StreamInputDataSource: |
Describes an input data source that contains stream data. Required on PUT (CreateOrReplace) requests. |
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. |