Udostępnij przez


Entity.BatchDelete Method

Definition

Overloads

Name Description
BatchDelete(IEnumerable<String>, CancellationToken)

Delete a list of entities in bulk identified by their GUIDs or unique attributes.

BatchDelete(IEnumerable<String>, RequestContext)

[Protocol Method] Delete a list of entities in bulk identified by their GUIDs or unique attributes.

BatchDelete(IEnumerable<String>, CancellationToken)

Source:
Entity.cs

Delete a list of entities in bulk identified by their GUIDs or unique attributes.

public virtual Azure.Response<Azure.Analytics.Purview.DataMap.EntityMutationResult> BatchDelete(System.Collections.Generic.IEnumerable<string> guid, System.Threading.CancellationToken cancellationToken = default);
abstract member BatchDelete : seq<string> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.EntityMutationResult>
override this.BatchDelete : seq<string> * System.Threading.CancellationToken -> Azure.Response<Azure.Analytics.Purview.DataMap.EntityMutationResult>
Public Overridable Function BatchDelete (guid As IEnumerable(Of String), Optional cancellationToken As CancellationToken = Nothing) As Response(Of EntityMutationResult)

Parameters

guid
IEnumerable<String>

An array of GUIDs of entities to delete.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

guid is null.

Examples

This sample shows how to call BatchDelete.

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

Response<EntityMutationResult> response = client.BatchDelete(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" });

Applies to

BatchDelete(IEnumerable<String>, RequestContext)

Source:
Entity.cs

[Protocol Method] Delete a list of entities in bulk identified by their GUIDs or unique attributes.

public virtual Azure.Response BatchDelete(System.Collections.Generic.IEnumerable<string> guid, Azure.RequestContext context);
abstract member BatchDelete : seq<string> * Azure.RequestContext -> Azure.Response
override this.BatchDelete : seq<string> * Azure.RequestContext -> Azure.Response
Public Overridable Function BatchDelete (guid As IEnumerable(Of String), context As RequestContext) As Response

Parameters

guid
IEnumerable<String>

An array of GUIDs of entities to delete.

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

guid is null.

Service returned a non-success status code.

Examples

This sample shows how to call BatchDelete and parse the result.

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

Response response = client.BatchDelete(new string[] { "18e06957-e265-967a-07f1-e14e2ab8940f", "cc0730ba-9b30-41f0-6953-559d17626d2b" }, null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

Applies to