你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Inputs - Get

获取有关指定输入的详细信息。

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

URI 参数

名称 必需 类型 说明
inputName
path True

string

输入的名称。

jobName
path True

string

流式处理作业的名称。

resourceGroupName
path True

string

资源组的名称。 此名称不区分大小写。

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

subscriptionId
path True

string

目标订阅的 ID。

api-version
query True

string

要用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

Input

已成功检索指定的输入。

Headers

ETag: string

Other Status Codes

Error

错误。

安全性

azure_auth

Azure Active Directory OAuth2 流

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

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Get a reference blob input with CSV serialization
Get a stream blob input with CSV serialization
Get a stream Event Hub input with JSON serialization
Get a stream IoT Hub input with Avro serialization

Get a reference blob input with CSV serialization

Sample Request

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

Sample Response

ETag: c987701d-4039-47aa-a115-ad84f67d07c5
{
  "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": "state",
        "pathPattern": "{date}/{time}",
        "dateFormat": "yyyy/MM/dd",
        "timeFormat": "HH"
      }
    },
    "serialization": {
      "type": "Csv",
      "properties": {
        "fieldDelimiter": ",",
        "encoding": "UTF8"
      }
    }
  }
}

Get a stream blob input with CSV serialization

Sample Request

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

Sample Response

ETag: 475074b8-c957-4b1f-a219-12b8399c3d4c
{
  "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg8161/providers/Microsoft.StreamAnalytics/streamingjobs/sj6695/inputs/input8899",
  "name": "input8899",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "properties": {
    "type": "Stream",
    "datasource": {
      "type": "Microsoft.Storage/Blob",
      "properties": {
        "sourcePartitionCount": 16,
        "storageAccounts": [
          {
            "accountName": "someAccountName"
          }
        ],
        "container": "state",
        "pathPattern": "{date}/{time}",
        "dateFormat": "yyyy/MM/dd",
        "timeFormat": "HH"
      }
    },
    "serialization": {
      "type": "Csv",
      "properties": {
        "fieldDelimiter": ",",
        "encoding": "UTF8"
      }
    }
  }
}

Get a stream Event Hub input with JSON serialization

Sample Request

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

Sample Response

ETag: afd0d184-37e9-4370-9e55-32501bc4de3a
{
  "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg3139/providers/Microsoft.StreamAnalytics/streamingjobs/sj197/inputs/input7425",
  "name": "input7425",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "properties": {
    "type": "Stream",
    "datasource": {
      "type": "Microsoft.ServiceBus/EventHub",
      "properties": {
        "eventHubName": "sdkeventhub",
        "consumerGroupName": "sdkconsumergroup",
        "serviceBusNamespace": "sdktest",
        "sharedAccessPolicyName": "RootManageSharedAccessKey"
      }
    },
    "serialization": {
      "type": "Json",
      "properties": {
        "encoding": "UTF8"
      }
    }
  }
}

Get a stream IoT Hub input with Avro serialization

Sample Request

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

Sample Response

ETag: bd8009b3-8165-4bd3-aad2-29a2b378dd14
{
  "id": "/subscriptions/56b5e0a9-b645-407d-99b0-c64f86013e3d/resourceGroups/sjrg3467/providers/Microsoft.StreamAnalytics/streamingjobs/sj9742/inputs/input7970",
  "name": "input7970",
  "type": "Microsoft.StreamAnalytics/streamingjobs/inputs",
  "properties": {
    "type": "Stream",
    "datasource": {
      "type": "Microsoft.Devices/IotHubs",
      "properties": {
        "iotHubNamespace": "iothub",
        "sharedAccessPolicyName": "owner",
        "endpoint": "messages/events",
        "consumerGroupName": "sdkconsumergroup"
      }
    },
    "serialization": {
      "type": "Avro",
      "properties": {}
    }
  }
}

定义

名称 说明
AuthenticationMode

身份验证模式。 有效模式为 ConnectionStringMsi 和“UserToken”。

AvroSerialization

描述如何序列化输入中的数据,或者在以 Avro 格式写入输出时如何序列化数据。

AzureSqlReferenceInputDataSource

介绍Azure SQL数据库引用输入数据源。

BlobReferenceInputDataSource

