Freigeben über


Relationship.GetRelationshipAsync Method

Definition

Overloads

Name Description
GetRelationshipAsync(String, Nullable<Boolean>, RequestContext)

[Protocol Method] Get relationship information between entities by its GUID.

GetRelationshipAsync(String, Nullable<Boolean>, CancellationToken)

Get relationship information between entities by its GUID.

GetRelationshipAsync(String, Nullable<Boolean>, RequestContext)

Source:
Relationship.cs

[Protocol Method] Get relationship information between entities by its GUID.

public virtual System.Threading.Tasks.Task<Azure.Response> GetRelationshipAsync(string guid, bool? extendedInfo, Azure.RequestContext context);
abstract member GetRelationshipAsync : string * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetRelationshipAsync : string * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetRelationshipAsync (guid As String, extendedInfo As Nullable(Of Boolean), context As RequestContext) As Task(Of Response)

Parameters

guid
String

The globally unique identifier of the relationship.

extendedInfo
Nullable<Boolean>

Limits whether includes extended information.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

guid is null.

guid is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetRelationshipAsync and parse the result.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient();

Response response = await client.GetRelationshipAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb", null, null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

Applies to

GetRelationshipAsync(String, Nullable<Boolean>, CancellationToken)

Source:
Relationship.cs

Get relationship information between entities by its GUID.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasRelationshipWithExtInfo>> GetRelationshipAsync(string guid, bool? extendedInfo = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRelationshipAsync : string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasRelationshipWithExtInfo>>
override this.GetRelationshipAsync : string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasRelationshipWithExtInfo>>
Public Overridable Function GetRelationshipAsync (guid As String, Optional extendedInfo As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AtlasRelationshipWithExtInfo))

Parameters

guid
String

The globally unique identifier of the relationship.

extendedInfo
Nullable<Boolean>

Limits whether includes extended information.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

guid is null.

guid is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetRelationshipAsync.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient();

Response<AtlasRelationshipWithExtInfo> response = await client.GetRelationshipAsync("5cf8a9e5-c9fd-abe0-2e8c-d40024263dcb");

Applies to