Share via


Entity.GetClassifications Method

Definition

Overloads

GetClassifications(String, RequestContext)

[Protocol Method] List classifications for a given entity represented by a GUID.

GetClassifications(String, CancellationToken)

List classifications for a given entity represented by a GUID.

GetClassifications(String, RequestContext)

Source:
Entity.cs

[Protocol Method] List classifications for a given entity represented by a GUID.

public virtual Azure.Response GetClassifications (string guid, Azure.RequestContext context);
abstract member GetClassifications : string * Azure.RequestContext -> Azure.Response
override this.GetClassifications : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetClassifications (guid As String, context As RequestContext) As Response

Parameters

guid
String

The globally unique identifier of the entity.

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 GetClassifications and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

Response response = client.GetClassifications("<guid>", null);

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

This sample shows how to call GetClassifications with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

Response response = client.GetClassifications("<guid>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("list")[0].ToString());
Console.WriteLine(result.GetProperty("pageSize").ToString());
Console.WriteLine(result.GetProperty("sortBy").ToString());
Console.WriteLine(result.GetProperty("sortType").ToString());
Console.WriteLine(result.GetProperty("startIndex").ToString());
Console.WriteLine(result.GetProperty("totalCount").ToString());

Applies to

GetClassifications(String, CancellationToken)

Source:
Entity.cs

List classifications for a given entity represented by a GUID.

public virtual Azure.Response<Azure.Analytics.Purview.DataMap.AtlasClassifications> GetClassifications (string guid, System.Threading.CancellationToken cancellationToken = default);
abstract member GetClassifications : string * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasClassifications>
override this.GetClassifications : string * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.AtlasClassifications>
Public Overridable Function GetClassifications (guid As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AtlasClassifications)

Parameters

guid
String

The globally unique identifier of the entity.

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 GetClassifications.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

Response<AtlasClassifications> response = client.GetClassifications("<guid>");

This sample shows how to call GetClassifications with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
Entity client = new DataMapClient(endpoint, credential).GetEntityClient();

Response<AtlasClassifications> response = client.GetClassifications("<guid>");

Applies to