az dt

Manage Azure Digital Twins solutions & infrastructure.

Commands

az dt create

Create a new Digital Twins instance.

az dt delete

Delete an existing Digital Twins instance.

az dt endpoint

Manage and configure Digital Twins instance endpoints.

az dt endpoint create

Add egress endpoints to a Digital Twins instance.

az dt endpoint create eventgrid

Adds an EventGrid Topic endpoint to a Digital Twins instance. Requires pre-created resource.

az dt endpoint create eventhub

Adds an EventHub endpoint to a Digital Twins instance. Requires pre-created resource.

az dt endpoint create servicebus

Adds a ServiceBus Topic endpoint to a Digital Twins instance. Requires pre-created resource.

az dt endpoint delete

Remove an endpoint from a Digital Twins instance.

az dt endpoint list

List all egress endpoints configured on a Digital Twins instance.

az dt endpoint show

Show details of an endpoint configured on a Digital Twins instance.

az dt list

List the collection of Digital Twins instances by subscription or resource group.

az dt model

Manage DTDL models and definitions on a Digital Twins instance.

az dt model create

Uploads one or more models. When any error occurs, no models are uploaded.

az dt model delete

Delete a model. A model can only be deleted if no other models reference it.

az dt model list

List model metadata, definitions and dependencies.

az dt model show

Retrieve a target model or model definition.

az dt model update

Updates the metadata for a model. Currently a model can only be decommisioned.

az dt role-assignment

Manage RBAC role assignments for a Digital Twins instance.

az dt role-assignment create

Assign a user, group or service principal to a role against a Digital Twins instance.

az dt role-assignment delete

Remove a user, group or service principal role assignment from a Digital Twins instance.

az dt role-assignment list

List the existing role assignments of a Digital Twins instance.

az dt route

Manage and configure event routes.

az dt route create

Add an event route to a Digital Twins instance.

az dt route delete

Remove an event route from a Digital Twins instance.

az dt route list

List the configured event routes of a Digital Twins instance.

az dt route show

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

az dt show

Show an existing Digital Twins instance.

az dt twin

Manage and configure the digital twins of a Digital Twins instance.

az dt twin component

Show and update the digital twin components of a Digital Twins instance.

az dt twin component show

Show details of a digital twin component.

az dt twin component update

Update a digital twin component via JSON patch specification.

az dt twin create

Create a digital twin on an instance.

az dt twin delete

Remove a digital twin. All relationships referencing this twin must already be deleted.

az dt twin query

Query the digital twins of an instance. Allows traversing relationships and filtering by property values.

az dt twin relationship

Manage and configure the digital twin relationships of a Digital Twins instance.

az dt twin relationship create

Create a relationship between source and target digital twins.

az dt twin relationship delete

Delete a digital twin relationship on a Digital Twins instance.

az dt twin relationship list

List the relationships of a digital twin.

az dt twin relationship show

Show details of a digital twin relationship.

az dt twin relationship update

Updates the properties of a relationship between two digital twins via JSON patch specification.

az dt twin show

Show the details of a digital twin.

az dt twin telemetry

Test and validate the event routes and endpoints of a Digital Twins instance.

az dt twin telemetry send

Sends telemetry on behalf of a digital twin. If component path is provided the emitted telemetry is on behalf of the component.

az dt twin update

Update an instance digital twin via JSON patch specification.

az dt create

Create a new Digital Twins instance.

az dt create --dt-name
             --resource-group
             [--location]
             [--tags]

Examples

Create instance in target resource group with default location.

az dt create -n {instance_name} -g {resouce_group} -l eastus2euap

Create instance in target resource group with specified location and tags.

az dt create -n {instance_name} -g {resouce_group} -l westcentralus --tags "a=b;c=d"

Required Parameters

--dt-name --dtn -n

Digital Twins instance name.

--resource-group -g

Digital Twins instance resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--location -l

Digital Twins instance location. If no location is provided the resource group location is used.You can configure the default location using az configure --defaults location=<name>.

--tags

Digital Twins instance tags. Property bag in key-value pairs with the following format: a=b;c=d.

az dt delete

Delete an existing Digital Twins instance.

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

Examples

Delete an arbitrary instance.

az dt delete -n {instance_name}

Required Parameters

--dt-name --dtn -n

Digital Twins instance name.

Optional Parameters

--resource-group -g

Digital Twins instance resource group. You can configure the default group using az configure --defaults group=<name>.

az dt list

List the collection of Digital Twins instances by subscription or resource group.

az dt list [--resource-group]

Examples

List all instances in the current subscription.

az dt list

List all instances in target resource group and output in table format.

az dt list -g {resource_group} --output table

List all instances in subscription that meet a condition.

az dt list --query "[?contains(name, 'Production')]"

Count instances that meet condition.

az dt list --query "length([?contains(name, 'Production')])"

Optional Parameters

--resource-group -g

Digital Twins instance resource group. You can configure the default group using az configure --defaults group=<name>.

az dt show

Show an existing Digital Twins instance.

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

Examples

Show an instance.

az dt show -n {instance_name}

Show an instance and project certain properties.

az dt show -n {instance_name} --query "{Endpoint:hostName, Location:location}"

Required Parameters

--dt-name --dtn -n

Digital Twins instance name.

Optional Parameters

--resource-group -g

Digital Twins instance resource group. You can configure the default group using az configure --defaults group=<name>.