az dt twin component
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 twin component command. Learn more about extensions.
Show and update the digital twin components of a Digital Twins instance.
Commands
Name | Description | Type | Status |
---|---|---|---|
az dt twin component show |
Show details of a digital twin component. |
Extension | GA |
az dt twin component update |
Update a digital twin component via JSON patch specification. |
Extension | GA |
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
The path to the DTDL component.
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.
The digital twin Id.
Optional Parameters
Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}
.
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 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
[--etag]
[--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
The path to the DTDL component.
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.
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.
The digital twin Id.
Optional Parameters
Entity tag value. The command will succeed if the etag matches the current etag for the resource.
Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}
.
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.