az tsi event-source iothub

Note

This reference is part of the timeseriesinsights extension for the Azure CLI (version 2.50.0 or higher). The extension will automatically install the first time you run an az tsi event-source iothub command. Learn more about extensions.

Manage event source with timeseriesinsights sub group iot-hub.

Commands

Name Description Type Status
az tsi event-source iothub create

Create an event source under the specified environment.

Extension GA
az tsi event-source iothub update

Update an event source under the specified environment.

Extension GA

az tsi event-source iothub create

Create an event source under the specified environment.

az tsi event-source iothub create --consumer-group-name
                                  --environment-name
                                  --event-source-name
                                  --event-source-resource-id
                                  --iot-hub-name
                                  --key-name
                                  --location
                                  --resource-group
                                  --shared-access-key
                                  [--local-timestamp]
                                  [--tags]
                                  [--timestamp-property-name]

Examples

CreateIotHubEventSource

az tsi event-source iothub create -g "rg" --environment-name "env1" --name "eventsource" --consumer-group-name "consumer-group" --iot-hub-name "iothub" --location westus --key-name "key-name" --shared-access-key "someSecretvalue" --event-source-resource-id "resource-id"

Required Parameters

--consumer-group-name

The name of the iot hub's consumer group that holds the partitions from which events will be read.

--environment-name

The name of the Time Series Insights environment associated with the specified resource group.

--event-source-name --name -n

The name of the Time Series Insights event source associated with the specified environment.

--event-source-resource-id --resource-id

The resource id of the event source in Azure Resource Manager.

--iot-hub-name

The name of the iot hub.

--key-name --shared-access-policy-name

The name of the Shared Access Policy key that grants the Time Series Insights service access to the iot hub. This shared access policy key must grant 'service connect' permissions to the iot hub.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--resource-group -g

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

--shared-access-key

The value of the Shared Access Policy key that grants the Time Series Insights service read access to the iot hub. This property is not shown in event source responses.

Optional Parameters

--local-timestamp

An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used and the corresponding timezone offset information. If a value isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. Expected value: json-string/@json-file.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--timestamp-property-name --ts-property-name

The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used.

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 tsi event-source iothub update

Update an event source under the specified environment.

az tsi event-source iothub update [--environment-name]
                                  [--event-source-name]
                                  [--ids]
                                  [--local-timestamp]
                                  [--resource-group]
                                  [--shared-access-key]
                                  [--subscription]
                                  [--tags]
                                  [--timestamp-property-name]

Examples

UpdateIotHubEventSource

az tsi event-source iothub update -g "rg" --environment-name "env1" --name "eventsource"  --timestamp-property-name timestampProp --shared-access-key "someSecretvalue" --tags test=tag

Optional Parameters

--environment-name

The name of the Time Series Insights environment associated with the specified resource group.

--event-source-name --name -n

The name of the Time Series Insights event source associated with the specified environment.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--local-timestamp

An object that represents the local timestamp property. It contains the format of local timestamp that needs to be used and the corresponding timezone offset information. If a value isn't specified for localTimestamp, or if null, then the local timestamp will not be ingressed with the events. Expected value: json-string/@json-file.

--resource-group -g

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

--shared-access-key

The value of the Shared Access Policy key that grants the Time Series Insights service read access to the iot hub. This property is not shown in event source responses.

--subscription

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

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--timestamp-property-name --ts-property-name

The event property that will be used as the event source's timestamp. If a value isn't specified for timestampPropertyName, or if null or empty-string is specified, the event creation time will be used.

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.