az dt route

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.46.0 or higher). The extension will automatically install the first time you run an az dt route command. Learn more about extensions.

Manage and configure event routes.

Note that an endpoint must first be configured before adding an event route.

Commands

Name Description Type Status
az dt route create

Add an event route to a Digital Twins instance.

Extension GA
az dt route delete

Remove an event route from a Digital Twins instance.

Extension GA
az dt route list

List the configured event routes of a Digital Twins instance.

Extension GA
az dt route show

Show details of an event route configured on a Digital Twins instance.

Extension GA

az dt route create

Add an event route to a Digital Twins instance.

az dt route create --dt-name
                   --en
                   --rn
                   [--filter]
                   [--resource-group]

Examples

Adds an event route for an existing endpoint on target instance with default filter of "true".

az dt route create -n {instance_or_hostname} --endpoint-name {endpoint_name} --route-name {route_name}

Adds an event route for an existing endpoint on target instance with custom filter.

az dt route create -n {instance_or_hostname} --endpoint-name {endpoint_name} --route-name {route_name} --filter "type = 'Microsoft.DigitalTwins.Twin.Create'"

Required Parameters

--dt-name --dtn -n

Digital Twins instance name or hostname. If an instance name is provided, the user subscription is first queried for the target instance to retrieve the hostname. If a hostname is provided, the subscription query is skipped and the provided value is used for subsequent interaction.

--en --endpoint-name

Endpoint name.

--rn --route-name

Event route name.

Optional Parameters

--filter

Event route filter.

Default value: true
--resource-group -g

Digital Twins instance 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 dt route delete

Remove an event route from a Digital Twins instance.

az dt route delete --dt-name
                   --rn
                   [--resource-group]

Examples

Remove an event route from a target instance.

az dt route delete -n {instance_or_hostname} --route-name {route_name}

Required Parameters

--dt-name --dtn -n

Digital Twins instance name or hostname. If an instance name is provided, the user subscription is first queried for the target instance to retrieve the hostname. If a hostname is provided, the subscription query is skipped and the provided value is used for subsequent interaction.

--rn --route-name

Event route name.

Optional Parameters

--resource-group -g

Digital Twins instance 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 dt route list

List the configured event routes of a Digital Twins instance.

az dt route list --dt-name
                 [--resource-group]

Examples

List configured event routes of a target instance.

az dt route list -n {instance_or_hostname}

Required Parameters

--dt-name --dtn -n

Digital Twins instance name or hostname. If an instance name is provided, the user subscription is first queried for the target instance to retrieve the hostname. If a hostname is provided, the subscription query is skipped and the provided value is used for subsequent interaction.

Optional Parameters

--resource-group -g

Digital Twins instance 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 dt route show

Show details of an event route configured on a Digital Twins instance.

az dt route show --dt-name
                 --rn
                 [--resource-group]

Examples

Show an event route on a target instance.

az dt route show -n {instance_or_hostname} --route-name {route_name}

Required Parameters

--dt-name --dtn -n

Digital Twins instance name or hostname. If an instance name is provided, the user subscription is first queried for the target instance to retrieve the hostname. If a hostname is provided, the subscription query is skipped and the provided value is used for subsequent interaction.

--rn --route-name

Event route name.

Optional Parameters

--resource-group -g

Digital Twins instance 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.