你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Bicep资源定义
可以使用目标操作部署流式处理作业/输出资源类型:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
用法示例
Bicep 样本
部署流分析输出表的基本示例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource storageAccount 'Microsoft.Storage/storageAccounts@2021-09-01' = {
name: resourceName
location: location
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
properties: {
accessTier: 'Hot'
allowBlobPublicAccess: true
allowCrossTenantReplication: true
allowSharedKeyAccess: true
defaultToOAuthAuthentication: false
encryption: {
keySource: 'Microsoft.Storage'
services: {
queue: {
keyType: 'Service'
}
table: {
keyType: 'Service'
}
}
}
isHnsEnabled: false
isNfsV3Enabled: false
isSftpEnabled: false
minimumTlsVersion: 'TLS1_2'
networkAcls: {
defaultAction: 'Allow'
}
publicNetworkAccess: 'Enabled'
supportsHttpsTrafficOnly: true
}
}
resource streamingJob 'Microsoft.StreamAnalytics/streamingJobs@2020-03-01' = {
name: resourceName
location: location
properties: {
cluster: {}
compatibilityLevel: '1.0'
contentStoragePolicy: 'SystemAccount'
dataLocale: 'en-GB'
eventsLateArrivalMaxDelayInSeconds: 60
eventsOutOfOrderMaxDelayInSeconds: 50
eventsOutOfOrderPolicy: 'Adjust'
jobType: 'Cloud'
outputErrorPolicy: 'Drop'
sku: {
name: 'Standard'
}
transformation: {
name: 'main'
properties: {
query: ''' SELECT *
INTO [YourOutputAlias]
FROM [YourInputAlias]
'''
streamingUnits: 3
}
}
}
}
resource output 'Microsoft.StreamAnalytics/streamingJobs/outputs@2021-10-01-preview' = {
name: resourceName
parent: streamingJob
properties: {
datasource: {
properties: {
accountKey: storageAccount.listKeys().keys[0].value
accountName: storageAccount.name
batchSize: 100
partitionKey: 'foo'
rowKey: 'bar'
table: 'foobar'
}
type: 'Microsoft.Storage/Table'
}
}
}
资源格式
去创造一个Microsoft。StreamAnalytics/streamingjobs/outputs 资源,将以下 Bicep 添加到你的模板中。
resource symbolicname 'Microsoft.StreamAnalytics/streamingjobs/outputs@2020-03-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
datasource: {
type: 'string'
// For remaining properties, see OutputDataSource objects
}
serialization: {
type: 'string'
// For remaining properties, see Serialization objects
}
sizeWindow: int
timeWindow: 'string'
}
}
序列化对象
设置 type 属性以指定对象的类型。
对于 Avro,请使用:
{
properties: any(...)
type: 'Avro'
}
对于 Csv,请使用:
{
properties: {
encoding: 'string'
fieldDelimiter: 'string'
}
type: 'Csv'
}
对于 Json,请使用:
{
properties: {
encoding: 'string'
format: 'string'
}
type: 'Json'
}
对于 镶木地板,使用:
{
properties: any(...)
type: 'Parquet'
}
OutputDataSource 对象
设置 type 属性以指定对象的类型。
对于 GatewayMessageBus,请使用:
{
properties: {
topic: 'string'
}
type: 'GatewayMessageBus'
}
对于Microsoft。AzureFunction, use:
{
properties: {
apiKey: 'string'
functionAppName: 'string'
functionName: 'string'
maxBatchCount: int
maxBatchSize: int
}
type: 'Microsoft.AzureFunction'
}
对于Microsoft。DataLake/Accounts,使用:
{
properties: {
accountName: 'string'
authenticationMode: 'string'
dateFormat: 'string'
filePathPrefix: 'string'
refreshToken: 'string'
tenantId: 'string'
timeFormat: 'string'
tokenUserDisplayName: 'string'
tokenUserPrincipalName: 'string'
}
type: 'Microsoft.DataLake/Accounts'
}
对于Microsoft。EventHub/EventHub,请使用:
{
properties: {
authenticationMode: 'string'
eventHubName: 'string'
partitionKey: 'string'
propertyColumns: [
'string'
]
serviceBusNamespace: 'string'
sharedAccessPolicyKey: 'string'
sharedAccessPolicyName: 'string'
}
type: 'Microsoft.EventHub/EventHub'
}
对于Microsoft。ServiceBus/EventHub,使用:
{
properties: {
authenticationMode: 'string'
eventHubName: 'string'
partitionKey: 'string'
propertyColumns: [
'string'
]
serviceBusNamespace: 'string'
sharedAccessPolicyKey: 'string'
sharedAccessPolicyName: 'string'
}
type: 'Microsoft.ServiceBus/EventHub'
}
对于Microsoft。ServiceBus/Queue,使用:
{
properties: {
authenticationMode: 'string'
propertyColumns: [
'string'
]
queueName: 'string'
serviceBusNamespace: 'string'
sharedAccessPolicyKey: 'string'
sharedAccessPolicyName: 'string'
systemPropertyColumns: any(...)
}
type: 'Microsoft.ServiceBus/Queue'
}
对于Microsoft。ServiceBus/Topic,使用:
{
properties: {
authenticationMode: 'string'
propertyColumns: [
'string'
]
serviceBusNamespace: 'string'
sharedAccessPolicyKey: 'string'
sharedAccessPolicyName: 'string'
systemPropertyColumns: {
{customized property}: 'string'
}
topicName: 'string'
}
type: 'Microsoft.ServiceBus/Topic'
}
对于Microsoft。Sql/Server/DataWarehouse,使用:
{
properties: {
database: 'string'
password: 'string'
server: 'string'
table: 'string'
user: 'string'
}
type: 'Microsoft.Sql/Server/DataWarehouse'
}
对于Microsoft。Sql/Server/Database,使用:
{
properties: {
authenticationMode: 'string'
database: 'string'
maxBatchCount: int
maxWriterCount: int
password: 'string'
server: 'string'
table: 'string'
user: 'string'
}
type: 'Microsoft.Sql/Server/Database'
}
对于Microsoft。存储/Blob,使用:
{
properties: {
authenticationMode: 'string'
blobPathPrefix: 'string'
container: 'string'
dateFormat: 'string'
pathPattern: 'string'
storageAccounts: [
{
accountKey: 'string'
accountName: 'string'
}
]
timeFormat: 'string'
}
type: 'Microsoft.Storage/Blob'
}
对于Microsoft。Storage/DocumentDB,使用:
{
properties: {
accountId: 'string'
accountKey: 'string'
collectionNamePattern: 'string'
database: 'string'
documentId: 'string'
partitionKey: 'string'
}
type: 'Microsoft.Storage/DocumentDB'
}
对于Microsoft。存储/表,使用:
{
properties: {
accountKey: 'string'
accountName: 'string'
batchSize: int
columnsToRemove: [
'string'
]
partitionKey: 'string'
rowKey: 'string'
table: 'string'
}
type: 'Microsoft.Storage/Table'
}
对于 PowerBI,请使用:
{
properties: {
authenticationMode: 'string'
dataset: 'string'
groupId: 'string'
groupName: 'string'
refreshToken: 'string'
table: 'string'
tokenUserDisplayName: 'string'
tokenUserPrincipalName: 'string'
}
type: 'PowerBI'
}
属性值
Microsoft。StreamAnalytics/streamingjobs/outputs
| Name | Description | Value |
|---|---|---|
| name | 资源名称 | string (必需) |
| 父级 | 在 Bicep 中,你可以指定子资源的父资源。 仅当子资源在父资源外部声明时,才需要添加此属性。 有关详细信息,请参阅 父资源外部的子资源。 |
类型资源的符号名称: streamingjobs |
| properties | 与输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | OutputProperties |
AvroSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 Avro 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | any |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Avro'(必填) |
AzureDataLakeStoreOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure Data Lake Store 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureDataLakeStoreOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。DataLake/Accounts'(必填) |
AzureDataLakeStoreOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountName | Azure Data Lake Store 账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| dateFormat | 日期格式。 无论 {date} 出现在 filePathPrefix 中,此属性的值将改为用作日期格式。 | 字符串 |
| filePathPrefix | 输出应写入到的文件的位置。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| refreshToken | 一个刷新令牌,可用于获取有效的访问令牌,然后可用于向数据源进行身份验证。 有效的刷新令牌目前只能通过 Azure 门户 获得。 建议在创建数据源时在这里输入一个虚拟字符串值,然后进入 Azure 门户 认证数据源,这样该属性会用有效的刷新令牌更新。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| tenantId | 用于获取刷新令牌的用户的租户 ID。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| timeFormat | 时间格式。 无论 {time} 出现在 filePathPrefix 中,此属性的值将改为用作时间格式。 | 字符串 |
| tokenUserDisplayName | 用于获取刷新令牌的用户的用户显示名称。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
| tokenUserPrincipalName | 用于获取刷新令牌的用户的用户主体名称(UPN)。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
AzureFunctionOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 这些属性与 Azure 函数输出关联。 PUT (CreateOrReplace) 请求时是必需的。 | AzureFunctionOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。AzureFunction' (required) |
AzureFunctionOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| apiKey | 如果你想使用其他订阅的 Azure 函数,可以通过提供访问该函数的密钥来实现。 | 字符串 |
| functionAppName | 你的 Azure Functions 应用名称。 | 字符串 |
| functionName | 你 Azure Functions 应用中的函数名称。 | 字符串 |
| maxBatchCount | 这是一个属性,可以指定每个发送到 Azure Functions 的批次中最大事件数。 默认值为 100。 | int |
| maxBatchSize | 这是一个属性,可以让你为发送到Azure函数的每个输出批次设置最大大小。 输入单位为字节。 默认情况下,此值为 262,144 字节(256 KB)。 | int |
AzureSqlDatabaseOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure SQL 数据库输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureSqlDatabaseOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。Sql/Server/Database'(必填) |
AzureSqlDatabaseOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| 数据库 | Azure SQL 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| maxBatchCount | 写入 Sql 数据库的最大 Batch 计数,默认值为 10,000。 PUT 请求可选。 | int |
| maxWriterCount | 最大编写器计数,目前仅提供 1(单个编写器)和 0(基于查询分区)。 PUT 请求可选。 | int |
| 密码 | 连接Azure SQL数据库的密码。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 服务器 | 包含Azure SQL数据库的SQL服务器名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure SQL 数据库中表的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 用户 | 将用于连接Azure SQL数据库的用户名。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
AzureSynapseOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure Synapse 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureSynapseOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。Sql/Server/DataWarehouse'(必填) |
AzureSynapseOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| 数据库 | Azure SQL 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 密码 | 连接Azure SQL数据库的密码。 PUT (CreateOrReplace) 请求时是必需的。 | string Constraints: 敏感值。 以安全参数的形式传入。 |
| 服务器 | 包含Azure SQL数据库的SQL服务器名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure SQL 数据库中表的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 用户 | 将用于连接Azure SQL数据库的用户名。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
AzureTableOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure 表输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureTableOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/表格“(必备) |
AzureTableOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountKey | Azure 存储账户的账户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | string Constraints: 敏感值。 以安全参数的形式传入。 |
| accountName | Azure 存储账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| batchSize | 每次写入 Azure 表的行数。 | int |
| columnsToRemove | 如果指定,则数组中的每个项都是要从输出事件实体中删除的列的名称(如果存在)。 | string[] |
| partitionKey | 该元素表示查询中 SELECT 语句中的列名,该列将用作 Azure 表的分区键。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| rowKey | 该元素表示查询中 SELECT 语句中的列名,该列将用作 Azure 表的行键。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure 表格的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
BlobOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Blob 输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | BlobOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/Blob'(必填) |
BlobOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| blobPathPrefix | Blob 路径前缀。 | 字符串 |
| 容器 | 关联的存储帐户中的容器的名称。 此容器包含要从中读取或写入到的 blob(s)。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| dateFormat | 日期格式。 无论 {date} 出现在 pathPattern 中,此属性的值将改为用作日期格式。 | 字符串 |
| pathPattern | Blob 路径模式。 不是正则表达式。 它表示将匹配 Blob 名称的模式,以确定它们是否应作为作业的输入或输出包含在内。 有关更详细的说明和示例,请参阅 /rest/api/streamanalytics/streamanalytics/streamanalytics/stream-analytics-output。 | 字符串 |
| storageAccounts | 一个或多个 Azure 存储 账户列表。 PUT (CreateOrReplace) 请求时是必需的。 | StorageAccount[] |
| timeFormat | 时间格式。 无论 {time} 出现在 pathPattern 中,此属性的值将改为用作时间格式。 | 字符串 |
CsvSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 CSV 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | CsvSerializationProperties |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Csv'(必填) |
CsvSerializationProperties
| Name | Description | Value |
|---|---|---|
| 编码 | 指定传入数据的编码(在输入的情况下)和输出时传出数据的编码。 PUT (CreateOrReplace) 请求时是必需的。 | 'UTF8' |
| fieldDelimiter | 指定将用于分隔逗号分隔值 (CSV) 记录的分隔符。 有关支持的值列表,请参阅 /rest/api/streamanalytics/streamanalytics/streamanalytics/stream-analytics-output。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
DocumentDbOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 DocumentDB 输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | DocumentDbOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/文档数据库“(必备) |
DocumentDbOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountId | DocumentDB 帐户名称或 ID。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| accountKey | DocumentDB 帐户的帐户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| collectionNamePattern | 要使用的集合的集合名称模式。 可以使用可选的 {partition} 标记构造集合名称格式,其中分区从 0 开始。 有关详细信息,请参阅 /rest/api/streamanalytics/stream-analytics-output 的 DocumentDB 部分。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 数据库 | DocumentDB 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| documentId | 输出事件中用于指定插入或更新操作所基于的主键的字段的名称。 | 字符串 |
| partitionKey | 输出事件中用于指定键以跨集合对输出进行分区的字段的名称。 如果“collectionNamePattern”包含 {partition} 标记,则需要指定此属性。 | 字符串 |
EventHubOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与事件中心输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | EventHubOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/EventHub'(必填) |
EventHubOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| eventHubName | 事件中心的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| partitionKey | 用于确定要发送事件数据的分区的键/列。 | 字符串 |
| propertyColumns | 与此事件中心输出关联的属性。 | string[] |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
EventHubV2OutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与事件中心输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | EventHubOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。EventHub/EventHub'(必填) |
GatewayMessageBusOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与网关消息总线输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | GatewayMessageBusOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'GatewayMessageBus'(必需) |
GatewayMessageBusOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| 主题 | 服务总线 主题的名称。 | 字符串 |
JsonSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 JSON 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | JsonSerializationProperties |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Json'(必填) |
JsonSerializationProperties
| Name | Description | Value |
|---|---|---|
| 编码 | 指定传入数据的编码(在输入的情况下)和输出时传出数据的编码。 PUT (CreateOrReplace) 请求时是必需的。 | 'UTF8' |
| format | 此属性仅适用于输出的 JSON 序列化。 它不适用于输入。 此属性指定输出将写入的 JSON 的格式。 当前支持的值是“lineSeparated”,指示输出将设置格式,方法是让每个 JSON 对象用新行分隔,“array”指示输出将格式化为 JSON 对象的数组。 如果为 null,则默认值为“lineSeparated”。 | 'Array' 'LineSeparated' |
OutputDataSource
| Name | Description | Value |
|---|---|---|
| 类型 | 对于 类型 GatewayMessageBusOutputDataSource,设置为“GatewayMessageBus”。 设置为“Microsoft”。AzureFunction' for type AzureFunctionOutputDataSource. 设置为“Microsoft”。DataLake/Accounts' for type AzureDataLakeStoreOutputDataSource. 设置为“Microsoft”。EventHub/EventHub' for type EventHubV2OutputDataSource. 设置为“Microsoft”。ServiceBus/EventHub' for type EventHubOutputDataSource. 设置为“Microsoft”。ServiceBus/Queue' 用于类型 ServiceBusQueueOutputDataSource。 设置为“Microsoft”。ServiceBus/Topic' 用于类型 ServiceBusTopicOutputDataSource。 设置为“Microsoft”。Sql/Server/DataWarehouse' for type AzureSynapseOutputDataSource. 设置为“Microsoft”。Sql/Server/Database' for type AzureSqlDatabaseOutputDataSource. 设置为“Microsoft”。Storage/Blob' 用于类型 BlobOutputDataSource。 设置为“Microsoft”。Storage/DocumentDB' 用于类型 DocumentDbOutputDataSource。 设置为“Microsoft”。Storage/Table' for type AzureTableOutputDataSource. 将类型 PowerBIOutputDataSource 设置为“PowerBI”。 | 'GatewayMessageBus' “Microsoft。AzureFunction' “Microsoft。DataLake/Accounts' “Microsoft。EventHub/EventHub” “Microsoft。服务巴士/活动中心 “Microsoft。服务总线/队列” “Microsoft。服务总线/主题” “Microsoft。Sql/Server/Database' “Microsoft。Sql/Server/DataWarehouse' “Microsoft。储存/斑块 “Microsoft。存储/文档数据库” “Microsoft。存储/表格 “PowerBI”(必需) |
OutputProperties
| Name | Description | Value |
|---|---|---|
| datasource | 描述输出将写入到的数据源。 PUT (CreateOrReplace) 请求时是必需的。 | OutputDataSource |
| 序列化 | 描述如何序列化输入中的数据,或将数据写入输出时如何序列化数据。 PUT (CreateOrReplace) 请求时是必需的。 | Serialization |
| sizeWindow | 要限制流分析输出的大小窗口。 | int |
| timeWindow | 筛选流分析作业输出的时间范围。 | 字符串 |
ParquetSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 Parquet 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | any |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | “镶木地板”(必填) |
PowerBIOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 这些属性与 Power BI 输出相关。 PUT (CreateOrReplace) 请求时是必需的。 | PowerBIOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “PowerBI”(必需) |
PowerBIOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| 数据集 | Power BI数据集的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| groupId | Power BI 组的 ID。 | 字符串 |
| groupName | 这是 Power BI 组的名称。 利用这个属性帮助记住使用的是哪个特定的 Power BI 组 ID。 | 字符串 |
| refreshToken | 一个刷新令牌,可用于获取有效的访问令牌,然后可用于向数据源进行身份验证。 有效的刷新令牌目前只能通过 Azure 门户 获得。 建议在创建数据源时在这里输入一个虚拟字符串值,然后进入 Azure 门户 认证数据源,这样该属性会用有效的刷新令牌更新。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | 指定数据集下的 Power BI 表名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| tokenUserDisplayName | 用于获取刷新令牌的用户的用户显示名称。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
| tokenUserPrincipalName | 用于获取刷新令牌的用户的用户主体名称(UPN)。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
Serialization
| Name | Description | Value |
|---|---|---|
| 类型 | 将 AvroSerialization 类型设置为“Avro”。 对于 CsvSerialization 类型,设置为“Csv”。 对于 类型 JsonSerialization,设置为“Json”。 将类型 ParquetSerialization 设置为“Parquet”。 | 'Avro' 'Csv' 'Json' “镶木地板”(必填) |
ServiceBusQueueOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 服务总线 Queue 相关的属性输出。 PUT (CreateOrReplace) 请求时是必需的。 | ServiceBusQueueOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/Queue'(必填) |
ServiceBusQueueOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| propertyColumns | 一个字符串数组,包含输出列名,作为自定义属性附加于 服务总线 消息。 | string[] |
| queueName | 服务总线队伍的名字。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
| systemPropertyColumns | 与服务总线队列相关的系统属性。 支持以下系统属性:ReplyToSessionId、ContentType、To、Subject、CorrelationId、TimeToLive、PartitionKey、SessionId、ScheduledEnqueueTime、MessageId、ReplyTo、Label、ScheduledEnqueueTimeUtc。 | any |
ServiceBusTopicOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 服务总线 Topic 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | ServiceBusTopicOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/Topic'(必填) |
ServiceBusTopicOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| propertyColumns | 一个字符串数组,包含输出列名,作为自定义属性附加于 服务总线 消息。 | string[] |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
| systemPropertyColumns | 系统属性与 服务总线 主题输出相关。 支持以下系统属性:ReplyToSessionId、ContentType、To、Subject、CorrelationId、TimeToLive、PartitionKey、SessionId、ScheduledEnqueueTime、MessageId、ReplyTo、Label、ScheduledEnqueueTimeUtc。 | ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns |
| topicName | 服务总线 Topic 的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns
| Name | Description | Value |
|---|
StorageAccount
| Name | Description | Value |
|---|---|---|
| accountKey | Azure 存储账户的账户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| accountName | Azure 存储账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
ARM 模板资源定义
可以使用目标操作部署流式处理作业/输出资源类型:
用法示例
资源格式
去创造一个Microsoft。StreamAnalytics/streamingjobs/outputs 资源,给模板添加以下 JSON 代码。
{
"type": "Microsoft.StreamAnalytics/streamingjobs/outputs",
"apiVersion": "2020-03-01",
"name": "string",
"properties": {
"datasource": {
"type": "string"
// For remaining properties, see OutputDataSource objects
},
"serialization": {
"type": "string"
// For remaining properties, see Serialization objects
},
"sizeWindow": "int",
"timeWindow": "string"
}
}
序列化对象
设置 type 属性以指定对象的类型。
对于 Avro,请使用:
{
"properties": {},
"type": "Avro"
}
对于 Csv,请使用:
{
"properties": {
"encoding": "string",
"fieldDelimiter": "string"
},
"type": "Csv"
}
对于 Json,请使用:
{
"properties": {
"encoding": "string",
"format": "string"
},
"type": "Json"
}
对于 镶木地板,使用:
{
"properties": {},
"type": "Parquet"
}
OutputDataSource 对象
设置 type 属性以指定对象的类型。
对于 GatewayMessageBus,请使用:
{
"properties": {
"topic": "string"
},
"type": "GatewayMessageBus"
}
对于Microsoft。AzureFunction, use:
{
"properties": {
"apiKey": "string",
"functionAppName": "string",
"functionName": "string",
"maxBatchCount": "int",
"maxBatchSize": "int"
},
"type": "Microsoft.AzureFunction"
}
对于Microsoft。DataLake/Accounts,使用:
{
"properties": {
"accountName": "string",
"authenticationMode": "string",
"dateFormat": "string",
"filePathPrefix": "string",
"refreshToken": "string",
"tenantId": "string",
"timeFormat": "string",
"tokenUserDisplayName": "string",
"tokenUserPrincipalName": "string"
},
"type": "Microsoft.DataLake/Accounts"
}
对于Microsoft。EventHub/EventHub,请使用:
{
"properties": {
"authenticationMode": "string",
"eventHubName": "string",
"partitionKey": "string",
"propertyColumns": [ "string" ],
"serviceBusNamespace": "string",
"sharedAccessPolicyKey": "string",
"sharedAccessPolicyName": "string"
},
"type": "Microsoft.EventHub/EventHub"
}
对于Microsoft。ServiceBus/EventHub,使用:
{
"properties": {
"authenticationMode": "string",
"eventHubName": "string",
"partitionKey": "string",
"propertyColumns": [ "string" ],
"serviceBusNamespace": "string",
"sharedAccessPolicyKey": "string",
"sharedAccessPolicyName": "string"
},
"type": "Microsoft.ServiceBus/EventHub"
}
对于Microsoft。ServiceBus/Queue,使用:
{
"properties": {
"authenticationMode": "string",
"propertyColumns": [ "string" ],
"queueName": "string",
"serviceBusNamespace": "string",
"sharedAccessPolicyKey": "string",
"sharedAccessPolicyName": "string",
"systemPropertyColumns": {}
},
"type": "Microsoft.ServiceBus/Queue"
}
对于Microsoft。ServiceBus/Topic,使用:
{
"properties": {
"authenticationMode": "string",
"propertyColumns": [ "string" ],
"serviceBusNamespace": "string",
"sharedAccessPolicyKey": "string",
"sharedAccessPolicyName": "string",
"systemPropertyColumns": {
"{customized property}": "string"
},
"topicName": "string"
},
"type": "Microsoft.ServiceBus/Topic"
}
对于Microsoft。Sql/Server/DataWarehouse,使用:
{
"properties": {
"database": "string",
"password": "string",
"server": "string",
"table": "string",
"user": "string"
},
"type": "Microsoft.Sql/Server/DataWarehouse"
}
对于Microsoft。Sql/Server/Database,使用:
{
"properties": {
"authenticationMode": "string",
"database": "string",
"maxBatchCount": "int",
"maxWriterCount": "int",
"password": "string",
"server": "string",
"table": "string",
"user": "string"
},
"type": "Microsoft.Sql/Server/Database"
}
对于Microsoft。存储/Blob,使用:
{
"properties": {
"authenticationMode": "string",
"blobPathPrefix": "string",
"container": "string",
"dateFormat": "string",
"pathPattern": "string",
"storageAccounts": [
{
"accountKey": "string",
"accountName": "string"
}
],
"timeFormat": "string"
},
"type": "Microsoft.Storage/Blob"
}
对于Microsoft。Storage/DocumentDB,使用:
{
"properties": {
"accountId": "string",
"accountKey": "string",
"collectionNamePattern": "string",
"database": "string",
"documentId": "string",
"partitionKey": "string"
},
"type": "Microsoft.Storage/DocumentDB"
}
对于Microsoft。存储/表,使用:
{
"properties": {
"accountKey": "string",
"accountName": "string",
"batchSize": "int",
"columnsToRemove": [ "string" ],
"partitionKey": "string",
"rowKey": "string",
"table": "string"
},
"type": "Microsoft.Storage/Table"
}
对于 PowerBI,请使用:
{
"properties": {
"authenticationMode": "string",
"dataset": "string",
"groupId": "string",
"groupName": "string",
"refreshToken": "string",
"table": "string",
"tokenUserDisplayName": "string",
"tokenUserPrincipalName": "string"
},
"type": "PowerBI"
}
属性值
Microsoft。StreamAnalytics/streamingjobs/outputs
| Name | Description | Value |
|---|---|---|
| apiVersion | API 版本 | '2020-03-01' |
| name | 资源名称 | string (必需) |
| properties | 与输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | OutputProperties |
| 类型 | 资源类型 | “Microsoft。StreamAnalytics/streamingjobs/outputs' |
AvroSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 Avro 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | any |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Avro'(必填) |
AzureDataLakeStoreOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure Data Lake Store 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureDataLakeStoreOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。DataLake/Accounts'(必填) |
AzureDataLakeStoreOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountName | Azure Data Lake Store 账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| dateFormat | 日期格式。 无论 {date} 出现在 filePathPrefix 中,此属性的值将改为用作日期格式。 | 字符串 |
| filePathPrefix | 输出应写入到的文件的位置。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| refreshToken | 一个刷新令牌,可用于获取有效的访问令牌,然后可用于向数据源进行身份验证。 有效的刷新令牌目前只能通过 Azure 门户 获得。 建议在创建数据源时在这里输入一个虚拟字符串值,然后进入 Azure 门户 认证数据源,这样该属性会用有效的刷新令牌更新。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| tenantId | 用于获取刷新令牌的用户的租户 ID。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| timeFormat | 时间格式。 无论 {time} 出现在 filePathPrefix 中,此属性的值将改为用作时间格式。 | 字符串 |
| tokenUserDisplayName | 用于获取刷新令牌的用户的用户显示名称。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
| tokenUserPrincipalName | 用于获取刷新令牌的用户的用户主体名称(UPN)。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
AzureFunctionOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 这些属性与 Azure 函数输出关联。 PUT (CreateOrReplace) 请求时是必需的。 | AzureFunctionOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。AzureFunction' (required) |
AzureFunctionOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| apiKey | 如果你想使用其他订阅的 Azure 函数,可以通过提供访问该函数的密钥来实现。 | 字符串 |
| functionAppName | 你的 Azure Functions 应用名称。 | 字符串 |
| functionName | 你 Azure Functions 应用中的函数名称。 | 字符串 |
| maxBatchCount | 这是一个属性,可以指定每个发送到 Azure Functions 的批次中最大事件数。 默认值为 100。 | int |
| maxBatchSize | 这是一个属性,可以让你为发送到Azure函数的每个输出批次设置最大大小。 输入单位为字节。 默认情况下,此值为 262,144 字节(256 KB)。 | int |
AzureSqlDatabaseOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure SQL 数据库输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureSqlDatabaseOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。Sql/Server/Database'(必填) |
AzureSqlDatabaseOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| 数据库 | Azure SQL 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| maxBatchCount | 写入 Sql 数据库的最大 Batch 计数,默认值为 10,000。 PUT 请求可选。 | int |
| maxWriterCount | 最大编写器计数,目前仅提供 1(单个编写器)和 0(基于查询分区)。 PUT 请求可选。 | int |
| 密码 | 连接Azure SQL数据库的密码。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 服务器 | 包含Azure SQL数据库的SQL服务器名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure SQL 数据库中表的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 用户 | 将用于连接Azure SQL数据库的用户名。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
AzureSynapseOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure Synapse 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureSynapseOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。Sql/Server/DataWarehouse'(必填) |
AzureSynapseOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| 数据库 | Azure SQL 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 密码 | 连接Azure SQL数据库的密码。 PUT (CreateOrReplace) 请求时是必需的。 | string Constraints: 敏感值。 以安全参数的形式传入。 |
| 服务器 | 包含Azure SQL数据库的SQL服务器名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure SQL 数据库中表的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 用户 | 将用于连接Azure SQL数据库的用户名。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
AzureTableOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure 表输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureTableOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/表格“(必备) |
AzureTableOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountKey | Azure 存储账户的账户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | string Constraints: 敏感值。 以安全参数的形式传入。 |
| accountName | Azure 存储账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| batchSize | 每次写入 Azure 表的行数。 | int |
| columnsToRemove | 如果指定,则数组中的每个项都是要从输出事件实体中删除的列的名称(如果存在)。 | string[] |
| partitionKey | 该元素表示查询中 SELECT 语句中的列名,该列将用作 Azure 表的分区键。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| rowKey | 该元素表示查询中 SELECT 语句中的列名,该列将用作 Azure 表的行键。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure 表格的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
BlobOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Blob 输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | BlobOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/Blob'(必填) |
BlobOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| blobPathPrefix | Blob 路径前缀。 | 字符串 |
| 容器 | 关联的存储帐户中的容器的名称。 此容器包含要从中读取或写入到的 blob(s)。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| dateFormat | 日期格式。 无论 {date} 出现在 pathPattern 中,此属性的值将改为用作日期格式。 | 字符串 |
| pathPattern | Blob 路径模式。 不是正则表达式。 它表示将匹配 Blob 名称的模式,以确定它们是否应作为作业的输入或输出包含在内。 有关更详细的说明和示例,请参阅 /rest/api/streamanalytics/streamanalytics/streamanalytics/stream-analytics-output。 | 字符串 |
| storageAccounts | 一个或多个 Azure 存储 账户列表。 PUT (CreateOrReplace) 请求时是必需的。 | StorageAccount[] |
| timeFormat | 时间格式。 无论 {time} 出现在 pathPattern 中,此属性的值将改为用作时间格式。 | 字符串 |
CsvSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 CSV 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | CsvSerializationProperties |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Csv'(必填) |
CsvSerializationProperties
| Name | Description | Value |
|---|---|---|
| 编码 | 指定传入数据的编码(在输入的情况下)和输出时传出数据的编码。 PUT (CreateOrReplace) 请求时是必需的。 | 'UTF8' |
| fieldDelimiter | 指定将用于分隔逗号分隔值 (CSV) 记录的分隔符。 有关支持的值列表,请参阅 /rest/api/streamanalytics/streamanalytics/streamanalytics/stream-analytics-output。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
DocumentDbOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 DocumentDB 输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | DocumentDbOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/文档数据库“(必备) |
DocumentDbOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountId | DocumentDB 帐户名称或 ID。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| accountKey | DocumentDB 帐户的帐户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| collectionNamePattern | 要使用的集合的集合名称模式。 可以使用可选的 {partition} 标记构造集合名称格式,其中分区从 0 开始。 有关详细信息,请参阅 /rest/api/streamanalytics/stream-analytics-output 的 DocumentDB 部分。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 数据库 | DocumentDB 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| documentId | 输出事件中用于指定插入或更新操作所基于的主键的字段的名称。 | 字符串 |
| partitionKey | 输出事件中用于指定键以跨集合对输出进行分区的字段的名称。 如果“collectionNamePattern”包含 {partition} 标记,则需要指定此属性。 | 字符串 |
EventHubOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与事件中心输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | EventHubOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/EventHub'(必填) |
EventHubOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| eventHubName | 事件中心的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| partitionKey | 用于确定要发送事件数据的分区的键/列。 | 字符串 |
| propertyColumns | 与此事件中心输出关联的属性。 | string[] |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
EventHubV2OutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与事件中心输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | EventHubOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。EventHub/EventHub'(必填) |
GatewayMessageBusOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与网关消息总线输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | GatewayMessageBusOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'GatewayMessageBus'(必需) |
GatewayMessageBusOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| 主题 | 服务总线 主题的名称。 | 字符串 |
JsonSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 JSON 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | JsonSerializationProperties |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Json'(必填) |
JsonSerializationProperties
| Name | Description | Value |
|---|---|---|
| 编码 | 指定传入数据的编码(在输入的情况下)和输出时传出数据的编码。 PUT (CreateOrReplace) 请求时是必需的。 | 'UTF8' |
| format | 此属性仅适用于输出的 JSON 序列化。 它不适用于输入。 此属性指定输出将写入的 JSON 的格式。 当前支持的值是“lineSeparated”,指示输出将设置格式,方法是让每个 JSON 对象用新行分隔,“array”指示输出将格式化为 JSON 对象的数组。 如果为 null,则默认值为“lineSeparated”。 | 'Array' 'LineSeparated' |
OutputDataSource
| Name | Description | Value |
|---|---|---|
| 类型 | 对于 类型 GatewayMessageBusOutputDataSource,设置为“GatewayMessageBus”。 设置为“Microsoft”。AzureFunction' for type AzureFunctionOutputDataSource. 设置为“Microsoft”。DataLake/Accounts' for type AzureDataLakeStoreOutputDataSource. 设置为“Microsoft”。EventHub/EventHub' for type EventHubV2OutputDataSource. 设置为“Microsoft”。ServiceBus/EventHub' for type EventHubOutputDataSource. 设置为“Microsoft”。ServiceBus/Queue' 用于类型 ServiceBusQueueOutputDataSource。 设置为“Microsoft”。ServiceBus/Topic' 用于类型 ServiceBusTopicOutputDataSource。 设置为“Microsoft”。Sql/Server/DataWarehouse' for type AzureSynapseOutputDataSource. 设置为“Microsoft”。Sql/Server/Database' for type AzureSqlDatabaseOutputDataSource. 设置为“Microsoft”。Storage/Blob' 用于类型 BlobOutputDataSource。 设置为“Microsoft”。Storage/DocumentDB' 用于类型 DocumentDbOutputDataSource。 设置为“Microsoft”。Storage/Table' for type AzureTableOutputDataSource. 将类型 PowerBIOutputDataSource 设置为“PowerBI”。 | 'GatewayMessageBus' “Microsoft。AzureFunction' “Microsoft。DataLake/Accounts' “Microsoft。EventHub/EventHub” “Microsoft。服务巴士/活动中心 “Microsoft。服务总线/队列” “Microsoft。服务总线/主题” “Microsoft。Sql/Server/Database' “Microsoft。Sql/Server/DataWarehouse' “Microsoft。储存/斑块 “Microsoft。存储/文档数据库” “Microsoft。存储/表格 “PowerBI”(必需) |
OutputProperties
| Name | Description | Value |
|---|---|---|
| datasource | 描述输出将写入到的数据源。 PUT (CreateOrReplace) 请求时是必需的。 | OutputDataSource |
| 序列化 | 描述如何序列化输入中的数据,或将数据写入输出时如何序列化数据。 PUT (CreateOrReplace) 请求时是必需的。 | Serialization |
| sizeWindow | 要限制流分析输出的大小窗口。 | int |
| timeWindow | 筛选流分析作业输出的时间范围。 | 字符串 |
ParquetSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 Parquet 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | any |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | “镶木地板”(必填) |
PowerBIOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 这些属性与 Power BI 输出相关。 PUT (CreateOrReplace) 请求时是必需的。 | PowerBIOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “PowerBI”(必需) |
PowerBIOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| 数据集 | Power BI数据集的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| groupId | Power BI 组的 ID。 | 字符串 |
| groupName | 这是 Power BI 组的名称。 利用这个属性帮助记住使用的是哪个特定的 Power BI 组 ID。 | 字符串 |
| refreshToken | 一个刷新令牌,可用于获取有效的访问令牌,然后可用于向数据源进行身份验证。 有效的刷新令牌目前只能通过 Azure 门户 获得。 建议在创建数据源时在这里输入一个虚拟字符串值,然后进入 Azure 门户 认证数据源,这样该属性会用有效的刷新令牌更新。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | 指定数据集下的 Power BI 表名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| tokenUserDisplayName | 用于获取刷新令牌的用户的用户显示名称。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
| tokenUserPrincipalName | 用于获取刷新令牌的用户的用户主体名称(UPN)。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
Serialization
| Name | Description | Value |
|---|---|---|
| 类型 | 将 AvroSerialization 类型设置为“Avro”。 对于 CsvSerialization 类型,设置为“Csv”。 对于 类型 JsonSerialization,设置为“Json”。 将类型 ParquetSerialization 设置为“Parquet”。 | 'Avro' 'Csv' 'Json' “镶木地板”(必填) |
ServiceBusQueueOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 服务总线 Queue 相关的属性输出。 PUT (CreateOrReplace) 请求时是必需的。 | ServiceBusQueueOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/Queue'(必填) |
ServiceBusQueueOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| propertyColumns | 一个字符串数组,包含输出列名,作为自定义属性附加于 服务总线 消息。 | string[] |
| queueName | 服务总线队伍的名字。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
| systemPropertyColumns | 与服务总线队列相关的系统属性。 支持以下系统属性:ReplyToSessionId、ContentType、To、Subject、CorrelationId、TimeToLive、PartitionKey、SessionId、ScheduledEnqueueTime、MessageId、ReplyTo、Label、ScheduledEnqueueTimeUtc。 | any |
ServiceBusTopicOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 服务总线 Topic 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | ServiceBusTopicOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/Topic'(必填) |
ServiceBusTopicOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| propertyColumns | 一个字符串数组,包含输出列名,作为自定义属性附加于 服务总线 消息。 | string[] |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
| systemPropertyColumns | 系统属性与 服务总线 主题输出相关。 支持以下系统属性:ReplyToSessionId、ContentType、To、Subject、CorrelationId、TimeToLive、PartitionKey、SessionId、ScheduledEnqueueTime、MessageId、ReplyTo、Label、ScheduledEnqueueTimeUtc。 | ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns |
| topicName | 服务总线 Topic 的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns
| Name | Description | Value |
|---|
StorageAccount
| Name | Description | Value |
|---|---|---|
| accountKey | Azure 存储账户的账户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| accountName | Azure 存储账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
Terraform (AzAPI 提供程序)资源定义
可以使用目标操作部署流式处理作业/输出资源类型:
- 资源组 关于每个API版本中变更属性的列表,请参见 更改日志。
用法示例
Terraform 示例
部署流分析输出表的基本示例。
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "streamingJob" {
type = "Microsoft.StreamAnalytics/streamingJobs@2020-03-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
cluster = {
}
compatibilityLevel = "1.0"
contentStoragePolicy = "SystemAccount"
dataLocale = "en-GB"
eventsLateArrivalMaxDelayInSeconds = 60
eventsOutOfOrderMaxDelayInSeconds = 50
eventsOutOfOrderPolicy = "Adjust"
jobType = "Cloud"
outputErrorPolicy = "Drop"
sku = {
name = "Standard"
}
transformation = {
name = "main"
properties = {
query = " SELECT *\n INTO [YourOutputAlias]\n FROM [YourInputAlias]\n"
streamingUnits = 3
}
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "storageAccount" {
type = "Microsoft.Storage/storageAccounts@2021-09-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
kind = "StorageV2"
properties = {
accessTier = "Hot"
allowBlobPublicAccess = true
allowCrossTenantReplication = true
allowSharedKeyAccess = true
defaultToOAuthAuthentication = false
encryption = {
keySource = "Microsoft.Storage"
services = {
queue = {
keyType = "Service"
}
table = {
keyType = "Service"
}
}
}
isHnsEnabled = false
isNfsV3Enabled = false
isSftpEnabled = false
minimumTlsVersion = "TLS1_2"
networkAcls = {
defaultAction = "Allow"
}
publicNetworkAccess = "Enabled"
supportsHttpsTrafficOnly = true
}
sku = {
name = "Standard_LRS"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
data "azapi_resource_action" "listKeys" {
type = "Microsoft.Storage/storageAccounts@2021-09-01"
resource_id = azapi_resource.storageAccount.id
action = "listKeys"
response_export_values = ["*"]
}
resource "azapi_resource" "output" {
type = "Microsoft.StreamAnalytics/streamingJobs/outputs@2021-10-01-preview"
parent_id = azapi_resource.streamingJob.id
name = var.resource_name
body = {
properties = {
datasource = {
properties = {
accountKey = data.azapi_resource_action.listKeys.output.keys[0].value
accountName = azapi_resource.storageAccount.name
batchSize = 100
partitionKey = "foo"
rowKey = "bar"
table = "foobar"
}
type = "Microsoft.Storage/Table"
}
serialization = null
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
资源格式
去创造一个Microsoft。StreamAnalytics/streamingjobs/outputs 资源,将以下 Terraform 添加到你的模板中。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.StreamAnalytics/streamingjobs/outputs@2020-03-01"
name = "string"
parent_id = "string"
body = {
properties = {
datasource = {
type = "string"
// For remaining properties, see OutputDataSource objects
}
serialization = {
type = "string"
// For remaining properties, see Serialization objects
}
sizeWindow = int
timeWindow = "string"
}
}
}
序列化对象
设置 type 属性以指定对象的类型。
对于 Avro,请使用:
{
properties = ?
type = "Avro"
}
对于 Csv,请使用:
{
properties = {
encoding = "string"
fieldDelimiter = "string"
}
type = "Csv"
}
对于 Json,请使用:
{
properties = {
encoding = "string"
format = "string"
}
type = "Json"
}
对于 镶木地板,使用:
{
properties = ?
type = "Parquet"
}
OutputDataSource 对象
设置 type 属性以指定对象的类型。
对于 GatewayMessageBus,请使用:
{
properties = {
topic = "string"
}
type = "GatewayMessageBus"
}
对于Microsoft。AzureFunction, use:
{
properties = {
apiKey = "string"
functionAppName = "string"
functionName = "string"
maxBatchCount = int
maxBatchSize = int
}
type = "Microsoft.AzureFunction"
}
对于Microsoft。DataLake/Accounts,使用:
{
properties = {
accountName = "string"
authenticationMode = "string"
dateFormat = "string"
filePathPrefix = "string"
refreshToken = "string"
tenantId = "string"
timeFormat = "string"
tokenUserDisplayName = "string"
tokenUserPrincipalName = "string"
}
type = "Microsoft.DataLake/Accounts"
}
对于Microsoft。EventHub/EventHub,请使用:
{
properties = {
authenticationMode = "string"
eventHubName = "string"
partitionKey = "string"
propertyColumns = [
"string"
]
serviceBusNamespace = "string"
sharedAccessPolicyKey = "string"
sharedAccessPolicyName = "string"
}
type = "Microsoft.EventHub/EventHub"
}
对于Microsoft。ServiceBus/EventHub,使用:
{
properties = {
authenticationMode = "string"
eventHubName = "string"
partitionKey = "string"
propertyColumns = [
"string"
]
serviceBusNamespace = "string"
sharedAccessPolicyKey = "string"
sharedAccessPolicyName = "string"
}
type = "Microsoft.ServiceBus/EventHub"
}
对于Microsoft。ServiceBus/Queue,使用:
{
properties = {
authenticationMode = "string"
propertyColumns = [
"string"
]
queueName = "string"
serviceBusNamespace = "string"
sharedAccessPolicyKey = "string"
sharedAccessPolicyName = "string"
systemPropertyColumns = ?
}
type = "Microsoft.ServiceBus/Queue"
}
对于Microsoft。ServiceBus/Topic,使用:
{
properties = {
authenticationMode = "string"
propertyColumns = [
"string"
]
serviceBusNamespace = "string"
sharedAccessPolicyKey = "string"
sharedAccessPolicyName = "string"
systemPropertyColumns = {
{customized property} = "string"
}
topicName = "string"
}
type = "Microsoft.ServiceBus/Topic"
}
对于Microsoft。Sql/Server/DataWarehouse,使用:
{
properties = {
database = "string"
password = "string"
server = "string"
table = "string"
user = "string"
}
type = "Microsoft.Sql/Server/DataWarehouse"
}
对于Microsoft。Sql/Server/Database,使用:
{
properties = {
authenticationMode = "string"
database = "string"
maxBatchCount = int
maxWriterCount = int
password = "string"
server = "string"
table = "string"
user = "string"
}
type = "Microsoft.Sql/Server/Database"
}
对于Microsoft。存储/Blob,使用:
{
properties = {
authenticationMode = "string"
blobPathPrefix = "string"
container = "string"
dateFormat = "string"
pathPattern = "string"
storageAccounts = [
{
accountKey = "string"
accountName = "string"
}
]
timeFormat = "string"
}
type = "Microsoft.Storage/Blob"
}
对于Microsoft。Storage/DocumentDB,使用:
{
properties = {
accountId = "string"
accountKey = "string"
collectionNamePattern = "string"
database = "string"
documentId = "string"
partitionKey = "string"
}
type = "Microsoft.Storage/DocumentDB"
}
对于Microsoft。存储/表,使用:
{
properties = {
accountKey = "string"
accountName = "string"
batchSize = int
columnsToRemove = [
"string"
]
partitionKey = "string"
rowKey = "string"
table = "string"
}
type = "Microsoft.Storage/Table"
}
对于 PowerBI,请使用:
{
properties = {
authenticationMode = "string"
dataset = "string"
groupId = "string"
groupName = "string"
refreshToken = "string"
table = "string"
tokenUserDisplayName = "string"
tokenUserPrincipalName = "string"
}
type = "PowerBI"
}
属性值
Microsoft。StreamAnalytics/streamingjobs/outputs
| Name | Description | Value |
|---|---|---|
| name | 资源名称 | string (必需) |
| parent_id | 此资源的父资源的 ID。 | 类型为:streamingjobs 的资源 ID |
| properties | 与输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | OutputProperties |
| 类型 | 资源类型 | “Microsoft。StreamAnalytics/streamingjobs/outputs@2020-03-01” |
AvroSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 Avro 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | any |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Avro'(必填) |
AzureDataLakeStoreOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure Data Lake Store 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureDataLakeStoreOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。DataLake/Accounts'(必填) |
AzureDataLakeStoreOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountName | Azure Data Lake Store 账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| dateFormat | 日期格式。 无论 {date} 出现在 filePathPrefix 中,此属性的值将改为用作日期格式。 | 字符串 |
| filePathPrefix | 输出应写入到的文件的位置。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| refreshToken | 一个刷新令牌,可用于获取有效的访问令牌,然后可用于向数据源进行身份验证。 有效的刷新令牌目前只能通过 Azure 门户 获得。 建议在创建数据源时在这里输入一个虚拟字符串值,然后进入 Azure 门户 认证数据源,这样该属性会用有效的刷新令牌更新。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| tenantId | 用于获取刷新令牌的用户的租户 ID。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| timeFormat | 时间格式。 无论 {time} 出现在 filePathPrefix 中,此属性的值将改为用作时间格式。 | 字符串 |
| tokenUserDisplayName | 用于获取刷新令牌的用户的用户显示名称。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
| tokenUserPrincipalName | 用于获取刷新令牌的用户的用户主体名称(UPN)。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
AzureFunctionOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 这些属性与 Azure 函数输出关联。 PUT (CreateOrReplace) 请求时是必需的。 | AzureFunctionOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。AzureFunction' (required) |
AzureFunctionOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| apiKey | 如果你想使用其他订阅的 Azure 函数,可以通过提供访问该函数的密钥来实现。 | 字符串 |
| functionAppName | 你的 Azure Functions 应用名称。 | 字符串 |
| functionName | 你 Azure Functions 应用中的函数名称。 | 字符串 |
| maxBatchCount | 这是一个属性,可以指定每个发送到 Azure Functions 的批次中最大事件数。 默认值为 100。 | int |
| maxBatchSize | 这是一个属性,可以让你为发送到Azure函数的每个输出批次设置最大大小。 输入单位为字节。 默认情况下,此值为 262,144 字节(256 KB)。 | int |
AzureSqlDatabaseOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure SQL 数据库输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureSqlDatabaseOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。Sql/Server/Database'(必填) |
AzureSqlDatabaseOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| 数据库 | Azure SQL 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| maxBatchCount | 写入 Sql 数据库的最大 Batch 计数,默认值为 10,000。 PUT 请求可选。 | int |
| maxWriterCount | 最大编写器计数,目前仅提供 1(单个编写器)和 0(基于查询分区)。 PUT 请求可选。 | int |
| 密码 | 连接Azure SQL数据库的密码。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 服务器 | 包含Azure SQL数据库的SQL服务器名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure SQL 数据库中表的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 用户 | 将用于连接Azure SQL数据库的用户名。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
AzureSynapseOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure Synapse 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureSynapseOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。Sql/Server/DataWarehouse'(必填) |
AzureSynapseOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| 数据库 | Azure SQL 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 密码 | 连接Azure SQL数据库的密码。 PUT (CreateOrReplace) 请求时是必需的。 | string Constraints: 敏感值。 以安全参数的形式传入。 |
| 服务器 | 包含Azure SQL数据库的SQL服务器名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure SQL 数据库中表的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 用户 | 将用于连接Azure SQL数据库的用户名。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
AzureTableOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Azure 表输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | AzureTableOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/表格“(必备) |
AzureTableOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountKey | Azure 存储账户的账户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | string Constraints: 敏感值。 以安全参数的形式传入。 |
| accountName | Azure 存储账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| batchSize | 每次写入 Azure 表的行数。 | int |
| columnsToRemove | 如果指定,则数组中的每个项都是要从输出事件实体中删除的列的名称(如果存在)。 | string[] |
| partitionKey | 该元素表示查询中 SELECT 语句中的列名,该列将用作 Azure 表的分区键。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| rowKey | 该元素表示查询中 SELECT 语句中的列名,该列将用作 Azure 表的行键。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | Azure 表格的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
BlobOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 Blob 输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | BlobOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/Blob'(必填) |
BlobOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| blobPathPrefix | Blob 路径前缀。 | 字符串 |
| 容器 | 关联的存储帐户中的容器的名称。 此容器包含要从中读取或写入到的 blob(s)。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| dateFormat | 日期格式。 无论 {date} 出现在 pathPattern 中,此属性的值将改为用作日期格式。 | 字符串 |
| pathPattern | Blob 路径模式。 不是正则表达式。 它表示将匹配 Blob 名称的模式,以确定它们是否应作为作业的输入或输出包含在内。 有关更详细的说明和示例,请参阅 /rest/api/streamanalytics/streamanalytics/streamanalytics/stream-analytics-output。 | 字符串 |
| storageAccounts | 一个或多个 Azure 存储 账户列表。 PUT (CreateOrReplace) 请求时是必需的。 | StorageAccount[] |
| timeFormat | 时间格式。 无论 {time} 出现在 pathPattern 中,此属性的值将改为用作时间格式。 | 字符串 |
CsvSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 CSV 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | CsvSerializationProperties |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Csv'(必填) |
CsvSerializationProperties
| Name | Description | Value |
|---|---|---|
| 编码 | 指定传入数据的编码(在输入的情况下)和输出时传出数据的编码。 PUT (CreateOrReplace) 请求时是必需的。 | 'UTF8' |
| fieldDelimiter | 指定将用于分隔逗号分隔值 (CSV) 记录的分隔符。 有关支持的值列表,请参阅 /rest/api/streamanalytics/streamanalytics/streamanalytics/stream-analytics-output。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
DocumentDbOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 DocumentDB 输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | DocumentDbOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。存储/文档数据库“(必备) |
DocumentDbOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| accountId | DocumentDB 帐户名称或 ID。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| accountKey | DocumentDB 帐户的帐户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| collectionNamePattern | 要使用的集合的集合名称模式。 可以使用可选的 {partition} 标记构造集合名称格式,其中分区从 0 开始。 有关详细信息,请参阅 /rest/api/streamanalytics/stream-analytics-output 的 DocumentDB 部分。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 数据库 | DocumentDB 数据库的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| documentId | 输出事件中用于指定插入或更新操作所基于的主键的字段的名称。 | 字符串 |
| partitionKey | 输出事件中用于指定键以跨集合对输出进行分区的字段的名称。 如果“collectionNamePattern”包含 {partition} 标记,则需要指定此属性。 | 字符串 |
EventHubOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与事件中心输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | EventHubOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/EventHub'(必填) |
EventHubOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| eventHubName | 事件中心的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| partitionKey | 用于确定要发送事件数据的分区的键/列。 | 字符串 |
| propertyColumns | 与此事件中心输出关联的属性。 | string[] |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
EventHubV2OutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与事件中心输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | EventHubOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。EventHub/EventHub'(必填) |
GatewayMessageBusOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与网关消息总线输出关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | GatewayMessageBusOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'GatewayMessageBus'(必需) |
GatewayMessageBusOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| 主题 | 服务总线 主题的名称。 | 字符串 |
JsonSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 JSON 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | JsonSerializationProperties |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | 'Json'(必填) |
JsonSerializationProperties
| Name | Description | Value |
|---|---|---|
| 编码 | 指定传入数据的编码(在输入的情况下)和输出时传出数据的编码。 PUT (CreateOrReplace) 请求时是必需的。 | 'UTF8' |
| format | 此属性仅适用于输出的 JSON 序列化。 它不适用于输入。 此属性指定输出将写入的 JSON 的格式。 当前支持的值是“lineSeparated”,指示输出将设置格式,方法是让每个 JSON 对象用新行分隔,“array”指示输出将格式化为 JSON 对象的数组。 如果为 null,则默认值为“lineSeparated”。 | 'Array' 'LineSeparated' |
OutputDataSource
| Name | Description | Value |
|---|---|---|
| 类型 | 对于 类型 GatewayMessageBusOutputDataSource,设置为“GatewayMessageBus”。 设置为“Microsoft”。AzureFunction' for type AzureFunctionOutputDataSource. 设置为“Microsoft”。DataLake/Accounts' for type AzureDataLakeStoreOutputDataSource. 设置为“Microsoft”。EventHub/EventHub' for type EventHubV2OutputDataSource. 设置为“Microsoft”。ServiceBus/EventHub' for type EventHubOutputDataSource. 设置为“Microsoft”。ServiceBus/Queue' 用于类型 ServiceBusQueueOutputDataSource。 设置为“Microsoft”。ServiceBus/Topic' 用于类型 ServiceBusTopicOutputDataSource。 设置为“Microsoft”。Sql/Server/DataWarehouse' for type AzureSynapseOutputDataSource. 设置为“Microsoft”。Sql/Server/Database' for type AzureSqlDatabaseOutputDataSource. 设置为“Microsoft”。Storage/Blob' 用于类型 BlobOutputDataSource。 设置为“Microsoft”。Storage/DocumentDB' 用于类型 DocumentDbOutputDataSource。 设置为“Microsoft”。Storage/Table' for type AzureTableOutputDataSource. 将类型 PowerBIOutputDataSource 设置为“PowerBI”。 | 'GatewayMessageBus' “Microsoft。AzureFunction' “Microsoft。DataLake/Accounts' “Microsoft。EventHub/EventHub” “Microsoft。服务巴士/活动中心 “Microsoft。服务总线/队列” “Microsoft。服务总线/主题” “Microsoft。Sql/Server/Database' “Microsoft。Sql/Server/DataWarehouse' “Microsoft。储存/斑块 “Microsoft。存储/文档数据库” “Microsoft。存储/表格 “PowerBI”(必需) |
OutputProperties
| Name | Description | Value |
|---|---|---|
| datasource | 描述输出将写入到的数据源。 PUT (CreateOrReplace) 请求时是必需的。 | OutputDataSource |
| 序列化 | 描述如何序列化输入中的数据,或将数据写入输出时如何序列化数据。 PUT (CreateOrReplace) 请求时是必需的。 | Serialization |
| sizeWindow | 要限制流分析输出的大小窗口。 | int |
| timeWindow | 筛选流分析作业输出的时间范围。 | 字符串 |
ParquetSerialization
| Name | Description | Value |
|---|---|---|
| properties | 与 Parquet 序列化类型关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 | any |
| 类型 | 指示输入或输出使用的序列化类型。 PUT (CreateOrReplace) 请求时是必需的。 | “镶木地板”(必填) |
PowerBIOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 这些属性与 Power BI 输出相关。 PUT (CreateOrReplace) 请求时是必需的。 | PowerBIOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “PowerBI”(必需) |
PowerBIOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| 数据集 | Power BI数据集的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| groupId | Power BI 组的 ID。 | 字符串 |
| groupName | 这是 Power BI 组的名称。 利用这个属性帮助记住使用的是哪个特定的 Power BI 组 ID。 | 字符串 |
| refreshToken | 一个刷新令牌,可用于获取有效的访问令牌,然后可用于向数据源进行身份验证。 有效的刷新令牌目前只能通过 Azure 门户 获得。 建议在创建数据源时在这里输入一个虚拟字符串值,然后进入 Azure 门户 认证数据源,这样该属性会用有效的刷新令牌更新。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| 表 | 指定数据集下的 Power BI 表名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| tokenUserDisplayName | 用于获取刷新令牌的用户的用户显示名称。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
| tokenUserPrincipalName | 用于获取刷新令牌的用户的用户主体名称(UPN)。 使用此属性有助于记住哪些用户用于获取刷新令牌。 | 字符串 |
Serialization
| Name | Description | Value |
|---|---|---|
| 类型 | 将 AvroSerialization 类型设置为“Avro”。 对于 CsvSerialization 类型,设置为“Csv”。 对于 类型 JsonSerialization,设置为“Json”。 将类型 ParquetSerialization 设置为“Parquet”。 | 'Avro' 'Csv' 'Json' “镶木地板”(必填) |
ServiceBusQueueOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 服务总线 Queue 相关的属性输出。 PUT (CreateOrReplace) 请求时是必需的。 | ServiceBusQueueOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/Queue'(必填) |
ServiceBusQueueOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| propertyColumns | 一个字符串数组,包含输出列名,作为自定义属性附加于 服务总线 消息。 | string[] |
| queueName | 服务总线队伍的名字。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
| systemPropertyColumns | 与服务总线队列相关的系统属性。 支持以下系统属性:ReplyToSessionId、ContentType、To、Subject、CorrelationId、TimeToLive、PartitionKey、SessionId、ScheduledEnqueueTime、MessageId、ReplyTo、Label、ScheduledEnqueueTimeUtc。 | any |
ServiceBusTopicOutputDataSource
| Name | Description | Value |
|---|---|---|
| properties | 与 服务总线 Topic 输出相关的属性。 PUT (CreateOrReplace) 请求时是必需的。 | ServiceBusTopicOutputDataSourceProperties |
| 类型 | 指示将写入数据源输出的类型。 PUT (CreateOrReplace) 请求时是必需的。 | “Microsoft。ServiceBus/Topic'(必填) |
ServiceBusTopicOutputDataSourceProperties
| Name | Description | Value |
|---|---|---|
| authenticationMode | 身份验证模式。 | 'ConnectionString' 'Msi' 'UserToken' |
| propertyColumns | 一个字符串数组,包含输出列名,作为自定义属性附加于 服务总线 消息。 | string[] |
| serviceBusNamespace | 与所需事件中心、服务总线队列、服务总线 Topic等相关的命名空间。PUT(创建或替换)请求时必填。 | 字符串 |
| sharedAccessPolicyKey | 指定共享访问策略的共享访问策略密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| sharedAccessPolicyName | 事件中心、服务总线队列、服务总线 Topic等的共享访问策略名称。PUT(创建或替换)请求中必用。 | 字符串 |
| systemPropertyColumns | 系统属性与 服务总线 主题输出相关。 支持以下系统属性:ReplyToSessionId、ContentType、To、Subject、CorrelationId、TimeToLive、PartitionKey、SessionId、ScheduledEnqueueTime、MessageId、ReplyTo、Label、ScheduledEnqueueTimeUtc。 | ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns |
| topicName | 服务总线 Topic 的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns
| Name | Description | Value |
|---|
StorageAccount
| Name | Description | Value |
|---|---|---|
| accountKey | Azure 存储账户的账户密钥。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |
| accountName | Azure 存储账户的名称。 PUT (CreateOrReplace) 请求时是必需的。 | 字符串 |