az dt twin telemetry
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 telemetry command. Learn more about extensions.
Test and validate the event routes and endpoints of a Digital Twins instance.
Commands
Name | Description | Type | Status |
---|---|---|---|
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. |
Extension | GA |
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 telemetry send --dt-name
--twin-id
[--component]
[--dt-id]
[--resource-group]
[--telemetry]
[--telemetry-source-time]
Examples
Send twin telemetry
az dt twin telemetry send -n {instance_or_hostname} --twin-id {twin_id}
Send twin telemetry with a custom telemetry source timestamp and message identifier
az dt twin telemetry send -n {instance_or_hostname} --twin-id {twin_id} --tst {telemetry_source_timestamp} --dt-id {dt_id}
Required Parameters
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
The path to the DTDL component. If set, telemetry will be emitted on behalf of the component.
A unique message identifier (in the scope of the digital twin id) that is commonly used for de-duplicating messages. If no value is provided a GUID is automatically generated.
Digital Twins instance resource group. You can configure the default group using az configure --defaults group={name}
.
Inline telemetry JSON or file path to telemetry JSON. Default payload is an empty object: {}.
An RFC 3339 timestamp that identifies the time the telemetry was measured.
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.