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:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
etagstringResource Etag.
isRegexbooleanIf the pattern is a regex pattern.
patternstringPattern to match against.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, rai_blocklist_name, rai_blocklist_item_name, subscription_idGets the specified custom blocklist Item associated with the custom blocklist.
listselectresource_group_name, account_name, rai_blocklist_name, subscription_idGets the blocklist items associated with the custom blocklist.
create_or_updateinsertresource_group_name, account_name, rai_blocklist_name, rai_blocklist_item_name, subscription_idUpdate the state of specified blocklist item associated with the Azure OpenAI account.
create_or_updatereplaceresource_group_name, account_name, rai_blocklist_name, rai_blocklist_item_name, subscription_idUpdate the state of specified blocklist item associated with the Azure OpenAI account.
deletedeleteresource_group_name, account_name, rai_blocklist_name, rai_blocklist_item_name, subscription_idDeletes the specified blocklist Item associated with the custom blocklist.
batch_addexecresource_group_name, account_name, rai_blocklist_name, subscription_idBatch operation to add blocklist items.
batch_deleteexecresource_group_name, account_name, rai_blocklist_name, subscription_idBatch 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
account_namestringThe name of Cognitive Services account. Required.
rai_blocklist_item_namestringThe name of the RaiBlocklist Item associated with the custom blocklist. Required.
rai_blocklist_namestringThe name of the RaiBlocklist associated with the Cognitive Services Account. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

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

SELECT
id,
name,
etag,
isRegex,
pattern,
systemData,
tags,
type
FROM azure.cognitive_services.rai_blocklist_items
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND rai_blocklist_name = '{{ rai_blocklist_name }}' -- required
AND rai_blocklist_item_name = '{{ rai_blocklist_item_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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

INSERT INTO azure.cognitive_services.rai_blocklist_items (
properties,
tags,
resource_group_name,
account_name,
rai_blocklist_name,
rai_blocklist_item_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ rai_blocklist_name }}',
'{{ rai_blocklist_item_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
systemData,
tags,
type
;

REPLACE examples

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

REPLACE azure.cognitive_services.rai_blocklist_items
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND rai_blocklist_name = '{{ rai_blocklist_name }}' --required
AND rai_blocklist_item_name = '{{ rai_blocklist_item_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties,
systemData,
tags,
type;

DELETE examples

Deletes the specified blocklist Item associated with the custom blocklist.

DELETE FROM azure.cognitive_services.rai_blocklist_items
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND rai_blocklist_name = '{{ rai_blocklist_name }}' --required
AND rai_blocklist_item_name = '{{ rai_blocklist_item_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Batch operation to add blocklist items.

EXEC azure.cognitive_services.rai_blocklist_items.batch_add 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@rai_blocklist_name='{{ rai_blocklist_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"name": "{{ name }}",
"properties": "{{ properties }}"
}'
;