Share via


TypeDefinition.GetHeadersAsync Method

Definition

Overloads

GetHeadersAsync(Nullable<Boolean>, Nullable<TypeCategory>, CancellationToken)

List all type definitions returned as a list of minimal information header.

GetHeadersAsync(Nullable<Boolean>, String, RequestContext)

[Protocol Method] List all type definitions returned as a list of minimal information header.

GetHeadersAsync(Nullable<Boolean>, Nullable<TypeCategory>, CancellationToken)

Source:
TypeDefinition.cs

List all type definitions returned as a list of minimal information header.

public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasTypeDefHeader>>> GetHeadersAsync (bool? includeTermTemplate = default, Azure.Analytics.Purview.DataMap.TypeCategory? type = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetHeadersAsync : Nullable<bool> * Nullable<Azure.Analytics.Purview.DataMap.TypeCategory> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasTypeDefHeader>>>
override this.GetHeadersAsync : Nullable<bool> * Nullable<Azure.Analytics.Purview.DataMap.TypeCategory> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.Analytics.Purview.DataMap.AtlasTypeDefHeader>>>
Public Overridable Function GetHeadersAsync (Optional includeTermTemplate As Nullable(Of Boolean) = Nothing, Optional type As Nullable(Of TypeCategory) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of AtlasTypeDefHeader)))

Parameters

includeTermTemplate
Nullable<Boolean>

Whether include termtemplatedef when return all typedefs. This is always true when search filter type=term_template

type
Nullable<TypeCategory>

Typedef name as search filter when get typedefs.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetHeadersAsync.

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

Response<IReadOnlyList<AtlasTypeDefHeader>> response = await client.GetHeadersAsync();

This sample shows how to call GetHeadersAsync with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01");

Response<IReadOnlyList<AtlasTypeDefHeader>> response = await client.GetHeadersAsync(includeTermTemplate: true, type: TypeCategory.Primitive);

Applies to

GetHeadersAsync(Nullable<Boolean>, String, RequestContext)

Source:
TypeDefinition.cs

[Protocol Method] List all type definitions returned as a list of minimal information header.

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

Parameters

includeTermTemplate
Nullable<Boolean>

Whether include termtemplatedef when return all typedefs. This is always true when search filter type=term_template

type
String

Typedef name as search filter when get typedefs. Allowed values: "PRIMITIVE" | "OBJECT_ID_TYPE" | "ENUM" | "STRUCT" | "CLASSIFICATION" | "ENTITY" | "ARRAY" | "MAP" | "RELATIONSHIP" | "TERM_TEMPLATE".

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

Service returned a non-success status code.

Examples

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

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

Response response = await client.GetHeadersAsync(null, null, null);

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

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

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01");

Response response = await client.GetHeadersAsync(true, "PRIMITIVE", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("category").ToString());
Console.WriteLine(result[0].GetProperty("guid").ToString());
Console.WriteLine(result[0].GetProperty("name").ToString());

Applies to