Skip to main content

rai_policies

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

Overview

Namerai_policies
TypeResource
Idazure.cognitive_services.rai_policies

Fields

NameDatatypeDescription
accountNametextfield from the properties object
base_policy_nametextfield from the properties object
content_filterstextfield from the properties object
custom_blockliststextfield from the properties object
etagtextResource Etag.
modetextfield from the properties object
raiPolicyNametextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.
typetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, raiPolicyName, resourceGroupName, subscriptionIdGets the specified Content Filters associated with the Azure OpenAI account.
listSELECTaccountName, resourceGroupName, subscriptionIdGets the content filters associated with the Azure OpenAI account.
create_or_updateINSERTaccountName, raiPolicyName, resourceGroupName, subscriptionIdUpdate the state of specified Content Filters associated with the Azure OpenAI account.
deleteDELETEaccountName, raiPolicyName, resourceGroupName, subscriptionIdDeletes the specified Content Filters associated with the Azure OpenAI account.

SELECT examples

Gets the content filters associated with the Azure OpenAI account.

SELECT
accountName,
base_policy_name,
content_filters,
custom_blocklists,
etag,
mode,
raiPolicyName,
resourceGroupName,
subscriptionId,
system_data,
tags,
type
FROM azure.cognitive_services.vw_rai_policies
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new rai_policies resource.

/*+ create */
INSERT INTO azure.cognitive_services.rai_policies (
accountName,
raiPolicyName,
resourceGroupName,
subscriptionId,
tags,
properties
)
SELECT
'{{ accountName }}',
'{{ raiPolicyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tags }}',
'{{ properties }}'
;

DELETE example

Deletes the specified rai_policies resource.

/*+ delete */
DELETE FROM azure.cognitive_services.rai_policies
WHERE accountName = '{{ accountName }}'
AND raiPolicyName = '{{ raiPolicyName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';