Skip to main content

rai_blocklists

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

Overview

Namerai_blocklists
TypeResource
Idazure.cognitive_services.rai_blocklists

Fields

The following fields are returned by SELECT queries:

OK -- Get the custom blocklist successfully.

NameDatatypeDescription
etagstringResource Etag.
propertiesobjectProperties of Cognitive Services RaiBlocklist.
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, raiBlocklistNameGets the specified custom blocklist associated with the Azure OpenAI account.
listselectresourceGroupName, accountName, subscriptionIdGets the custom blocklists associated with the Azure OpenAI account.
create_or_updateinsertresourceGroupName, accountName, subscriptionId, raiBlocklistNameUpdate the state of specified blocklist associated with the Azure OpenAI account.
deletedeleteresourceGroupName, accountName, subscriptionId, raiBlocklistNameDeletes the specified custom blocklist associated with the Azure OpenAI account.

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.
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 associated with the Azure OpenAI account.

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

INSERT examples

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

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

DELETE examples

Deletes the specified custom blocklist associated with the Azure OpenAI account.

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