DigitalTwinsClient.UpdateDigitalTwin Method

Definition

Updates a digital twin synchronously.

public virtual Azure.Response UpdateDigitalTwin (string digitalTwinId, Azure.JsonPatchDocument jsonPatchDocument, Azure.ETag? ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateDigitalTwin : string * Azure.JsonPatchDocument * Nullable<Azure.ETag> * System.Threading.CancellationToken -> Azure.Response
override this.UpdateDigitalTwin : string * Azure.JsonPatchDocument * Nullable<Azure.ETag> * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function UpdateDigitalTwin (digitalTwinId As String, jsonPatchDocument As JsonPatchDocument, Optional ifMatch As Nullable(Of ETag) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

digitalTwinId
System.String

The Id of the digital twin to update.

jsonPatchDocument
JsonPatchDocument

The application/json-patch+json operations to be performed on the specified digital twin.

ifMatch
System.Nullable<ETag>

Optional. Only perform the operation if the entity's ETag matches this optional ETag or * (All) is provided.

cancellationToken
System.Threading.CancellationToken

The cancellationToken.

Returns

Response

The http response Response<T>.

Exceptions

The exception that captures the errors from the service. Check the ErrorCode and Status properties for more details.

System.ArgumentNullException

The exception is thrown when digitalTwinId or jsonPatchDocument is null.

Remarks

For more samples, see our repo samples.

Applies to

See also