Share via


DigitalTwinsClient.UpdateRelationshipAsync Method

Definition

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

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

Parameters

digitalTwinId
String

The Id of the source digital twin.

relationshipId
String

The Id of the relationship to be updated.

jsonPatchDocument
JsonPatchDocument

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

ifMatch
Nullable<ETag>

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

cancellationToken
CancellationToken

The cancellation token.

Returns

The HTTP response Response. This response object includes an HTTP header that gives you the updated ETag for this resource.

Exceptions

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

The exception is thrown when digitalTwinId or relationshipId is null.

Remarks

For more samples, see our repo samples.

Applies to

See also