次の方法で共有


Entity.GetClassificationsAsync Method

Definition

Overloads

GetClassificationsAsync(String, RequestContext)

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

GetClassificationsAsync(String, CancellationToken)

List classifications for a given entity represented by a GUID.

GetClassificationsAsync(String, RequestContext)

Source:
Entity.cs

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

public virtual System.Threading.Tasks.Task<Azure.Response> GetClassificationsAsync (string guid, Azure.RequestContext context);
abstract member GetClassificationsAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetClassificationsAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetClassificationsAsync (guid As String, context As RequestContext) As Task(Of 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 GetClassificationsAsync 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 = await client.GetClassificationsAsync("<guid>", null);

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

This sample shows how to call GetClassificationsAsync 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 = await client.GetClassificationsAsync("<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

GetClassificationsAsync(String, CancellationToken)

Source:
Entity.cs

List classifications for a given entity represented by a GUID.

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

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

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

This sample shows how to call GetClassificationsAsync 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 = await client.GetClassificationsAsync("<guid>");

Applies to