Share via


TypeDefinition.BatchDeleteAsync Method

Definition

Overloads

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 atlasTypesDef, 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 (atlasTypesDef As AtlasTypesDef, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response)

Parameters

atlasTypesDef
AtlasTypesDef

The definitions of types.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

atlasTypesDef is null.

Examples

This sample shows how to call BatchDeleteAsync.

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

AtlasTypesDef atlasTypesDef = new AtlasTypesDef();
Response response = await client.BatchDeleteAsync(atlasTypesDef);

This sample shows how to call BatchDeleteAsync with all parameters.

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

AtlasTypesDef atlasTypesDef = new AtlasTypesDef
{
    BusinessMetadataDefs = {new AtlasBusinessMetadataDef
    {
        Category = TypeCategory.Primitive,
        CreateTime = 1234L,
        CreatedBy = "<createdBy>",
        DateFormatter = new AtlasDateFormat
        {
            AvailableLocales = {"<availableLocales>"},
            Calendar = 123.45F,
            DateInstance = default,
            DateTimeInstance = default,
            Instance = default,
            Lenient = true,
            NumberFormat = new AtlasNumberFormat
            {
                AvailableLocales = {"<availableLocales>"},
                Currency = "<currency>",
                CurrencyInstance = default,
                GroupingUsed = true,
                Instance = default,
                IntegerInstance = default,
                MaximumFractionDigits = 1234,
                MaximumIntegerDigits = 1234,
                MinimumFractionDigits = 1234,
                MinimumIntegerDigits = 1234,
                NumberInstance = default,
                ParseIntegerOnly = true,
                PercentInstance = default,
                RoundingMode = RoundingMode.Up,
            },
            TimeInstance = default,
            TimeZone = new AtlasTimeZone
            {
                DstSavings = 1234,
                Id = "<id>",
                AvailableIds = {"<availableIds>"},
                Default = default,
                DisplayName = "<displayName>",
                RawOffset = 1234,
            },
        },
        Description = "<description>",
        Guid = "<guid>",
        Name = "<name>",
        Options =
        {
            ["key"] = "<options>"
        },
        ServiceType = "<serviceType>",
        TypeVersion = "<typeVersion>",
        UpdateTime = 1234L,
        UpdatedBy = "<updatedBy>",
        Version = 1234L,
        LastModifiedTS = "<lastModifiedTS>",
        AttributeDefs = {new AtlasAttributeDef
        {
            Cardinality = CardinalityValue.Single,
            Constraints = {new AtlasConstraintDef
            {
                Params =
                {
                    ["key"] = BinaryData.FromObjectAsJson(new object())
                },
                Type = "<type>",
            }},
            DefaultValue = "<defaultValue>",
            Description = "<description>",
            IncludeInNotification = true,
            IsIndexable = true,
            IsOptional = true,
            IsUnique = true,
            Name = "<name>",
            Options =
            {
                ["key"] = "<options>"
            },
            TypeName = "<typeName>",
            ValuesMaxCount = 1234,
            ValuesMinCount = 1234,
        }},
    }},
    ClassificationDefs = {new AtlasClassificationDef
    {
        Category = TypeCategory.Primitive,
        CreateTime = 1234L,
        CreatedBy = "<createdBy>",
        DateFormatter = default,
        Description = "<description>",
        Guid = "<guid>",
        Name = "<name>",
        Options =
        {
            ["key"] = "<options>"
        },
        ServiceType = "<serviceType>",
        TypeVersion = "<typeVersion>",
        UpdateTime = 1234L,
        UpdatedBy = "<updatedBy>",
        Version = 1234L,
        LastModifiedTS = "<lastModifiedTS>",
        AttributeDefs = {default},
        EntityTypes = {"<entityTypes>"},
        SubTypes = {"<subTypes>"},
        SuperTypes = {"<superTypes>"},
    }},
    EntityDefs = {new AtlasEntityDef
    {
        Category = TypeCategory.Primitive,
        CreateTime = 1234L,
        CreatedBy = "<createdBy>",
        DateFormatter = default,
        Description = "<description>",
        Guid = "<guid>",
        Name = "<name>",
        Options =
        {
            ["key"] = "<options>"
        },
        ServiceType = "<serviceType>",
        TypeVersion = "<typeVersion>",
        UpdateTime = 1234L,
        UpdatedBy = "<updatedBy>",
        Version = 1234L,
        LastModifiedTS = "<lastModifiedTS>",
        AttributeDefs = {default},
        SubTypes = {"<subTypes>"},
        SuperTypes = {"<superTypes>"},
        RelationshipAttributeDefs = {new AtlasRelationshipAttributeDef
        {
            Cardinality = CardinalityValue.Single,
            Constraints = {default},
            DefaultValue = "<defaultValue>",
            Description = "<description>",
            IncludeInNotification = true,
            IsIndexable = true,
            IsOptional = true,
            IsUnique = true,
            Name = "<name>",
            Options =
            {
                ["key"] = "<options>"
            },
            TypeName = "<typeName>",
            ValuesMaxCount = 1234,
            ValuesMinCount = 1234,
            IsLegacyAttribute = true,
            RelationshipTypeName = "<relationshipTypeName>",
        }},
    }},
    EnumDefs = {new AtlasEnumDef
    {
        Category = TypeCategory.Primitive,
        CreateTime = 1234L,
        CreatedBy = "<createdBy>",
        DateFormatter = default,
        Description = "<description>",
        Guid = "<guid>",
        Name = "<name>",
        Options =
        {
            ["key"] = "<options>"
        },
        ServiceType = "<serviceType>",
        TypeVersion = "<typeVersion>",
        UpdateTime = 1234L,
        UpdatedBy = "<updatedBy>",
        Version = 1234L,
        LastModifiedTS = "<lastModifiedTS>",
        DefaultValue = "<defaultValue>",
        ElementDefs = {new AtlasEnumElementDef
        {
            Description = "<description>",
            Ordinal = 1234,
            Value = "<value>",
        }},
    }},
    RelationshipDefs = {new AtlasRelationshipDef
    {
        Category = TypeCategory.Primitive,
        CreateTime = 1234L,
        CreatedBy = "<createdBy>",
        DateFormatter = default,
        Description = "<description>",
        Guid = "<guid>",
        Name = "<name>",
        Options =
        {
            ["key"] = "<options>"
        },
        ServiceType = "<serviceType>",
        TypeVersion = "<typeVersion>",
        UpdateTime = 1234L,
        UpdatedBy = "<updatedBy>",
        Version = 1234L,
        LastModifiedTS = "<lastModifiedTS>",
        AttributeDefs = {default},
        EndDef1 = new AtlasRelationshipEndDef
        {
            Cardinality = CardinalityValue.Single,
            Description = "<description>",
            IsContainer = true,
            IsLegacyAttribute = true,
            Name = "<name>",
            Type = "<type>",
        },
        EndDef2 = default,
        RelationshipCategory = RelationshipCategory.Association,
        RelationshipLabel = "<relationshipLabel>",
    }},
    StructDefs = {new AtlasStructDef
    {
        Category = TypeCategory.Primitive,
        CreateTime = 1234L,
        CreatedBy = "<createdBy>",
        DateFormatter = default,
        Description = "<description>",
        Guid = "<guid>",
        Name = "<name>",
        Options =
        {
            ["key"] = "<options>"
        },
        ServiceType = "<serviceType>",
        TypeVersion = "<typeVersion>",
        UpdateTime = 1234L,
        UpdatedBy = "<updatedBy>",
        Version = 1234L,
        LastModifiedTS = "<lastModifiedTS>",
        AttributeDefs = {default},
    }},
    TermTemplateDefs = {new TermTemplateDef
    {
        Category = TypeCategory.Primitive,
        CreateTime = 1234L,
        CreatedBy = "<createdBy>",
        DateFormatter = default,
        Description = "<description>",
        Guid = "<guid>",
        Name = "<name>",
        Options =
        {
            ["key"] = "<options>"
        },
        ServiceType = "<serviceType>",
        TypeVersion = "<typeVersion>",
        UpdateTime = 1234L,
        UpdatedBy = "<updatedBy>",
        Version = 1234L,
        LastModifiedTS = "<lastModifiedTS>",
        AttributeDefs = {default},
    }},
};
Response response = await client.BatchDeleteAsync(atlasTypesDef);

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

