Partilhar via


Glossary.GetGlossaryAsync Method

Definition

Overloads

GetGlossaryAsync(String, RequestContext)

[Protocol Method] Get a specific Glossary by its GUID.

GetGlossaryAsync(String, CancellationToken)

Get a specific Glossary by its GUID.

GetGlossaryAsync(String, RequestContext)

Source:
Glossary.cs

[Protocol Method] Get a specific Glossary by its GUID.

public virtual System.Threading.Tasks.Task<Azure.Response> GetGlossaryAsync (string glossaryId, Azure.RequestContext context);
abstract member GetGlossaryAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetGlossaryAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetGlossaryAsync (glossaryId As String, context As RequestContext) As Task(Of Response)

Parameters

glossaryId
String

The globally unique identifier for glossary.

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

glossaryId is null.

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

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

Response response = await client.GetGlossaryAsync("<glossaryId>", null);

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

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

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

Response response = await client.GetGlossaryAsync("<glossaryId>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("guid").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("attributes").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("typeName").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityGuid").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("entityStatus").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("removePropagationsOnEntityDelete").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("endTime").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("classifications")[0].GetProperty("validityPeriods")[0].GetProperty("timeZone").ToString());
Console.WriteLine(result.GetProperty("longDescription").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("qualifiedName").ToString());
Console.WriteLine(result.GetProperty("shortDescription").ToString());
Console.WriteLine(result.GetProperty("lastModifiedTS").ToString());
Console.WriteLine(result.GetProperty("createTime").ToString());
Console.WriteLine(result.GetProperty("createdBy").ToString());
Console.WriteLine(result.GetProperty("updateTime").ToString());
Console.WriteLine(result.GetProperty("updatedBy").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("categoryGuid").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("parentCategoryGuid").ToString());
Console.WriteLine(result.GetProperty("categories")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("language").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("description").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("displayText").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("expression").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("relationGuid").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("steward").ToString());
Console.WriteLine(result.GetProperty("terms")[0].GetProperty("termGuid").ToString());
Console.WriteLine(result.GetProperty("usage").ToString());

Applies to

GetGlossaryAsync(String, CancellationToken)

Source:
Glossary.cs

Get a specific Glossary by its GUID.

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

Parameters

glossaryId
String

The globally unique identifier for glossary.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

glossaryId is null.

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

Examples

This sample shows how to call GetGlossaryAsync.

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

Response<AtlasGlossary> response = await client.GetGlossaryAsync("<glossaryId>");

This sample shows how to call GetGlossaryAsync with all parameters.

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

Response<AtlasGlossary> response = await client.GetGlossaryAsync("<glossaryId>");

Applies to