DigitalTwinsClient.GetRelationship<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a relationship on a digital twin synchronously.
public virtual Azure.Response<T> GetRelationship<T> (string digitalTwinId, string relationshipId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRelationship : string * string * System.Threading.CancellationToken -> Azure.Response<'T>
override this.GetRelationship : string * string * System.Threading.CancellationToken -> Azure.Response<'T>
Public Overridable Function GetRelationship(Of T) (digitalTwinId As String, relationshipId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of T)
Type Parameters
- T
The type to deserialize the relationship to.
Parameters
- digitalTwinId
- String
The Id of the source digital twin.
- relationshipId
- String
The Id of the relationship to retrieve.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
The deserialized application/json relationship corresponding to the provided relationshipId and the HTTP response Response<T>.
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.