az dt twin component

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

Commands

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 component show

Show details of a digital twin component.

az dt twin component show --component
                          --dt-name
                          --twin-id
                          [--resource-group]

Examples

Show details of a digital twin component

az dt twin component show -n {instance_or_hostname} --twin-id {twin_id} --component Thermostat

Required Parameters

--component

The path to the DTDL component.

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

--twin-id -t

The digital twin Id.

Optional Parameters

--resource-group -g

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

az dt twin component update

Update a digital twin component via JSON patch specification.

Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove.

az dt twin component update --component
                            --dt-name
                            --json-patch
                            --twin-id
                            [--resource-group]

Examples

Update a digital twin component via JSON patch specification.

az dt twin component update -n {instance_or_hostname} --twin-id {twin_id} --component {component_path} --json-patch '{"op":"replace", "path":"/Temperature", "value": 20.5}'

Update a digital twin component via JSON patch specification.

az dt twin component update -n {instance_or_hostname} --twin-id {twin_id} --component {component_path} --json-patch '[
  {"op":"replace", "path":"/Temperature", "value": 20.5},
  {"op":"add", "path":"/Areas", "value": ["ControlSystem"]}
]'

Update a digital twin component via JSON patch specification defined in a file.

az dt twin component update -n {instance_or_hostname} --twin-id {twin_id} --component {component_path} --json-patch ./my/patch/document.json

Required Parameters

--component

The path to the DTDL component.

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

--json-patch --patch

An update specification described by JSON-patch. Updates to property values and $model elements may happen in the same request. Operations are limited to add, replace and remove. Provide file path or inline JSON.

--twin-id -t

The digital twin Id.

Optional Parameters

--resource-group -g

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