Subscription Rai Policy - Get
Hämtar de specificerade innehållsfiltren som är kopplade till prenumerationen.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/raiPolicy/{raiPolicyName}?api-version=2025-10-01-preview
URI-parametrar
| Name | I | Obligatorisk | Typ | Description |
|---|---|---|---|---|
|
rai
|
path | True |
string pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$ |
Namnet på den RaiPolicy som är associerad med Cognitive Services-kontot |
|
subscription
|
path | True |
string minLength: 1 |
ID för målprenumerationen. |
|
api-version
|
query | True |
string minLength: 1 |
Den API-version som ska användas för den här åtgärden. |
Svar
| Name | Typ | Description |
|---|---|---|
| 200 OK |
Azure-operationen slutfördes framgångsrikt. |
|
| 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
GetRaiPolicy
Exempelbegäran
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CognitiveServices/raiPolicy/raiPolicyName?api-version=2025-10-01-preview
Exempelsvar
{
"name": "raiPolicyName",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiPolicies/raiPolicyName",
"properties": {
"basePolicyName": "Microsoft.Default",
"contentFilters": [
{
"name": "Hate",
"blocking": false,
"enabled": false,
"severityThreshold": "High",
"source": "Prompt"
},
{
"name": "Hate",
"blocking": true,
"enabled": true,
"severityThreshold": "Medium",
"source": "Completion"
},
{
"name": "Sexual",
"blocking": true,
"enabled": true,
"severityThreshold": "High",
"source": "Prompt"
},
{
"name": "Sexual",
"blocking": true,
"enabled": true,
"severityThreshold": "Medium",
"source": "Completion"
},
{
"name": "Selfharm",
"blocking": true,
"enabled": true,
"severityThreshold": "High",
"source": "Prompt"
},
{
"name": "Selfharm",
"blocking": true,
"enabled": true,
"severityThreshold": "Medium",
"source": "Completion"
},
{
"name": "Violence",
"blocking": true,
"enabled": true,
"severityThreshold": "Medium",
"source": "Prompt"
},
{
"name": "Violence",
"blocking": true,
"enabled": true,
"severityThreshold": "Medium",
"source": "Completion"
},
{
"name": "Jailbreak",
"blocking": true,
"enabled": true,
"source": "Prompt"
},
{
"name": "Protected Material Text",
"blocking": true,
"enabled": true,
"source": "Completion"
},
{
"name": "Protected Material Code",
"blocking": true,
"enabled": true,
"source": "Completion"
},
{
"name": "Profanity",
"blocking": true,
"enabled": true,
"source": "Prompt"
}
],
"mode": "Asynchronous_filter"
}
}
Definitioner
| Name | Description |
|---|---|
|
Content |
Nivå där innehållet filtreras. |
|
created |
Den typ av identitet som skapade resursen. |
|
Custom |
Hämtar eller anger den källa som filtret gäller för. |
|
Custom |
Hämtar eller anger den källa som filtret gäller för. |
|
Error |
Ytterligare information om resurshanteringsfelet. |
|
Error |
Detaljerna om felet. |
|
Error |
Felsvar |
|
Rai |
Åtgärdstyperna som ska användas för innehållsfiltren |
|
Rai |
RaiPolicy för kognitiva tjänster. |
|
Rai |
Azure OpenAI Content Filter. |
|
Rai |
Innehållskälla för att tillämpa innehållsfiltren. |
|
Rai |
Rai-principläge. Uppräkningsvärdemappningen är som nedan: Standard = 0, Uppskjuten=1, Blockering=2, Asynchronous_filter =3. Använd 'Asynchronous_filter' efter 2025-06-01. Det är samma som "Uppskjuten" i tidigare version. |
|
Rai |
Azure OpenAI Content Filters properties. |
|
Rai |
Principtyp för innehållsfilter. |
|
Safety |
Får eller sätter källan som säkerhetsleverantörerna tillämpar på. |
|
system |
Metadata som rör skapande och senaste ändring av resursen. |
ContentLevel
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 |
CustomBlocklistConfig
Hämtar eller anger den källa som filtret gäller för.
| Name | Typ | Description |
|---|---|---|
| blocking |
boolean |
Om blockering skulle ske. |
| blocklistName |
string |
Namn på ContentFilter. |
| source |
Innehållskälla för att tillämpa innehållsfiltren. |
CustomTopicConfig
Hämtar eller anger den källa som filtret gäller för.
| Name | Typ | Description |
|---|---|---|
| blocking |
boolean |
Om blockering skulle ske. |
| source |
Innehållskälla för att tillämpa innehållsfiltren. |
|
| topicName |
string |
Namn på RAI-ämne. |
ErrorAdditionalInfo
Ytterligare information om resurshanteringsfelet.
| Name | Typ | Description |
|---|---|---|
| info |
object |
Ytterligare information. |
| type |
string |
Ytterligare informationstyp. |
ErrorDetail
Detaljerna om felet.
| 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. |
RaiActionType
Åtgärdstyperna som ska användas för innehållsfiltren
| Värde | Description |
|---|---|
| None | |
| BLOCKING | |
| ANNOTATING | |
| HITL | |
| RETRY |
RaiPolicy
RaiPolicy för kognitiva tjänster.
| Name | Typ | Description |
|---|---|---|
| etag |
string |
Resurs-Etag. |
| 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 |
Egenskaper för Cognitive Services RaiPolicy. |
|
| systemData |
Azure Resource Manager-metadata som innehåller creationBy och modifiedBy-information. |
|
| tags |
object |
Resursetiketter. |
| type |
string |
Resurstypen. T.ex. "Microsoft.Compute/virtualMachines" eller "Microsoft.Storage/storageAccounts" |
RaiPolicyContentFilter
Azure OpenAI Content Filter.
| Name | Typ | Description |
|---|---|---|
| action |
Åtgärdstyperna som ska användas för innehållsfiltren |
|
| blocking |
boolean |
Om blockering skulle ske. |
| enabled |
boolean |
Om ContentFilter är aktiverat. |
| name |
string |
Namn på ContentFilter. |
| severityThreshold |
Nivå där innehållet filtreras. |
|
| 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 | |
| PreToolCall | |
| PostToolCall | |
| PreRun | |
| PostRun |
RaiPolicyMode
Rai-principläge. Uppräkningsvärdemappningen är som nedan: Standard = 0, Uppskjuten=1, Blockering=2, Asynchronous_filter =3. Använd 'Asynchronous_filter' efter 2025-06-01. Det är samma som "Uppskjuten" i tidigare version.
| Värde | Description |
|---|---|
| Default | |
| Deferred | |
| Blocking | |
| Asynchronous_filter |
RaiPolicyProperties
Azure OpenAI Content Filters properties.
| Name | Typ | Description |
|---|---|---|
| basePolicyName |
string |
Namn på Rai-princip. |
| contentFilters |
Listan över innehållsfilter. |
|
| customBlocklists |
Listan över anpassade blockeringslistor. |
|
| customTopics |
Listan över anpassade rai-ämnen. |
|
| mode |
Rai-principläge. Uppräkningsvärdemappningen är som nedan: Standard = 0, Uppskjuten=1, Blockering=2, Asynchronous_filter =3. Använd 'Asynchronous_filter' efter 2025-06-01. Det är samma som "Uppskjuten" i tidigare version. |
|
| safetyProviders |
Listan över säkerhetsleverantörer. |
|
| type |
Principtyp för innehållsfilter. |
RaiPolicyType
Principtyp för innehållsfilter.
| Värde | Description |
|---|---|
| UserManaged | |
| SystemManaged |
SafetyProviderConfig
Får eller sätter källan som säkerhetsleverantörerna tillämpar på.
| Name | Typ | Description |
|---|---|---|
| blocking |
boolean |
Om blockering skulle ske. |
| safetyProviderName |
string |
Namn på RAI-säkerhetsleverantör. |
| source |
Innehållskälla för att tillämpa innehållsfiltren. |
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. |