DigitalTwinClient Class

Definition

The Digital Twins Service Client contains methods to retrieve and update digital twin information, and invoke commands on a digital twin device. For more information, see https://github.com/Azure/azure-iot-sdk-csharp#iot-hub-service-sdk

public class DigitalTwinClient : IDisposable
type DigitalTwinClient = class
    interface IDisposable
Public Class DigitalTwinClient
Implements IDisposable
Inheritance
System.Object
DigitalTwinClient
Implements
System.IDisposable

Constructors

DigitalTwinClient()

Creates an instance of DigitalTwinClient, provided for unit testing purposes only. Use the CreateFromConnectionString method to create an instance to use the client.

Methods

Create(String, AzureSasCredential, DelegatingHandler[])

Creates an instance of DigitalTwinClient.

Create(String, TokenCredential, DelegatingHandler[])

Creates an instance of DigitalTwinClient.

Create(String, TokenCredential, DigitalTwinClientOptions, DelegatingHandler[])

Creates an instance of DigitalTwinClient.

CreateFromConnectionString(String, DelegatingHandler[])

Initializes a new instance of the DigitalTwinClient class.

Dispose() System.IDisposable.Dispose
Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

GetDigitalTwinAsync<T>(String, CancellationToken)

Gets a strongly-typed digital twin.

InvokeCommandAsync(String, String, String, DigitalTwinInvokeCommandRequestOptions, CancellationToken)

Invoke a command on a digital twin.

InvokeComponentCommandAsync(String, String, String, String, DigitalTwinInvokeCommandRequestOptions, CancellationToken)

Invoke a command on a component of a digital twin.

UpdateDigitalTwinAsync(String, String, DigitalTwinUpdateRequestOptions, CancellationToken)

Updates a digital twin.

For further information on how to create the json-patch, see https://docs.microsoft.com/en-us/azure/iot-pnp/howto-manage-digital-twin

Applies to