rai_policies
Creates, updates, deletes, gets or lists a rai_policies
resource.
Overview
Name | rai_policies |
Type | Resource |
Id | azure.cognitive_services.rai_policies |
Fields
- vw_rai_policies
- rai_policies
Name | Datatype | Description |
---|---|---|
accountName | text | field from the properties object |
base_policy_name | text | field from the properties object |
content_filters | text | field from the properties object |
custom_blocklists | text | field from the properties object |
etag | text | Resource Etag. |
mode | text | field from the properties object |
raiPolicyName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
tags | text | Resource tags. |
type | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
etag | string | Resource Etag. |
properties | object | Azure OpenAI Content Filters properties. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, raiPolicyName, resourceGroupName, subscriptionId | Gets the specified Content Filters associated with the Azure OpenAI account. |
list | SELECT | accountName, resourceGroupName, subscriptionId | Gets the content filters associated with the Azure OpenAI account. |
create_or_update | INSERT | accountName, raiPolicyName, resourceGroupName, subscriptionId | Update the state of specified Content Filters associated with the Azure OpenAI account. |
delete | DELETE | accountName, raiPolicyName, resourceGroupName, subscriptionId | Deletes the specified Content Filters associated with the Azure OpenAI account. |
SELECT
examples
Gets the content filters associated with the Azure OpenAI account.
- vw_rai_policies
- rai_policies
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 }}';
SELECT
etag,
properties,
systemData,
tags
FROM azure.cognitive_services.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.cognitive_services.rai_policies (
accountName,
raiPolicyName,
resourceGroupName,
subscriptionId,
tags,
properties
)
SELECT
'{{ accountName }}',
'{{ raiPolicyName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tags }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: etag
value: string
- name: tags
value: object
- name: properties
value:
- name: type
value: string
- name: mode
value: string
- name: basePolicyName
value: string
- name: contentFilters
value:
- - name: name
value: string
- name: enabled
value: boolean
- name: severityThreshold
value: string
- name: blocking
value: boolean
- name: source
value: []
- name: customBlocklists
value:
- - name: blocklistName
value: string
- name: blocking
value: boolean
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 }}';