Skip to main content

text_blocklists

Creates, updates, deletes, gets or lists a text_blocklists resource.

Overview

Nametext_blocklists
TypeResource
Idazure.ai_content_safety.text_blocklists

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
blocklistNamestringText blocklist name. Required.
descriptionstringText blocklist description.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_text_blocklistselectblocklist_name, endpointGet Text Blocklist By blocklistName. Returns text blocklist details.
list_text_blocklistsselectendpointGet All Text Blocklists. Get all text blocklists details.
create_or_update_text_blocklistinsertblocklist_name, endpoint, blocklistNameCreate Or Update Text Blocklist. Updates a text blocklist. If the blocklistName does not exist, a new blocklist will be created.
create_or_update_text_blocklistreplaceblocklist_name, endpoint, blocklistNameCreate Or Update Text Blocklist. Updates a text blocklist. If the blocklistName does not exist, a new blocklist will be created.
delete_text_blocklistdeleteblocklist_name, endpointDelete Text Blocklist By blocklistName. Deletes a text blocklist.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
blocklist_namestringText blocklist name. Required.
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )

SELECT examples

Get Text Blocklist By blocklistName. Returns text blocklist details.

SELECT
blocklistName,
description
FROM azure.ai_content_safety.text_blocklists
WHERE blocklist_name = '{{ blocklist_name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

INSERT examples

Create Or Update Text Blocklist. Updates a text blocklist. If the blocklistName does not exist, a new blocklist will be created.

INSERT INTO azure.ai_content_safety.text_blocklists (
blocklistName,
description,
blocklist_name,
endpoint
)
SELECT
'{{ blocklistName }}' /* required */,
'{{ description }}',
'{{ blocklist_name }}',
'{{ endpoint }}'
RETURNING
blocklistName,
description
;

REPLACE examples

Create Or Update Text Blocklist. Updates a text blocklist. If the blocklistName does not exist, a new blocklist will be created.

REPLACE azure.ai_content_safety.text_blocklists
SET
blocklistName = '{{ blocklistName }}',
description = '{{ description }}'
WHERE
blocklist_name = '{{ blocklist_name }}' --required
AND endpoint = '{{ endpoint }}' --required
AND blocklistName = '{{ blocklistName }}' --required
RETURNING
blocklistName,
description;

DELETE examples

Delete Text Blocklist By blocklistName. Deletes a text blocklist.

DELETE FROM azure.ai_content_safety.text_blocklists
WHERE blocklist_name = '{{ blocklist_name }}' --required
AND endpoint = '{{ endpoint }}' --required
;