TypeDefinition.GetTypeDefinitionAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetTypeDefinitionAsync(Nullable<Boolean>, String, RequestContext) |
[Protocol Method] List all type definitions in bulk.
|
| GetTypeDefinitionAsync(Nullable<Boolean>, Nullable<TypeCategory>, CancellationToken) |
List all type definitions in bulk. |
GetTypeDefinitionAsync(Nullable<Boolean>, String, RequestContext)
- Source:
- TypeDefinition.cs
[Protocol Method] List all type definitions in bulk.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetTypeDefinitionAsync(Nullable<Boolean>, Nullable<TypeCategory>, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> GetTypeDefinitionAsync(bool? includeTermTemplate, string type, Azure.RequestContext context);
abstract member GetTypeDefinitionAsync : Nullable<bool> * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetTypeDefinitionAsync : Nullable<bool> * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetTypeDefinitionAsync (includeTermTemplate As Nullable(Of Boolean), type As String, context As RequestContext) As Task(Of Response)
Parameters
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 GetTypeDefinitionAsync and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01");
Response response = await client.GetTypeDefinitionAsync(true, null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
This sample shows how to call GetTypeDefinitionAsync and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01");
Response response = await client.GetTypeDefinitionAsync(null, "ENUM", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
This sample shows how to call GetTypeDefinitionAsync and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01");
Response response = await client.GetTypeDefinitionAsync(null, "TERM_TEMPLATE", null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
Applies to
GetTypeDefinitionAsync(Nullable<Boolean>, Nullable<TypeCategory>, CancellationToken)
- Source:
- TypeDefinition.cs
List all type definitions in bulk.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasTypesDef>> GetTypeDefinitionAsync(bool? includeTermTemplate = default, Azure.Analytics.Purview.DataMap.TypeCategory? type = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTypeDefinitionAsync : Nullable<bool> * Nullable<Azure.Analytics.Purview.DataMap.TypeCategory> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasTypesDef>>
override this.GetTypeDefinitionAsync : Nullable<bool> * Nullable<Azure.Analytics.Purview.DataMap.TypeCategory> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Analytics.Purview.DataMap.AtlasTypesDef>>
Public Overridable Function GetTypeDefinitionAsync (Optional includeTermTemplate As Nullable(Of Boolean) = Nothing, Optional type As Nullable(Of TypeCategory) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AtlasTypesDef))
Parameters
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 GetTypeDefinitionAsync.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01");
Response<AtlasTypesDef> response = await client.GetTypeDefinitionAsync();
This sample shows how to call GetTypeDefinitionAsync.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01");
Response<AtlasTypesDef> response = await client.GetTypeDefinitionAsync();
This sample shows how to call GetTypeDefinitionAsync.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(apiVersion: "2023-09-01");
Response<AtlasTypesDef> response = await client.GetTypeDefinitionAsync();