描述包含引用数据的 Blob 输入数据源。

BlobStreamInputDataSource

描述包含流数据的 Blob 输入数据源。

Compression

介绍如何压缩输入数据

CompressionType

指示输入使用的压缩类型。 在 PUT (CreateOrReplace) 请求上是必需的。

CsvSerialization

描述如何序列化输入中的数据,或者在以 CSV 格式写入输出时如何序列化数据。

DiagnosticCondition

适用于资源或整体作业的条件,值得客户关注。

Diagnostics

描述适用于输入、输出或整体作业的条件,这些条件值得客户关注。

Encoding

指定输入时传入数据的编码,在输出的情况下指定传出数据的编码。

Error

常见错误表示形式。

EventHubStreamInputDataSource

描述包含流数据的事件中心输入数据源。

EventHubV2StreamInputDataSource

描述包含流数据的事件中心输入数据源。

EventSerializationType

指示输入或输出使用的序列化类型。 在 PUT (CreateOrReplace) 请求上是必需的。

FileReferenceInputDataSource

描述包含引用数据的文件输入数据源。

GatewayMessageBusStreamInputDataSource

描述包含流数据的 Blob 输入数据源。

Input

一个输入对象,包含与命名输入关联的所有信息。 所有输入都包含在流式处理作业下。

IoTHubStreamInputDataSource

描述包含流数据的IoT 中心输入数据源。

JsonOutputSerializationFormat

指定将写入输出的 JSON 的格式。 当前支持的值是“lineSeparated”,指示输出的格式将由新行分隔,“array”指示输出将格式化为 JSON 对象的数组。

JsonSerialization

描述如何序列化输入中的数据,或者在以 JSON 格式写入输出时如何序列化数据。

ParquetSerialization

描述如何序列化输入中的数据,或者在以 Parquet 格式写入输出时如何序列化数据。

ReferenceInputProperties

与包含引用数据的输入关联的属性。

RefreshType

指示数据刷新选项的类型。

StorageAccount

与 Azure 存储帐户关联的属性

StreamInputProperties

与包含流数据的输入关联的属性。

AuthenticationMode

身份验证模式。 有效模式为 ConnectionStringMsi 和“UserToken”。

名称 类型 说明
ConnectionString

string

Msi

string

UserToken

string

AvroSerialization

描述如何序列化输入中的数据,或者在以 Avro 格式写入输出时如何序列化数据。

名称 类型 说明
type string:

Avro

指示输入或输出使用的序列化类型。 在 PUT (CreateOrReplace) 请求上是必需的。

AzureSqlReferenceInputDataSource

介绍Azure SQL数据库引用输入数据源。

名称 类型 说明
properties.database

string

此元素与 datasource 元素相关联。 这是要将输出写入到的数据库的名称。

properties.deltaSnapshotQuery

string

此元素与 datasource 元素相关联。 此查询用于从 SQL 数据库提取增量更改。 若要使用此选项,建议在 Azure SQL 数据库中使用临时表。

properties.fullSnapshotQuery

string

此元素与 datasource 元素相关联。 此查询用于从 sql 数据库提取数据。

properties.password

string

此元素与 datasource 元素相关联。 这是用于连接 SQL Database 实例的密码。

properties.refreshRate

string

此元素与 datasource 元素相关联。 这表示从数据库提取数据的频率。 它是 DateTime 格式。

properties.refreshType

RefreshType

指示数据刷新选项的类型。

properties.server

string

此元素与 datasource 元素相关联。 这是要写入到的数据库所在的服务器的名称。

properties.table

string

此元素与 datasource 元素相关联。 Azure SQL数据库中表的名称。

properties.user

string

此元素与 datasource 元素相关联。 这是用于连接 SQL Database 实例的用户名。

type string:

Microsoft.Sql/Server/Database

指示包含引用数据的输入数据源的类型。 在 PUT (CreateOrReplace) 请求上是必需的。

BlobReferenceInputDataSource

描述包含引用数据的 Blob 输入数据源。

名称 类型 默认值 说明
properties.authenticationMode

AuthenticationMode

ConnectionString

身份验证模式。

properties.container

string

