Connection Rai Policy - Create
Uppdatera tillståndet för angivna innehållsfilter som är associerade med Azure OpenAI-anslutningen.
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-parametrar
| Name | I | Obligatorisk | Typ | Description |
|---|---|---|---|---|
|
connection
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$ |
Eget namn på anslutningen till arbetsytan |
|
rai
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$ |
Namnet på Rai-policyn. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Namnet på resursgruppen. Namnet är skiftlägesokänsligt. |
|
subscription
|
path | True |
string minLength: 1 |
ID för målprenumerationen. |
|
workspace
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$ |
Namn på Azure Machine Learning-arbetsyta |
|
api-version
|
query | True |
string minLength: 1 |
Den API-version som ska användas för den här åtgärden. |
|
proxy-api-version
|
query |
string |
API-version som används av proxyanrop |
Begärandetext
| Name | Obligatorisk | Typ | Description |
|---|---|---|---|
| properties | True |
Azure OpenAI Content Filters egenskaper. |
Svar
| Name | Typ | Description |
|---|---|---|
| 200 OK |
Resursens 'RaiPolicyPropertiesBasicResource'-uppdateringsoperation lyckades |
|
| 201 Created |
Resursen 'RaiPolicyPropertiesBasicResource' skapade operationen lyckades Sidhuvuden
|
|
| Other Status Codes |
Ett oväntat felsvar. |
Säkerhet
azure_auth
Azure Active Directory OAuth2 Flow.
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
| Name | Description |
|---|---|
| user_impersonation | personifiera ditt användarkonto |
Exempel
Create Rai policy
Exempelbegäran
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"
}
]
}
}
Exempelsvar
{
"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"
}
}
Definitioner
| Name | Description |
|---|---|
|
Allowed |
Nivå där innehållet filtreras. |
|
created |
Den typ av identitet som skapade resursen. |
|
Error |
Ytterligare information om resurshanteringsfelet. |
|
Error |
Felinformationen. |
|
Error |
Felsvar |
|
Rai |
Konfiguration av Azure OpenAI-blockeringslista. |
|
Rai |
Azure OpenAI Content Filter. |
|
Rai |
Innehållskälla för att tillämpa innehållsfiltren. |
|
Rai |
Läge för innehållsfilter. |
|
Rai |
Azure OpenAI Content Filters egenskaper. |
|
Rai |
Resurs för Azure OpenAI-innehållsfilter. |
|
Rai |
Principtyp för innehållsfilter. |
|
system |
Metadata som rör skapande och senaste ändring av resursen. |
AllowedContentLevel
Nivå där innehållet filtreras.
| Värde | Description |
|---|---|
| Low | |
| Medium | |
| High |
createdByType
Den typ av identitet som skapade resursen.
| Värde | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
Ytterligare information om resurshanteringsfelet.
| Name | Typ | Description |
|---|---|---|
| info |
object |
Ytterligare information. |
| type |
string |
Ytterligare informationstyp. |
ErrorDetail
Felinformationen.
| Name | Typ | Description |
|---|---|---|
| additionalInfo |
Ytterligare information om felet. |
|
| code |
string |
Felkoden. |
| details |
Felinformationen. |
|
| message |
string |
Felmeddelandet. |
| target |
string |
Felmålet. |
ErrorResponse
Felsvar
| Name | Typ | Description |
|---|---|---|
| error |
Felobjektet. |
RaiBlocklistConfig
Konfiguration av Azure OpenAI-blockeringslista.
| Name | Typ | Description |
|---|---|---|
| blocking |
boolean |
Om blockering skulle ske. |
| blocklistName |
string |
Namn på ContentFilter. |
RaiPolicyContentFilter
Azure OpenAI Content Filter.
| Name | Typ | Description |
|---|---|---|
| allowedContentLevel |
Nivå där innehållet filtreras. |
|
| blocking |
boolean |
Om blockering skulle ske. |
| enabled |
boolean |
Om ContentFilter är aktiverat. |
| name |
string |
Namn på ContentFilter. |
| source |
Innehållskälla för att tillämpa innehållsfiltren. |
RaiPolicyContentSource
Innehållskälla för att tillämpa innehållsfiltren.
| Värde | Description |
|---|---|
| Prompt | |
| Completion |
RaiPolicyMode
Läge för innehållsfilter.
| Värde | Description |
|---|---|
| Default | |
| Deferred | |
| Blocking |
RaiPolicyProperties
Azure OpenAI Content Filters egenskaper.
| Name | Typ | Description |
|---|---|---|
| basePolicyName |
string |
Namnet på de grundläggande innehållsfiltren. |
| completionBlocklists |
Konfiguration av Azure OpenAI-blockeringslista. |
|
| contentFilters |
Azure OpenAI Content Filter. |
|
| mode |
Läge för innehållsfilter. |
|
| promptBlocklists |
Konfiguration av Azure OpenAI-blockeringslista. |
|
| type |
Principtyp för innehållsfilter. |
RaiPolicyPropertiesBasicResource
Resurs för Azure OpenAI-innehållsfilter.
| Name | Typ | Description |
|---|---|---|
| id |
string |
Fullständigt kvalificerat resurs-ID för resursen. Ex – /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
Namnet på resursen |
| properties |
Azure OpenAI Content Filters egenskaper. |
|
| systemData |
Azure Resource Manager-metadata som innehåller createdBy och modifiedBy information. |
|
| type |
string |
Resurstypen. Till exempel "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts" |
RaiPolicyType
Principtyp för innehållsfilter.
| Värde | Description |
|---|---|
| UserManaged | |
| SystemManaged |
systemData
Metadata som rör skapande och senaste ändring av resursen.
| Name | Typ | Description |
|---|---|---|
| createdAt |
string (date-time) |
Tidsstämpeln för resursskapande (UTC). |
| createdBy |
string |
Identiteten som skapade resursen. |
| createdByType |
Den typ av identitet som skapade resursen. |
|
| lastModifiedAt |
string (date-time) |
Tidsstämpeln för resursens senaste ändring (UTC) |
| lastModifiedBy |
string |
Identiteten som senast ändrade resursen. |
| lastModifiedByType |
Den typ av identitet som senast ändrade resursen. |