using RequestContent content = RequestContent.Create(new object());
Response response = await client.BatchDeleteAsync(content);

Console.WriteLine(response.Status);

This sample shows how to call BatchDeleteAsync with all request content.

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

using RequestContent content = RequestContent.Create(new
{
    businessMetadataDefs = new object[]
    {
        new
        {
            category = "PRIMITIVE",
            createTime = 1234L,
            createdBy = "<createdBy>",
            dateFormatter = new
            {
                availableLocales = new object[]
                {
                    "<availableLocales>"
                },
                calendar = 123.45F,
                lenient = true,
                numberFormat = new
                {
                    availableLocales = new object[]
                    {
                        "<availableLocales>"
                    },
                    currency = "<currency>",
                    groupingUsed = true,
                    maximumFractionDigits = 1234,
                    maximumIntegerDigits = 1234,
                    minimumFractionDigits = 1234,
                    minimumIntegerDigits = 1234,
                    parseIntegerOnly = true,
                    roundingMode = "UP",
                },
                timeZone = new Dictionary<string, object>
                {
                    ["dstSavings"] = 1234,
                    ["id"] = "<id>",
                    ["availableIds"] = new object[]
                    {
                        "<availableIds>"
                    },
                    ["default"] = null,
                    ["displayName"] = "<displayName>",
                    ["rawOffset"] = 1234
                },
            },
            description = "<description>",
            guid = "<guid>",
            name = "<name>",
            options = new
            {
                key = "<options>",
            },
            serviceType = "<serviceType>",
            typeVersion = "<typeVersion>",
            updateTime = 1234L,
            updatedBy = "<updatedBy>",
            version = 1234L,
            lastModifiedTS = "<lastModifiedTS>",
            attributeDefs = new object[]
            {
                new
                {
                    cardinality = "SINGLE",
                    constraints = new object[]
                    {
                        new Dictionary<string, object>
                        {
                            ["params"] = new
                            {
                                key = new object(),
                            },
                            ["type"] = "<type>"
                        }
                    },
                    defaultValue = "<defaultValue>",
                    description = "<description>",
                    includeInNotification = true,
                    isIndexable = true,
                    isOptional = true,
                    isUnique = true,
                    name = "<name>",
                    options = new
                    {
                        key = "<options>",
                    },
                    typeName = "<typeName>",
                    valuesMaxCount = 1234,
                    valuesMinCount = 1234,
                }
            },
        }
    },
    classificationDefs = new object[]
    {
        new
        {
            category = "PRIMITIVE",
            createTime = 1234L,
            createdBy = "<createdBy>",
            description = "<description>",
            guid = "<guid>",
            name = "<name>",
            options = new
            {
                key = "<options>",
            },
            serviceType = "<serviceType>",
            typeVersion = "<typeVersion>",
            updateTime = 1234L,
            updatedBy = "<updatedBy>",
            version = 1234L,
            lastModifiedTS = "<lastModifiedTS>",
            attributeDefs = new object[]
            {
                null
            },
            entityTypes = new object[]
            {
                "<entityTypes>"
            },
            subTypes = new object[]
            {
                "<subTypes>"
            },
            superTypes = new object[]
            {
                "<superTypes>"
            },
        }
    },
    entityDefs = new object[]
    {
        new
        {
            category = "PRIMITIVE",
            createTime = 1234L,
            createdBy = "<createdBy>",
            description = "<description>",
            guid = "<guid>",
            name = "<name>",
            options = new
            {
                key = "<options>",
            },
            serviceType = "<serviceType>",
            typeVersion = "<typeVersion>",
            updateTime = 1234L,
            updatedBy = "<updatedBy>",
            version = 1234L,
            lastModifiedTS = "<lastModifiedTS>",
            attributeDefs = new object[]
            {
                null
            },
            subTypes = new object[]
            {
                "<subTypes>"
            },
            superTypes = new object[]
            {
                "<superTypes>"
            },
            relationshipAttributeDefs = new object[]
            {
                new
                {
                    cardinality = "SINGLE",
                    constraints = new object[]
                    {
                        null
                    },
                    defaultValue = "<defaultValue>",
                    description = "<description>",
                    includeInNotification = true,
                    isIndexable = true,
                    isOptional = true,
                    isUnique = true,
                    name = "<name>",
                    options = new
                    {
                        key = "<options>",
                    },
                    typeName = "<typeName>",
                    valuesMaxCount = 1234,
                    valuesMinCount = 1234,
                    isLegacyAttribute = true,
                    relationshipTypeName = "<relationshipTypeName>",
                }
            },
        }
    },
    enumDefs = new object[]
    {
        new
        {
            category = "PRIMITIVE",
            createTime = 1234L,
            createdBy = "<createdBy>",
            description = "<description>",
            guid = "<guid>",
            name = "<name>",
            options = new
            {
                key = "<options>",
            },
            serviceType = "<serviceType>",
            typeVersion = "<typeVersion>",
            updateTime = 1234L,
            updatedBy = "<updatedBy>",
            version = 1234L,
            lastModifiedTS = "<lastModifiedTS>",
            defaultValue = "<defaultValue>",
            elementDefs = new object[]
            {
                new
                {
                    description = "<description>",
                    ordinal = 1234,
                    value = "<value>",
                }
            },
        }
    },
    relationshipDefs = new object[]
    {
        new
        {
            category = "PRIMITIVE",
            createTime = 1234L,
            createdBy = "<createdBy>",
            description = "<description>",
            guid = "<guid>",
            name = "<name>",
            options = new
            {
                key = "<options>",
            },
            serviceType = "<serviceType>",
            typeVersion = "<typeVersion>",
            updateTime = 1234L,
            updatedBy = "<updatedBy>",
            version = 1234L,
            lastModifiedTS = "<lastModifiedTS>",
            attributeDefs = new object[]
            {
                null
            },
            endDef1 = new
            {
                cardinality = "SINGLE",
                description = "<description>",
                isContainer = true,
                isLegacyAttribute = true,
                name = "<name>",
                type = "<type>",
            },
            relationshipCategory = "ASSOCIATION",
            relationshipLabel = "<relationshipLabel>",
        }
    },
    structDefs = new object[]
    {
        new
        {
            category = "PRIMITIVE",
            createTime = 1234L,
            createdBy = "<createdBy>",
            description = "<description>",
            guid = "<guid>",
            name = "<name>",
            options = new
            {
                key = "<options>",
            },
            serviceType = "<serviceType>",
            typeVersion = "<typeVersion>",
            updateTime = 1234L,
            updatedBy = "<updatedBy>",
            version = 1234L,
            lastModifiedTS = "<lastModifiedTS>",
            attributeDefs = new object[]
            {
                null
            },
        }
    },
    termTemplateDefs = new object[]
    {
        new
        {
            category = "PRIMITIVE",
            createTime = 1234L,
            createdBy = "<createdBy>",
            description = "<description>",
            guid = "<guid>",
            name = "<name>",
            options = new
            {
                key = "<options>",
            },
            serviceType = "<serviceType>",
            typeVersion = "<typeVersion>",
            updateTime = 1234L,
            updatedBy = "<updatedBy>",
            version = 1234L,
            lastModifiedTS = "<lastModifiedTS>",
            attributeDefs = new object[]
            {
                null
            },
        }
    },
});
Response response = await client.BatchDeleteAsync(content);

Console.WriteLine(response.Status);

Applies to