Κοινή χρήση μέσω


az stream-analytics input

Note

This reference is part of the stream-analytics extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az stream-analytics input command. Learn more about extensions.

Manage input with stream analytics.

Commands

Name Description Type Status
az stream-analytics input create

Create an input or replaces an already existing input under an existing streaming job.

Extension GA
az stream-analytics input delete

Delete an input from the streaming job.

Extension GA
az stream-analytics input list

List all of the inputs under the specified streaming job.

Extension GA
az stream-analytics input show

Get details about the specified input.

Extension GA
az stream-analytics input test

Test whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.

Extension GA
az stream-analytics input update

Update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.

Extension GA
az stream-analytics input wait

Place the CLI in a waiting state until a condition of the stream-analytics input is met.

Extension GA

az stream-analytics input create

Create an input or replaces an already existing input under an existing streaming job.

az stream-analytics input create --input-name
                                 --job-name
                                 --resource-group
                                 [--if-match]
                                 [--if-none-match]
                                 [--properties]

Examples

Create a reference blob input with CSV serialization

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"

Create a stream Event Hub input with JSON serialization

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"

Create a stream IoT Hub input with Avro serialization

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"

Create a stream blob input with CSV serialization

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"

Required Parameters

--input-name --name -n

The name of the input.

--job-name

The name of the streaming job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--if-match

The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.

--if-none-match

Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.

--properties

The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. Expected value: json-string/json-file/@json-file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stream-analytics input delete

Delete an input from the streaming job.

az stream-analytics input delete --input-name
                                 --job-name
                                 --resource-group
                                 [--yes]

Examples

Delete an input

az stream-analytics input delete --input-name "input7225" --job-name "sj9597" --resource-group "sjrg8440"

Required Parameters

--input-name --name -n

The name of the input.

--job-name

The name of the streaming job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stream-analytics input list

List all of the inputs under the specified streaming job.

az stream-analytics input list --job-name
                               --resource-group
                               [--select]

Examples

List all inputs in a streaming job

az stream-analytics input list --job-name "sj9597" --resource-group "sjrg8440"

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

az stream-analytics input list --select "*" --job-name "sj7804" --resource-group "sjrg3276"

Required Parameters

--job-name

The name of the streaming job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--select

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stream-analytics input show

Get details about the specified input.

az stream-analytics input show --input-name
                               --job-name
                               --resource-group

Examples

Get a reference blob input with CSV serialization

az stream-analytics input show --input-name "input7225" --job-name "sj9597" --resource-group "sjrg8440"

Get a stream Event Hub input with JSON serialization

az stream-analytics input show --input-name "input7425" --job-name "sj197" --resource-group "sjrg3139"

Get a stream IoT Hub input with Avro serialization

az stream-analytics input show --input-name "input7970" --job-name "sj9742" --resource-group "sjrg3467"

Get a stream blob input with CSV serialization

az stream-analytics input show --input-name "input8899" --job-name "sj6695" --resource-group "sjrg8161"

Required Parameters

--input-name --name -n

The name of the input.

--job-name

The name of the streaming job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stream-analytics input test

Test whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.

az stream-analytics input test --input-name
                               --job-name
                               --resource-group
                               [--no-wait]
                               [--properties]

Examples

Test the connection for an input

az stream-analytics input test --input-name "input7225" --job-name "sj9597" --resource-group "sjrg8440"

Required Parameters

--input-name --name -n

The name of the input.

--job-name

The name of the streaming job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--properties

The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. Expected value: json-string/json-file/@json-file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stream-analytics input update

Update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.

az stream-analytics input update --input-name
                                 --job-name
                                 --resource-group
                                 [--if-match]
                                 [--properties]

Examples

Update a reference blob input

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"

Update a stream Event Hub input

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"

Update a stream IoT Hub input

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"

Update a stream blob input

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"

Required Parameters

--input-name --name -n

The name of the input.

--job-name

The name of the streaming job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--if-match

The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.

--properties

The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. Expected value: json-string/json-file/@json-file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stream-analytics input wait

Place the CLI in a waiting state until a condition of the stream-analytics input is met.

az stream-analytics input wait --input-name
                               --job-name
                               --resource-group
                               [--created]
                               [--custom]
                               [--deleted]
                               [--exists]
                               [--interval]
                               [--timeout]
                               [--updated]

Examples

Pause executing next line of CLI script until the stream-analytics input is successfully created.

az stream-analytics input wait --input-name "input8899" --job-name "sj6695" --resource-group "sjrg8161" --created

Required Parameters

--input-name --name -n

The name of the input.

--job-name

The name of the streaming job.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

Default value: 30
--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.