关联的存储帐户中的容器的名称。 此容器包含要从中读取或写入的 blob () 。 在 PUT (CreateOrReplace) 请求上是必需的。

properties.dateFormat

string

日期格式。 无论 {date} 出现在 pathPattern 中,此属性的值都改为用作日期格式。

properties.pathPattern

string

Blob 路径模式。 不是正则表达式。 它表示一种模式,将针对该模式匹配 Blob 名称,以确定它们是否应作为输入或输出包含在作业中。 有关更详细的说明和示例,请参阅 https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-inputhttps://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output

properties.storageAccounts

StorageAccount[]

一个或多个 Azure 存储帐户的列表。 在 PUT (CreateOrReplace) 请求上是必需的。

properties.timeFormat

string

时间格式。 无论 {time} 出现在 pathPattern 中的位置,此属性的值都改为用作时间格式。

type string:

Microsoft.Storage/Blob

指示包含引用数据的输入数据源的类型。 在 PUT (CreateOrReplace) 请求上是必需的。

BlobStreamInputDataSource

描述包含流数据的 Blob 输入数据源。

名称 类型 默认值 说明
properties.authenticationMode

AuthenticationMode

ConnectionString

身份验证模式。

properties.container

string

关联存储帐户中容器的名称。 此容器包含要读取或写入的 blob () 。 在 PUT (CreateOrReplace) 请求时是必需的。

properties.dateFormat

string

日期格式。 只要 {date} 出现在 pathPattern 中,此属性的值就用作日期格式。

properties.pathPattern

string

Blob 路径模式。 不是正则表达式。 它表示一种模式,根据该模式匹配 Blob 名称,以确定是否应将其作为输入或输出包含在作业中。 有关更详细的说明和示例,请参阅 https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-inputhttps://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output

properties.sourcePartitionCount

integer

Blob 输入数据源的分区计数。 范围 1 - 1024。

properties.storageAccounts

StorageAccount[]

一个或多个 Azure 存储帐户的列表。 在 PUT (CreateOrReplace) 请求时是必需的。

properties.timeFormat

string

时间格式。 只要 {time} 出现在 pathPattern 中,此属性的值将改为用作时间格式。

type string:

Microsoft.Storage/Blob

指示包含流数据的输入数据源的类型。 在 PUT (CreateOrReplace) 请求时是必需的。

Compression

介绍如何压缩输入数据

名称 类型 默认值 说明
type

CompressionType

None

指示输入使用的压缩类型。 在 PUT (CreateOrReplace) 请求时是必需的。

CompressionType

指示输入使用的压缩类型。 在 PUT (CreateOrReplace) 请求上是必需的。

名称 类型 说明
Deflate

string

GZip

string

None

string

CsvSerialization

描述如何序列化输入中的数据,或者在以 CSV 格式写入输出时如何序列化数据。

名称 类型 说明
properties.encoding

Encoding

指定输入时传入数据的编码,在输出的情况下指定传出数据的编码。 在 PUT (CreateOrReplace) 请求上是必需的。

properties.fieldDelimiter

string

