Connection Rai Policy - Create
Werk de status bij van opgegeven inhoudsfilters die zijn gekoppeld aan de Azure OpenAI-verbinding.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}?api-version=2026-01-15-preview
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}?api-version=2026-01-15-preview&proxy-api-version={proxy-api-version}
URI-parameters
| Name | In | Vereist | Type | Description |
|---|---|---|---|---|
|
connection
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$ |
Beschrijvende naam van de werkruimteverbinding |
|
rai
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$ |
Naam van het Rai-beleid. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
De naam van de resourcegroep. De naam is hoofdletterongevoelig. |
|
subscription
|
path | True |
string minLength: 1 |
De id van het doelabonnement. |
|
workspace
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$ |
Naam van Azure Machine Learning werkruimte |
|
api-version
|
query | True |
string minLength: 1 |
De API-versie die voor deze bewerking moet worden gebruikt. |
|
proxy-api-version
|
query |
string |
Api-versie die wordt gebruikt door proxy-aanroep |
Aanvraagbody
| Name | Vereist | Type | Description |
|---|---|---|---|
| properties | True |
Azure OpenAI Content Filters eigenschappen. |
Antwoorden
| Name | Type | Description |
|---|---|---|
| 200 OK |
Resource 'RaiPolicyPropertiesBasicResource' updateoperatie geslaagd |
|
| 201 Created |
Resource 'RaiPolicyPropertiesBasicResource' aanmaakoperatie geslaagd Kopteksten
|
|
| Other Status Codes |
Een onverwachte foutreactie. |
Beveiliging
azure_auth
OAuth2-stroom voor Azure Active Directory.
Type:
oauth2
Stroom:
implicit
Autorisatie-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiken
| Name | Description |
|---|---|
| user_impersonation | Uw gebruikersaccount imiteren |
Voorbeelden
Create Rai policy
Voorbeeldaanvraag
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/aml-workspace-name/connections/testConnection/raiPolicies/raiPolicyName?api-version=2026-01-15-preview
{
"properties": {
"type": "SystemManaged",
"basePolicyName": "112",
"completionBlocklists": [
{
"blocking": false,
"blocklistName": "blocklistName"
}
],
"contentFilters": [
{
"name": "policyName",
"allowedContentLevel": "Low",
"blocking": false,
"enabled": false,
"source": "Prompt"
}
],
"mode": "Blocking",
"promptBlocklists": [
{
"blocking": false,
"blocklistName": "blocklistName"
}
]
}
}
Voorbeeldrespons
{
"name": "raiPolicyName",
"type": "Microsoft.MachineLearningServices/workspaces/connections/raiPolicies",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/aml-workspace-name/connections/testConnection/raiPolicies/raiPolicyName",
"properties": {
"type": "SystemManaged",
"basePolicyName": "112",
"completionBlocklists": [
{
"blocking": false,
"blocklistName": "blocklistName"
}
],
"contentFilters": [
{
"name": "policyName",
"allowedContentLevel": "Low",
"blocking": false,
"enabled": false,
"source": "Prompt"
}
],
"mode": "Blocking",
"promptBlocklists": [
{
"blocking": false,
"blocklistName": "blocklistName"
}
]
},
"systemData": {
"createdAt": "2020-01-01T00:00:00Z",
"createdBy": "00000000-1111-2222-3333-444444444444",
"createdByType": "Application",
"lastModifiedAt": "2020-01-01T00:00:00Z",
"lastModifiedBy": "00000000-1111-2222-3333-444444444444",
"lastModifiedByType": "Application"
}
}
{
"name": "raiPolicyName",
"type": "Microsoft.MachineLearningServices/workspaces/connections/raiPolicies",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/aml-workspace-name/connections/testConnection/raiPolicies/raiPolicyName",
"properties": {
"type": "SystemManaged",
"basePolicyName": "112",
"completionBlocklists": [
{
"blocking": false,
"blocklistName": "blocklistName"
}
],
"contentFilters": [
{
"name": "policyName",
"allowedContentLevel": "Low",
"blocking": false,
"enabled": false,
"source": "Prompt"
}
],
"mode": "Blocking",
"promptBlocklists": [
{
"blocking": false,
"blocklistName": "blocklistName"
}
]
},
"systemData": {
"createdAt": "2020-01-01T00:00:00Z",
"createdBy": "00000000-1111-2222-3333-444444444444",
"createdByType": "Application",
"lastModifiedAt": "2020-01-01T00:00:00Z",
"lastModifiedBy": "00000000-1111-2222-3333-444444444444",
"lastModifiedByType": "Application"
}
}
Definities
| Name | Description |
|---|---|
|
Allowed |
Niveau waarop inhoud wordt gefilterd. |
|
created |
Het type identiteit waarmee de resource is gemaakt. |
|
Error |
Aanvullende informatie over de resourcebeheerfout. |
|
Error |
De foutdetails. |
|
Error |
Foutreactie |
|
Rai |
Azure OpenAI blocklist configuratie. |
|
Rai |
Azure OpenAI Content Filter. |
|
Rai |
Inhoudsbron om de inhoudsfilters toe te passen. |
|
Rai |
Modus Inhoudsfilters. |
|
Rai |
Azure OpenAI Content Filters eigenschappen. |
|
Rai |
Azure OpenAI-bron voor inhoudsfilters. |
|
Rai |
Beleidstype Inhoudsfilters. |
|
system |
Metagegevens met betrekking tot het maken en de laatste wijziging van de resource. |
AllowedContentLevel
Niveau waarop inhoud wordt gefilterd.
| Waarde | Description |
|---|---|
| Low | |
| Medium | |
| High |
createdByType
Het type identiteit waarmee de resource is gemaakt.
| Waarde | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
Aanvullende informatie over de resourcebeheerfout.
| Name | Type | Description |
|---|---|---|
| info |
object |
De aanvullende informatie. |
| type |
string |
Het extra informatietype. |
ErrorDetail
De foutdetails.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
De fout bevat aanvullende informatie. |
|
| code |
string |
De foutcode. |
| details |
De foutdetails. |
|
| message |
string |
Het foutbericht. |
| target |
string |
Het foutdoelwit. |
ErrorResponse
Foutreactie
| Name | Type | Description |
|---|---|---|
| error |
Het foutobject. |
RaiBlocklistConfig
Azure OpenAI blocklist configuratie.
| Name | Type | Description |
|---|---|---|
| blocking |
boolean |
Als er blokkering zou optreden. |
| blocklistName |
string |
Naam van ContentFilter. |
RaiPolicyContentFilter
Azure OpenAI Content Filter.
| Name | Type | Description |
|---|---|---|
| allowedContentLevel |
Niveau waarop inhoud wordt gefilterd. |
|
| blocking |
boolean |
Als er blokkering zou optreden. |
| enabled |
boolean |
Als het ContentFilter is ingeschakeld. |
| name |
string |
Naam van ContentFilter. |
| source |
Inhoudsbron om de inhoudsfilters toe te passen. |
RaiPolicyContentSource
Inhoudsbron om de inhoudsfilters toe te passen.
| Waarde | Description |
|---|---|
| Prompt | |
| Completion |
RaiPolicyMode
Modus Inhoudsfilters.
| Waarde | Description |
|---|---|
| Default | |
| Deferred | |
| Blocking |
RaiPolicyProperties
Azure OpenAI Content Filters eigenschappen.
| Name | Type | Description |
|---|---|---|
| basePolicyName |
string |
Naam van de basisinhoudsfilters. |
| completionBlocklists |
Azure OpenAI blocklist configuratie. |
|
| contentFilters |
Azure OpenAI Content Filter. |
|
| mode |
Modus Inhoudsfilters. |
|
| promptBlocklists |
Azure OpenAI blocklist configuratie. |
|
| type |
Beleidstype Inhoudsfilters. |
RaiPolicyPropertiesBasicResource
Azure OpenAI-bron voor inhoudsfilters.
| Name | Type | Description |
|---|---|---|
| id |
string |
Volledig gekwalificeerde resource-id voor de resource. Vb.: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
De naam van de resource |
| properties |
Azure OpenAI Content Filters eigenschappen. |
|
| systemData |
Azure Resource Manager-metagegevens met createdBy- en modifiedBy-gegevens. |
|
| type |
string |
Het type bron. Bijvoorbeeld 'Microsoft.Compute/virtualMachines' of 'Microsoft.Storage/storageAccounts' |
RaiPolicyType
Beleidstype Inhoudsfilters.
| Waarde | Description |
|---|---|
| UserManaged | |
| SystemManaged |
systemData
Metagegevens met betrekking tot het maken en de laatste wijziging van de resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
De tijdstempel van het maken van resources (UTC). |
| createdBy |
string |
De identiteit waarmee de resource is gemaakt. |
| createdByType |
Het type identiteit waarmee de resource is gemaakt. |
|
| lastModifiedAt |
string (date-time) |
De tijdstempel van de laatste wijziging van de resource (UTC) |
| lastModifiedBy |
string |
De identiteit die de resource voor het laatst heeft gewijzigd. |
| lastModifiedByType |
Het type identiteit dat de resource voor het laatst heeft gewijzigd. |