Share via


TypeDefinition.BatchDeleteAsync Method

Definition

Overloads

Name Description
BatchDeleteAsync(AtlasTypesDef, CancellationToken)

Delete API for all types in bulk.

BatchDeleteAsync(RequestContent, RequestContext)

[Protocol Method] Delete API for all types in bulk.

BatchDeleteAsync(AtlasTypesDef, CancellationToken)

Source:
TypeDefinition.cs

Delete API for all types in bulk.

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

Parameters

body
AtlasTypesDef

Body parameter.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

body is null.

Examples

This sample shows how to call BatchDeleteAsync.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient();

AtlasTypesDef body = new AtlasTypesDef
{
    ClassificationDefs = { },
    EntityDefs = {new AtlasEntityDef
    {
        Name = "azure_sql_server_example",
        TypeVersion = "1.0",
        AttributeDefs = {new AtlasAttributeDef
        {
            Cardinality = CardinalityValue.Set,
            IsIndexable = false,
            IsOptional = true,
            IsUnique = false,
            Name = "databases",
            TypeName = "array<azure_sql_db>",
        }},
        SuperTypes = {"azure_resource"},
    }},
    EnumDefs = { },
    RelationshipDefs = { },
    StructDefs = { },
};
Response response = await client.BatchDeleteAsync(body);

Applies to

BatchDeleteAsync(RequestContent, RequestContext)

Source:
TypeDefinition.cs

[Protocol Method] Delete API for all types in bulk.

public virtual System.Threading.Tasks.Task<Azure.Response> BatchDeleteAsync(Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member BatchDeleteAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.BatchDeleteAsync : Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function BatchDeleteAsync (content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)

Parameters

content
RequestContent

The content to send as the body of the request.

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

content is null.

Service returned a non-success status code.

Examples

This sample shows how to call BatchDeleteAsync.

Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient();

using RequestContent content = RequestContent.Create(new
{
    enumDefs = Array.Empty<object>(),
    structDefs = Array.Empty<object>(),
    classificationDefs = Array.Empty<object>(),
    entityDefs = new object[]
    {
        new
        {
            name = "azure_sql_server_example",
            superTypes = new object[]
            {
                "azure_resource"
            },
            typeVersion = "1.0",
            attributeDefs = new object[]
            {
                new
                {
                    name = "databases",
                    typeName = "array<azure_sql_db>",
                    cardinality = "SET",
                    isIndexable = false,
                    isOptional = true,
                    isUnique = false,
                }
            },
        }
    },
    relationshipDefs = Array.Empty<object>(),
});
Response response = await client.BatchDeleteAsync(content);

Console.WriteLine(response.Status);

Applies to