Share via


az tsi event-source eventhub

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 eventhub command. Learn more about extensions.

Manage event source with timeseriesinsights sub group event-hub.

Commands

Name Description Type Status
az tsi event-source eventhub create

Create an event source under the specified environment.

Extension GA
az tsi event-source eventhub update

Update an event source under the specified environment.

Extension GA

az tsi event-source eventhub create

Create an event source under the specified environment.

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

Examples

CreateEventHubEventSource

az tsi event-source eventhub create --environment-name "env1" --name "es1" --location westus --consumer-group-name "cgn" --event-hub-name "ehn" --event-source-resource-id "somePathInArm" --key-name "managementKey" --service-bus-namespace "sbn" --shared-access-key "someSecretvalue" --timestamp-property-name "someTimestampProperty" --resource-group "rg1"

Required Parameters

--consumer-group-name

The name of the event 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-hub-name

The name of the event hub.

--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.

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

The name of the SAS key that grants the Time Series Insights service access to the event hub. The shared access policies for this key must grant 'Listen' permissions to the event hub.

--location -l

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

--namespace --service-bus-namespace

The name of the service bus that contains the event hub.

--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 key that grants the Time Series Insights service read access to the event 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 eventhub update

Update an event source under the specified environment.

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

Examples

UpdateEventHubEventSource

az tsi event-source eventhub update --environment-name "env1" --name "es1" --shared-access-key "someSecretvalue" --timestamp-property-name "someTimestampProperty" --resource-group "rg1"

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 key that grants the Time Series Insights service read access to the event 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.