Share via


TypeDefinition.BatchDelete Method

Definition

Overloads

BatchDelete(AtlasTypesDef, CancellationToken)

Delete API for all types in bulk.

BatchDelete(RequestContent, RequestContext)

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

BatchDelete(AtlasTypesDef, CancellationToken)

Source:
TypeDefinition.cs

Delete API for all types in bulk.

public virtual Azure.Response BatchDelete (Azure.Analytics.Purview.DataMap.AtlasTypesDef atlasTypesDef, System.Threading.CancellationToken cancellationToken = default);
abstract member BatchDelete : Azure.Analytics.Purview.DataMap.AtlasTypesDef * System.Threading.CancellationToken -> Azure.Response
override this.BatchDelete : Azure.Analytics.Purview.DataMap.AtlasTypesDef * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function BatchDelete (atlasTypesDef As AtlasTypesDef, Optional cancellationToken As CancellationToken = Nothing) As 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 BatchDelete.

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 = client.BatchDelete(atlasTypesDef);

This sample shows how to call BatchDelete 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 = client.BatchDelete(atlasTypesDef);

Applies to

BatchDelete(RequestContent, RequestContext)

Source:
TypeDefinition.cs

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

public virtual Azure.Response BatchDelete (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member BatchDelete : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.BatchDelete : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function BatchDelete (content As RequestContent, Optional context As RequestContext = Nothing) As 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 BatchDelete.

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 = client.BatchDelete(content);

Console.WriteLine(response.Status);

This sample shows how to call BatchDelete 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 = client.BatchDelete(content);

Console.WriteLine(response.Status);

Applies to