Share via


BlocklistClient.RemoveBlocklistItems Method

Definition

Overloads

RemoveBlocklistItems(String, RemoveTextBlocklistItemsOptions, CancellationToken)

Remove BlocklistItems From Text Blocklist.

RemoveBlocklistItems(String, RequestContent, RequestContext)

[Protocol Method] Remove BlocklistItems From Text Blocklist

RemoveBlocklistItems(String, RemoveTextBlocklistItemsOptions, CancellationToken)

Source:
BlocklistClient.cs

Remove BlocklistItems From Text Blocklist.

public virtual Azure.Response RemoveBlocklistItems (string name, Azure.AI.ContentSafety.RemoveTextBlocklistItemsOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member RemoveBlocklistItems : string * Azure.AI.ContentSafety.RemoveTextBlocklistItemsOptions * System.Threading.CancellationToken -> Azure.Response
override this.RemoveBlocklistItems : string * Azure.AI.ContentSafety.RemoveTextBlocklistItemsOptions * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function RemoveBlocklistItems (name As String, options As RemoveTextBlocklistItemsOptions, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

name
String

Text blocklist name.

options
RemoveTextBlocklistItemsOptions

Options for removing blocklist items.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

name or options is null.

name is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call RemoveBlocklistItems.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
BlocklistClient client = new BlocklistClient(endpoint, credential);

RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "<blocklistItemIds>" });
Response response = client.RemoveBlocklistItems("<Name>", options);

This sample shows how to call RemoveBlocklistItems with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
BlocklistClient client = new BlocklistClient(endpoint, credential);

RemoveTextBlocklistItemsOptions options = new RemoveTextBlocklistItemsOptions(new string[] { "<blocklistItemIds>" });
Response response = client.RemoveBlocklistItems("<Name>", options);

Remarks

Remove blocklistItems from a text blocklist. You can remove at most 100 BlocklistItems in one request.

Applies to

RemoveBlocklistItems(String, RequestContent, RequestContext)

Source:
BlocklistClient.cs

[Protocol Method] Remove BlocklistItems From Text Blocklist

public virtual Azure.Response RemoveBlocklistItems (string name, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member RemoveBlocklistItems : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.RemoveBlocklistItems : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function RemoveBlocklistItems (name As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response

Parameters

name
String

Text blocklist name.

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

name or content is null.

name is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call RemoveBlocklistItems.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
BlocklistClient client = new BlocklistClient(endpoint, credential);

using RequestContent content = RequestContent.Create(new
{
    blocklistItemIds = new object[]
    {
        "<blocklistItemIds>"
    },
});
Response response = client.RemoveBlocklistItems("<Name>", content);

Console.WriteLine(response.Status);

This sample shows how to call RemoveBlocklistItems with all parameters and request content.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
BlocklistClient client = new BlocklistClient(endpoint, credential);

using RequestContent content = RequestContent.Create(new
{
    blocklistItemIds = new object[]
    {
        "<blocklistItemIds>"
    },
});
Response response = client.RemoveBlocklistItems("<Name>", content);

Console.WriteLine(response.Status);

Applies to