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
The name of the iot hub's consumer group that holds the partitions from which events will be read.
The name of the Time Series Insights environment associated with the specified resource group.
The name of the Time Series Insights event source associated with the specified environment.
The resource id of the event source in Azure Resource Manager.
The name of the iot hub.
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. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Name of resource group of environment. You can configure the default group using az configure --defaults group=<name>
.
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
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.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
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
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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
The name of the Time Series Insights environment associated with the specified resource group.
The name of the Time Series Insights event source associated with the specified environment.
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.
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.
Name of resource group of environment. You can configure the default group using az configure --defaults group=<name>
.
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
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
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.