Partilhar via


Relationship.GetRelationship Method

Definition

Overloads

GetRelationship(String, Nullable<Boolean>, RequestContext)

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

GetRelationship(String, Nullable<Boolean>, CancellationToken)

Get relationship information between entities by its GUID.

GetRelationship(String, Nullable<Boolean>, RequestContext)

Source:
Relationship.cs

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

public virtual Azure.Response GetRelationship(string guid, bool? extendedInfo, Azure.RequestContext context);
abstract member GetRelationship : string * Nullable<bool> * Azure.RequestContext -> Azure.Response
override this.GetRelationship : string * Nullable<bool> * Azure.RequestContext -> Azure.Response
Public Overridable Function GetRelationship (guid As String, extendedInfo As Nullable(Of Boolean), context As RequestContext) As 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 GetRelationship and parse the result.

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

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

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

Applies to

GetRelationship(String, Nullable<Boolean>, CancellationToken)

Source:
Relationship.cs

Get relationship information between entities by its GUID.

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

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

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

Applies to