指定用于分隔 CSV) 记录 (逗号分隔值的分隔符。 有关支持值的列表,请参阅 https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-inputhttps://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output 。 在 PUT (CreateOrReplace) 请求上是必需的。

type string:

Csv

指示输入或输出使用的序列化类型。 在 PUT (CreateOrReplace) 请求上是必需的。

DiagnosticCondition

适用于资源或整体作业的条件,值得客户关注。

名称 类型 说明
code

string

不透明的诊断代码。

message

string

详细描述条件的可读消息。 在客户端请求的 Accept-Language 中本地化。

since

string

条件开始时的 UTC 时间戳。 此时,客户应该能够在操作日志中找到相应的事件。

Diagnostics

描述适用于输入、输出或整体作业的条件,这些条件值得客户关注。

名称 类型 说明
conditions

DiagnosticCondition[]

适用于资源或整个作业的零个或多个条件的集合,值得客户关注。

Encoding

指定输入时传入数据的编码,在输出的情况下指定传出数据的编码。

名称 类型 说明
UTF8

string

Error

常见错误表示形式。

名称 类型 说明
error

Error

错误定义属性。

EventHubStreamInputDataSource

描述包含流数据的事件中心输入数据源。

名称 类型 默认值 说明
authenticationMode

AuthenticationMode

ConnectionString

身份验证模式。

properties.consumerGroupName

string

应用于从事件中心读取事件的事件中心使用者组的名称。 为多个输入指定不同的使用者组名称允许每个输入从事件中心接收相同的事件。 如果未指定,则输入将使用事件中心的默认使用者组。

properties.eventHubName

string

事件中心的名称。 在 PUT (CreateOrReplace) 请求时是必需的。

serviceBusNamespace

string

与所需事件中心、服务总线队列、服务总线主题等关联的命名空间。在 PUT (CreateOrReplace) 请求时是必需的。

sharedAccessPolicyKey

string

指定共享访问策略的共享访问策略密钥。 在 PUT (CreateOrReplace) 请求时是必需的。

sharedAccessPolicyName

string

事件中心、服务总线队列、服务总线主题等的共享访问策略名称。在 PUT (CreateOrReplace) 请求时是必需的。

type string:

Microsoft.ServiceBus/EventHub

指示包含流数据的输入数据源的类型。 在 PUT (CreateOrReplace) 请求时是必需的。

EventHubV2StreamInputDataSource

描述包含流数据的事件中心输入数据源。

名称 类型 默认值 说明
authenticationMode

AuthenticationMode

ConnectionString

身份验证模式。

properties.consumerGroupName

string

应用于从事件中心读取事件的事件中心使用者组的名称。 为多个输入指定不同的使用者组名称允许每个输入从事件中心接收相同的事件。 如果未指定,则输入将使用事件中心的默认使用者组。

properties.eventHubName

string

事件中心的名称。 在 PUT (CreateOrReplace) 请求时是必需的。

serviceBusNamespace

string

与所需事件中心、服务总线队列、服务总线主题等关联的命名空间。在 PUT (CreateOrReplace) 请求时是必需的。

sharedAccessPolicyKey

string

指定共享访问策略的共享访问策略密钥。 在 PUT (CreateOrReplace) 请求时是必需的。

sharedAccessPolicyName

string

事件中心、服务总线队列、服务总线主题等的共享访问策略名称。在 PUT (CreateOrReplace) 请求时是必需的。

type string:

Microsoft.EventHub/EventHub

指示包含流数据的输入数据源的类型。 在 PUT (CreateOrReplace) 请求时是必需的。

EventSerializationType

指示输入或输出使用的序列化类型。 在 PUT (CreateOrReplace) 请求上是必需的。

名称 类型 说明
Avro

string

Csv

string

Json

string

Parquet

string

FileReferenceInputDataSource

描述包含引用数据的文件输入数据源。

名称 类型 说明
properties.path

string

文件的路径。

type string:

File

指示包含引用数据的输入数据源的类型。 在 PUT (CreateOrReplace) 请求上是必需的。

GatewayMessageBusStreamInputDataSource

描述包含流数据的 Blob 输入数据源。

名称 类型 说明
properties.topic

string

服务总线主题的名称。

type string:

GatewayMessageBus

指示包含流数据的输入数据源的类型。 在 PUT (CreateOrReplace) 请求上是必需的。

Input

一个输入对象,包含与命名输入关联的所有信息。 所有输入都包含在流式处理作业下。

名称 类型 说明
id

string

资源 ID

name

string

资源名称

properties InputProperties:

与输入关联的属性。 在 PUT (CreateOrReplace) 请求时是必需的。

type

string

资源类型

IoTHubStreamInputDataSource

描述包含流数据的IoT 中心输入数据源。

名称 类型 说明
properties.consumerGroupName

string

应用于从IoT 中心读取事件的IoT 中心使用者组的名称。 如果未指定,则输入将使用 IoT 中心的默认使用者组。

properties.endpoint

string

用于连接到 (的IoT 中心终结点,即 messages/events、messages/operationsMonitoringEvents 等 ) 。

properties.iotHubNamespace

string

IoT 中心的名称或 URI。 在 PUT (CreateOrReplace) 请求时是必需的。

properties.sharedAccessPolicyKey

string

指定共享访问策略的共享访问策略密钥。 在 PUT (CreateOrReplace) 请求时是必需的。

properties.sharedAccessPolicyName

string

IoT 中心的共享访问策略名称。 此策略必须至少包含服务连接权限。 在 PUT (CreateOrReplace) 请求时是必需的。

type string:

Microsoft.Devices/IotHubs

指示包含流数据的输入数据源的类型。 在 PUT (CreateOrReplace) 请求上是必需的。

JsonOutputSerializationFormat

指定将写入输出的 JSON 的格式。 当前支持的值是“lineSeparated”,指示输出的格式将由新行分隔,“array”指示输出将格式化为 JSON 对象的数组。

名称 类型 说明
Array

string

LineSeparated

string

JsonSerialization

描述如何序列化输入中的数据,或者在以 JSON 格式写入输出时如何序列化数据。

名称 类型 说明
properties.encoding

Encoding

指定输入时传入数据的编码,在输出的情况下指定传出数据的编码。 在 PUT (CreateOrReplace) 请求上是必需的。

properties.format

JsonOutputSerializationFormat

此属性仅适用于输出的 JSON 序列化。 它不适用于输入。 此属性指定将写入输出的 JSON 的格式。 当前支持的值是“lineSeparated”,指示输出的格式将由新行分隔,“array”指示输出将格式化为 JSON 对象的数组。 如果为 null,则默认值为“lineSeparated”。

type string:

Json

指示输入或输出使用的序列化类型。 在 PUT (CreateOrReplace) 请求上是必需的。

ParquetSerialization

描述如何序列化输入中的数据,或者在以 Parquet 格式写入输出时如何序列化数据。

名称 类型 说明
type string:

Parquet

指示输入或输出使用的序列化类型。 在 PUT (CreateOrReplace) 请求上是必需的。

ReferenceInputProperties

与包含引用数据的输入关联的属性。

名称 类型 说明
compression

Compression

介绍如何压缩输入数据

datasource ReferenceInputDataSource:

描述包含引用数据的输入数据源。 在 PUT (CreateOrReplace) 请求时是必需的。

diagnostics

Diagnostics

描述适用于输入、输出或整体作业的条件,这些条件值得客户关注。

etag

string

输入的当前实体标记。 这是一个不透明的字符串。 可以使用它来检测资源是否在请求之间发生了更改。 还可以在 If-Match 或 If-None-Match 标头中使用它进行乐观并发的写入操作。

partitionKey

string

partitionKey 描述输入数据中用于对输入数据进行分区的键

serialization Serialization:

描述如何序列化输入中的数据,或者在写入输出时如何序列化数据。 在 PUT (CreateOrReplace) 请求时是必需的。

type string:

Reference

指示输入是引用数据还是流数据的源。 在 PUT (CreateOrReplace) 请求时是必需的。

RefreshType

指示数据刷新选项的类型。

名称 类型 说明
RefreshPeriodicallyWithDelta

string

RefreshPeriodicallyWithFull

string

Static

string

StorageAccount

与 Azure 存储帐户关联的属性

名称 类型 说明
accountKey

string

Azure 存储帐户的帐户密钥。 在 PUT (CreateOrReplace) 请求上是必需的。

accountName

string

Azure 存储帐户的名称。 在 PUT (CreateOrReplace) 请求上是必需的。

StreamInputProperties

与包含流数据的输入关联的属性。

名称 类型 说明
compression

Compression

介绍如何压缩输入数据

datasource StreamInputDataSource:

描述包含流数据的输入数据源。 在 PUT (CreateOrReplace) 请求时是必需的。

diagnostics

Diagnostics

描述适用于输入、输出或整体作业的条件,这些条件值得客户关注。

etag

string

输入的当前实体标记。 这是一个不透明的字符串。 可以使用它来检测资源是否在请求之间发生了更改。 还可以在 If-Match 或 If-None-Match 标头中使用它进行乐观并发的写入操作。

partitionKey

string

partitionKey 描述输入数据中用于对输入数据进行分区的键

serialization Serialization:

描述如何序列化输入中的数据,或者在写入输出时如何序列化数据。 在 PUT (CreateOrReplace) 请求时是必需的。

type string:

Stream

指示输入是引用数据还是流数据的源。 在 PUT (CreateOrReplace) 请求时是必需的。