az stream-analytics input
Note
此参考是 Azure CLI(版本 2.75.0 或更高版本) 的流分析 扩展的一部分。 该扩展将在首次运行 az stream-analytics input 命令时自动安装。 了解更多关于扩展的信息。
使用流分析管理输入。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az stream-analytics input create |
创建输入或替换现有流式处理作业下已有的输入。 |
Extension | GA |
| az stream-analytics input delete |
从流式处理作业中删除输入。 |
Extension | GA |
| az stream-analytics input list |
列出指定流式处理作业下的所有输入。 |
Extension | GA |
| az stream-analytics input show |
获取有关指定输入的详细信息。 |
Extension | GA |
| az stream-analytics input test |
测试输入的数据源是否可供 Azure 流分析服务访问和使用。 |
Extension | GA |
| az stream-analytics input update |
更新现有流式处理作业下的现有输入。 这可用于部分更新(即更新一两个属性)输入,而不会影响作业或输入定义的其余部分。 |
Extension | GA |
| az stream-analytics input wait |
将 CLI 置于等待状态,直到满足流分析输入的条件。 |
Extension | GA |
az stream-analytics input create
创建输入或替换现有流式处理作业下已有的输入。
az stream-analytics input create --input-name --name
--job-name
--resource-group
[--if-match]
[--if-none-match]
[--properties]
示例
使用 CSV 序列化创建引用 Blob 输入
az stream-analytics input create --properties "{\"type\":\"Reference\",\"datasource\":{\"type\":\"Microsoft.Storage/Blob\",\"properties\":{\"container\":\"state\",\"dateFormat\":\"yyyy/MM/dd\",\"pathPattern\":\"{date}/{time}\",\"storageAccounts\":[{\"accountKey\":\"someAccountKey==\",\"accountName\":\"someAccountName\"}],\"timeFormat\":\"HH\"}},\"serialization\":{\"type\":\"Csv\",\"properties\":{\"encoding\":\"UTF8\",\"fieldDelimiter\":\",\"}}}" --input-name "input7225" --job-name "sj9597" --resource-group "sjrg8440"
使用 JSON 序列化创建流事件中心输入
az stream-analytics input create --properties "{\"type\":\"Stream\",\"datasource\":{\"type\":\"Microsoft.ServiceBus/EventHub\",\"properties\":{\"consumerGroupName\":\"sdkconsumergroup\",\"eventHubName\":\"sdkeventhub\",\"serviceBusNamespace\":\"sdktest\",\"sharedAccessPolicyKey\":\"someSharedAccessPolicyKey==\",\"sharedAccessPolicyName\":\"RootManageSharedAccessKey\"}},\"serialization\":{\"type\":\"Json\",\"properties\":{\"encoding\":\"UTF8\"}}}" --input-name "input7425" --job-name "sj197" --resource-group "sjrg3139"
使用 Avro 序列化创建流 IoT 中心输入
az stream-analytics input create --properties "{\"type\":\"Stream\",\"datasource\":{\"type\":\"Microsoft.Devices/IotHubs\",\"properties\":{\"consumerGroupName\":\"sdkconsumergroup\",\"endpoint\":\"messages/events\",\"iotHubNamespace\":\"iothub\",\"sharedAccessPolicyKey\":\"sharedAccessPolicyKey=\",\"sharedAccessPolicyName\":\"owner\"}},\"serialization\":{\"type\":\"Avro\"}}" --input-name "input7970" --job-name "sj9742" --resource-group "sjrg3467"
使用 CSV 序列化创建流 Blob 输入
az stream-analytics input create --properties "{\"type\":\"Stream\",\"datasource\":{\"type\":\"Microsoft.Storage/Blob\",\"properties\":{\"container\":\"state\",\"dateFormat\":\"yyyy/MM/dd\",\"pathPattern\":\"{date}/{time}\",\"sourcePartitionCount\":16,\"storageAccounts\":[{\"accountKey\":\"someAccountKey==\",\"accountName\":\"someAccountName\"}],\"timeFormat\":\"HH\"}},\"serialization\":{\"type\":\"Csv\",\"properties\":{\"encoding\":\"UTF8\",\"fieldDelimiter\":\",\"}}}" --input-name "input8899" --job-name "sj6695" --resource-group "sjrg8161"
必需参数
输入的名称。
流式处理作业的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
输入的 ETag。 省略此值以始终覆盖当前输入。 指定最后一次看到的 ETag 值,以防止意外覆盖并发更改。
设置为“*”以允许创建新输入,但要防止更新现有输入。 其他值将导致 412 预条件失败响应。
与输入关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 预期值:json-string/json-file/@json-file。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az stream-analytics input delete
从流式处理作业中删除输入。
az stream-analytics input delete --input-name --name
--job-name
--resource-group
[--yes]
示例
删除输入
az stream-analytics input delete --input-name "input7225" --job-name "sj9597" --resource-group "sjrg8440"
必需参数
输入的名称。
流式处理作业的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
不要提示确认。
| 属性 | 值 |
|---|---|
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az stream-analytics input list
列出指定流式处理作业下的所有输入。
az stream-analytics input list --job-name
--resource-group
[--select]
示例
列出流式处理作业中的所有输入
az stream-analytics input list --job-name "sj9597" --resource-group "sjrg8440"
列出流式处理作业中的所有输入,并使用 $select OData 查询参数包括诊断信息
az stream-analytics input list --select "*" --job-name "sj7804" --resource-group "sjrg3276"
必需参数
流式处理作业的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
$select OData 查询参数。 这是要包含在响应中的结构属性的逗号分隔列表,或“”以包含所有属性。默认情况下,除诊断之外,所有属性都会返回。目前仅接受“”作为有效值。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az stream-analytics input show
获取有关指定输入的详细信息。
az stream-analytics input show --input-name --name
--job-name
--resource-group
示例
使用 CSV 序列化获取引用 Blob 输入
az stream-analytics input show --input-name "input7225" --job-name "sj9597" --resource-group "sjrg8440"
使用 JSON 序列化获取流事件中心输入
az stream-analytics input show --input-name "input7425" --job-name "sj197" --resource-group "sjrg3139"
使用 Avro 序列化获取流 IoT 中心输入
az stream-analytics input show --input-name "input7970" --job-name "sj9742" --resource-group "sjrg3467"
使用 CSV 序列化获取流 Blob 输入
az stream-analytics input show --input-name "input8899" --job-name "sj6695" --resource-group "sjrg8161"
必需参数
输入的名称。
流式处理作业的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az stream-analytics input test
测试输入的数据源是否可供 Azure 流分析服务访问和使用。
az stream-analytics input test --input-name --name
--job-name
--resource-group
[--no-wait]
[--properties]
示例
测试输入的连接
az stream-analytics input test --input-name "input7225" --job-name "sj9597" --resource-group "sjrg8440"
必需参数
输入的名称。
流式处理作业的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
不等待长时间运行的操作完成。
| 属性 | 值 |
|---|---|
| 默认值: | False |
与输入关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 预期值:json-string/json-file/@json-file。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az stream-analytics input update
更新现有流式处理作业下的现有输入。 这可用于部分更新(即更新一两个属性)输入,而不会影响作业或输入定义的其余部分。
az stream-analytics input update --input-name --name
--job-name
--resource-group
[--if-match]
[--properties]
示例
更新引用 Blob 输入
az stream-analytics input update --properties "{\"type\":\"Reference\",\"datasource\":{\"type\":\"Microsoft.Storage/Blob\",\"properties\":{\"container\":\"differentContainer\"}},\"serialization\":{\"type\":\"Csv\",\"properties\":{\"encoding\":\"UTF8\",\"fieldDelimiter\":\"|\"}}}" --input-name "input7225" --job-name "sj9597" --resource-group "sjrg8440"
更新流事件中心输入
az stream-analytics input update --properties "{\"type\":\"Stream\",\"datasource\":{\"type\":\"Microsoft.ServiceBus/EventHub\",\"properties\":{\"consumerGroupName\":\"differentConsumerGroupName\"}},\"serialization\":{\"type\":\"Avro\"}}" --input-name "input7425" --job-name "sj197" --resource-group "sjrg3139"
更新流 IoT 中心输入
az stream-analytics input update --properties "{\"type\":\"Stream\",\"datasource\":{\"type\":\"Microsoft.Devices/IotHubs\",\"properties\":{\"endpoint\":\"messages/operationsMonitoringEvents\"}},\"serialization\":{\"type\":\"Csv\",\"properties\":{\"encoding\":\"UTF8\",\"fieldDelimiter\":\"|\"}}}" --input-name "input7970" --job-name "sj9742" --resource-group "sjrg3467"
更新流 Blob 输入
az stream-analytics input update --properties "{\"type\":\"Stream\",\"datasource\":{\"type\":\"Microsoft.Storage/Blob\",\"properties\":{\"sourcePartitionCount\":32}},\"serialization\":{\"type\":\"Csv\",\"properties\":{\"encoding\":\"UTF8\",\"fieldDelimiter\":\"|\"}}}" --input-name "input8899" --job-name "sj6695" --resource-group "sjrg8161"
必需参数
输入的名称。
流式处理作业的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
输入的 ETag。 省略此值以始终覆盖当前输入。 指定最后一次看到的 ETag 值,以防止意外覆盖并发更改。
与输入关联的属性。 PUT (CreateOrReplace) 请求时是必需的。 预期值:json-string/json-file/@json-file。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az stream-analytics input wait
将 CLI 置于等待状态,直到满足流分析输入的条件。
az stream-analytics input wait --input-name --name
--job-name
--resource-group
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--timeout]
[--updated]
示例
暂停执行下一行 CLI 脚本,直到成功创建流分析输入。
az stream-analytics input wait --input-name "input8899" --job-name "sj6695" --resource-group "sjrg8161" --created
必需参数
输入的名称。
流式处理作业的名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
等待在“Succeeded”中使用“provisioningState”创建。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
等到删除为止。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
等待资源存在。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
轮询间隔(以秒为单位)。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | 30 |
最大等待(以秒为单位)。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | 3600 |
等到 provisioningState 更新为“Succeeded”。
| 属性 | 值 |
|---|---|
| Parameter group: | Wait Condition Arguments |
| 默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |