DigitalTwinsClient Class

Definition

The Digital Twins Service Client contains methods to retrieve digital twin information, like models, components, and relationships.

public class DigitalTwinsClient
type DigitalTwinsClient = class
Public Class DigitalTwinsClient
Inheritance
DigitalTwinsClient

Constructors

DigitalTwinsClient()

Creates a new instance of the DigitalTwinsClient class, provided for unit testing purposes only.

DigitalTwinsClient(Uri, TokenCredential)

Creates a new instance of the DigitalTwinsClient class.

DigitalTwinsClient(Uri, TokenCredential, DigitalTwinsClientOptions)

Creates a new instance of the DigitalTwinsClient class, with options.

Methods

CreateModels(IEnumerable<String>, CancellationToken)

Creates one or many models synchronously.

CreateModelsAsync(IEnumerable<String>, CancellationToken)

Creates one or many models asynchronously.

CreateOrReplaceDigitalTwin<T>(String, T, Nullable<ETag>, CancellationToken)

Creates a digital twin synchronously. If the provided digital twin Id is already in use, then this will attempt to replace the existing digital twin with the provided digital twin.

CreateOrReplaceDigitalTwinAsync<T>(String, T, Nullable<ETag>, CancellationToken)

Creates a digital twin asynchronously. If the provided digital twin Id is already in use, then this will attempt to replace the existing digital twin with the provided digital twin..

CreateOrReplaceEventRoute(String, DigitalTwinsEventRoute, CancellationToken)

Creates an event route synchronously. If the provided event route Id is already in use, then this will attempt to replace the existing event route with the provided event route.

CreateOrReplaceEventRouteAsync(String, DigitalTwinsEventRoute, CancellationToken)

Creates an event route asynchronously. If the provided event route Id is already in use, then this will attempt to replace the existing event route with the provided event route.

CreateOrReplaceRelationship<T>(String, String, T, Nullable<ETag>, CancellationToken)

Creates a relationship on a digital twin synchronously. If the provided relationship Id is already in use, this will attempt to replace the existing relationship with the provided relationship.

CreateOrReplaceRelationshipAsync<T>(String, String, T, Nullable<ETag>, CancellationToken)

Creates a relationship on a digital twin asynchronously. If the provided relationship Id is already in use, this will attempt to replace the existing relationship with the provided relationship.

DecommissionModel(String, CancellationToken)

Decommissions a model synchronously.

DecommissionModelAsync(String, CancellationToken)

Decommissions a model asynchronously.

DeleteDigitalTwin(String, Nullable<ETag>, CancellationToken)

Deletes a digital twin synchronously.

DeleteDigitalTwinAsync(String, Nullable<ETag>, CancellationToken)

Deletes a digital twin asynchronously.

DeleteEventRoute(String, CancellationToken)

Deletes an event route synchronously.

DeleteEventRouteAsync(String, CancellationToken)

Deletes an event route asynchronously.

DeleteModel(String, CancellationToken)

Deletes a model synchronously.

DeleteModelAsync(String, CancellationToken)

Deletes a model asynchronously.

DeleteRelationship(String, String, Nullable<ETag>, CancellationToken)

Deletes a relationship on a digital twin synchronously.

DeleteRelationshipAsync(String, String, Nullable<ETag>, CancellationToken)

Deletes a relationship on a digital twin asynchronously.

GetComponent<T>(String, String, CancellationToken)

Gets a component on a digital twin synchronously.

GetComponentAsync<T>(String, String, CancellationToken)

Gets a component on a digital twin asynchronously.

GetDigitalTwin<T>(String, CancellationToken)

Gets a digital twin synchronously.

GetDigitalTwinAsync<T>(String, CancellationToken)

Gets a digital twin asynchronously.

GetEventRoute(String, CancellationToken)

Gets an event route by Id synchronously.

GetEventRouteAsync(String, CancellationToken)

Gets an event route by Id asynchronously.

GetEventRoutes(CancellationToken)

. Lists the event routes in a digital twins instance by iterating through a collection synchronously.

GetEventRoutesAsync(CancellationToken)

. Lists the event routes in a digital twins instance by iterating through a collection asynchronously.

GetIncomingRelationships(String, CancellationToken)

Gets all the relationships referencing a digital twin as a target by iterating through a collection synchronously.

GetIncomingRelationshipsAsync(String, CancellationToken)

Gets all the relationships referencing a digital twin as a target by iterating through a collection asynchronously.

GetModel(String, CancellationToken)

Gets a model, including the model metadata and the model definition synchronously.

GetModelAsync(String, CancellationToken)

Gets a model, including the model metadata and the model definition asynchronously.

GetModels(GetModelsOptions, CancellationToken)

Gets the list of models by iterating through a collection synchronously.

GetModelsAsync(GetModelsOptions, CancellationToken)

Gets the list of models by iterating through a collection asynchronously.

GetRelationship<T>(String, String, CancellationToken)

Gets a relationship on a digital twin synchronously.

GetRelationshipAsync<T>(String, String, CancellationToken)

Gets a relationship on a digital twin asynchronously.

GetRelationships<T>(String, String, CancellationToken)

Gets all the relationships on a digital twin by iterating through a collection synchronously.

GetRelationshipsAsync<T>(String, String, CancellationToken)

Gets all the relationships on a digital twin by iterating through a collection asynchronously.

PublishComponentTelemetry(String, String, String, String, Nullable<DateTimeOffset>, CancellationToken)

Publishes telemetry from a digital twin's component synchronously. The result is then consumed by one or many destination endpoints (subscribers) defined under DigitalTwinsEventRoute. These event routes need to be set before publishing a telemetry message, in order for the telemetry message to be consumed.

PublishComponentTelemetryAsync(String, String, String, String, Nullable<DateTimeOffset>, CancellationToken)

Publishes telemetry from a digital twin's component asynchronously. The result is then consumed by one or many destination endpoints (subscribers) defined under DigitalTwinsEventRoute. These event routes need to be set before publishing a telemetry message, in order for the telemetry message to be consumed.

PublishTelemetry(String, String, String, Nullable<DateTimeOffset>, CancellationToken)

Publishes telemetry from a digital twin synchronously. The result is then consumed by one or many destination endpoints (subscribers) defined under DigitalTwinsEventRoute. These event routes need to be set before publishing a telemetry message, in order for the telemetry message to be consumed.

PublishTelemetryAsync(String, String, String, Nullable<DateTimeOffset>, CancellationToken)

Publishes telemetry from a digital twin asynchronously. The result is then consumed by one or many destination endpoints (subscribers) defined under DigitalTwinsEventRoute. These event routes need to be set before publishing a telemetry message, in order for the telemetry message to be consumed.

Query<T>(String, CancellationToken)

Queries for digital twins by iterating through a collection synchronously.

QueryAsync<T>(String, CancellationToken)

Queries for digital twins by iterating through a collection asynchronously.

UpdateComponent(String, String, JsonPatchDocument, Nullable<ETag>, CancellationToken)

Updates properties of a component on a digital twin synchronously.

UpdateComponentAsync(String, String, JsonPatchDocument, Nullable<ETag>, CancellationToken)

Updates properties of a component on a digital twin asynchronously.

UpdateDigitalTwin(String, JsonPatchDocument, Nullable<ETag>, CancellationToken)

Updates a digital twin synchronously.

UpdateDigitalTwinAsync(String, JsonPatchDocument, Nullable<ETag>, CancellationToken)

Updates a digital twin asynchronously.

UpdateRelationship(String, String, JsonPatchDocument, Nullable<ETag>, CancellationToken)

Updates the properties of a relationship on a digital twin synchronously.

UpdateRelationshipAsync(String, String, JsonPatchDocument, Nullable<ETag>, CancellationToken)

Updates the properties of a relationship on a digital twin asynchronously.

Applies to