Skip to main content

rai_blocklist_items

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

Overview

Namerai_blocklist_items
TypeResource
Idazure.cognitive_services.rai_blocklist_items

Fields

The following fields are returned by SELECT queries:

OK -- Get the custom blocklist Item successfully.

NameDatatypeDescription
etagstringResource Etag.
propertiesobjectProperties of Cognitive Services RaiBlocklist Item.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, accountName, subscriptionId, raiBlocklistName, raiBlocklistItemNameGets the specified custom blocklist Item associated with the custom blocklist.
listselectresourceGroupName, accountName, subscriptionId, raiBlocklistNameGets the blocklist items associated with the custom blocklist.
create_or_updateinsertresourceGroupName, accountName, subscriptionId, raiBlocklistName, raiBlocklistItemNameUpdate the state of specified blocklist item associated with the Azure OpenAI account.
deletedeleteresourceGroupName, accountName, subscriptionId, raiBlocklistName, raiBlocklistItemNameDeletes the specified blocklist Item associated with the custom blocklist.
batch_addexecresourceGroupName, accountName, subscriptionId, raiBlocklistNameBatch operation to add blocklist items.
batch_deleteexecresourceGroupName, accountName, subscriptionId, raiBlocklistNameBatch operation to delete blocklist items.

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
accountNamestringThe name of Cognitive Services account.
raiBlocklistItemNamestringThe name of the RaiBlocklist Item associated with the custom blocklist
raiBlocklistNamestringThe name of the RaiBlocklist associated with the Cognitive Services Account
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Gets the specified custom blocklist Item associated with the custom blocklist.

SELECT
etag,
properties,
systemData,
tags
FROM azure.cognitive_services.rai_blocklist_items
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND raiBlocklistName = '{{ raiBlocklistName }}' -- required
AND raiBlocklistItemName = '{{ raiBlocklistItemName }}' -- required
;

INSERT examples

Update the state of specified blocklist item associated with the Azure OpenAI account.

INSERT INTO azure.cognitive_services.rai_blocklist_items (
data__tags,
data__properties,
resourceGroupName,
accountName,
subscriptionId,
raiBlocklistName,
raiBlocklistItemName
)
SELECT
'{{ tags }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ subscriptionId }}',
'{{ raiBlocklistName }}',
'{{ raiBlocklistItemName }}'
RETURNING
etag,
properties,
systemData,
tags
;

DELETE examples

Deletes the specified blocklist Item associated with the custom blocklist.

DELETE FROM azure.cognitive_services.rai_blocklist_items
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND raiBlocklistName = '{{ raiBlocklistName }}' --required
AND raiBlocklistItemName = '{{ raiBlocklistItemName }}' --required
;

Lifecycle Methods

Batch operation to add blocklist items.

EXEC azure.cognitive_services.rai_blocklist_items.batch_add 
@resourceGroupName='{{ resourceGroupName }}' --required,
@accountName='{{ accountName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@raiBlocklistName='{{ raiBlocklistName }}' --required
;