TypeDefinition.BatchDelete 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 |
|---|---|
| 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 body, 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 (body As AtlasTypesDef, Optional cancellationToken As CancellationToken = Nothing) As 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 BatchDelete.
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 = client.BatchDelete(body);
Applies to
BatchDelete(RequestContent, RequestContext)
- Source:
- TypeDefinition.cs
[Protocol Method] Delete API for all types in bulk.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler BatchDelete(AtlasTypesDef, CancellationToken) convenience overload with strongly typed models first.
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("<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 = client.BatchDelete(content);
Console.WriteLine(response.Status);