Aracılığıyla paylaş


Connection Rai Policy - Create

Azure OpenAI bağlantısıyla ilişkili belirtilen İçerik Filtrelerinin durumunu güncelleştirin.

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 Parametreleri

Name İçinde Gerekli Tür Description
connectionName
path True

string

pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$

Çalışma alanı bağlantısının kolay adı

raiPolicyName
path True

string

pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.-]*$

Rai Politikasının Adı.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Kaynak grubunun adı. İsim büyük/küçük harfe duyarsızdır.

subscriptionId
path True

string

minLength: 1

Hedef aboneliğin kimliği.

workspaceName
path True

string

pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$

Azure Machine Learning Çalışma Alanı Adı

api-version
query True

string

minLength: 1

Bu işlem için kullanılacak API sürümü.

proxy-api-version
query

string

Proxy çağrısı tarafından kullanılan API sürümü

İstek Gövdesi

Name Gerekli Tür Description
properties True

RaiPolicyProperties

Azure OpenAI Content Filters özellikleri.

Yanıtlar

Name Tür Description
200 OK

RaiPolicyPropertiesBasicResource

Resource 'RaiPolicyPropertiesBasicResource' güncelleme işlemi başarılı oldu

201 Created

RaiPolicyPropertiesBasicResource

Resource 'RaiPolicyPropertiesBasicResource' işlemi oluştur başarılı oldu

Üst Bilgiler

  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

Beklenmeyen bir hata yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Flow.

Tür: oauth2
Akış: implicit
Yetkilendirme URL’si: https://login.microsoftonline.com/common/oauth2/authorize

Kapsamlar

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

Create Rai policy

Örnek isteği

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"
      }
    ]
  }
}

Örnek yanıt

{
  "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"
  }
}

Tanımlar

Name Description
AllowedContentLevel

İçeriğin filtrelendiği düzey.

createdByType

Kaynağı oluşturan kimliğin türü.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

RaiBlocklistConfig

Azure OpenAI engelleme listesi yapılandırması.

RaiPolicyContentFilter

Azure OpenAI Content Filter.

RaiPolicyContentSource

İçerik Filtrelerini uygulamak için içerik kaynağı.

RaiPolicyMode

İçerik Filtreleri modu.

RaiPolicyProperties

Azure OpenAI Content Filters özellikleri.

RaiPolicyPropertiesBasicResource

Azure OpenAI İçerik Filtreleri kaynağı.

RaiPolicyType

İçerik Filtreleri ilke türü.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

AllowedContentLevel

İçeriğin filtrelendiği düzey.

Değer Description
Low
Medium
High

createdByType

Kaynağı oluşturan kimliğin türü.

Değer Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

Name Tür Description
info

object

Ek bilgiler.

type

string

Ek bilgi türü.

ErrorDetail

Hata ayrıntısı.

Name Tür Description
additionalInfo

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorDetail[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi

ErrorResponse

Hata yanıtı

Name Tür Description
error

ErrorDetail

Hata nesnesi.

RaiBlocklistConfig

Azure OpenAI engelleme listesi yapılandırması.

Name Tür Description
blocking

boolean

Engelleme gerçekleşirse.

blocklistName

string

ContentFilter adı.

RaiPolicyContentFilter

Azure OpenAI Content Filter.

Name Tür Description
allowedContentLevel

AllowedContentLevel

İçeriğin filtrelendiği düzey.

blocking

boolean

Engelleme gerçekleşirse.

enabled

boolean

ContentFilter etkinse.

name

string

ContentFilter adı.

source

RaiPolicyContentSource

İçerik Filtrelerini uygulamak için içerik kaynağı.

RaiPolicyContentSource

İçerik Filtrelerini uygulamak için içerik kaynağı.

Değer Description
Prompt
Completion

RaiPolicyMode

İçerik Filtreleri modu.

Değer Description
Default
Deferred
Blocking

RaiPolicyProperties

Azure OpenAI Content Filters özellikleri.

Name Tür Description
basePolicyName

string

Temel İçerik Filtrelerinin adı.

completionBlocklists

RaiBlocklistConfig[]

Azure OpenAI engelleme listesi yapılandırması.

contentFilters

RaiPolicyContentFilter[]

Azure OpenAI Content Filter.

mode

RaiPolicyMode

İçerik Filtreleri modu.

promptBlocklists

RaiBlocklistConfig[]

Azure OpenAI engelleme listesi yapılandırması.

type

RaiPolicyType

İçerik Filtreleri ilke türü.

RaiPolicyPropertiesBasicResource

Azure OpenAI İçerik Filtreleri kaynağı.

Name Tür Description
id

string

Kaynağın tam kaynak kimliği. Örn - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Kaynağın adı

properties

RaiPolicyProperties

Azure OpenAI Content Filters özellikleri.

systemData

systemData

createdBy ve modifiedBy bilgilerini içeren Azure Resource Manager meta verileri.

type

string

Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"

RaiPolicyType

İçerik Filtreleri ilke türü.

Değer Description
UserManaged
SystemManaged

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

Name Tür Description
createdAt

string (date-time)

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

createdByType

Kaynağı oluşturan kimliğin türü.

lastModifiedAt

string (date-time)

Kaynağın son değişikliğinin zaman damgası (UTC)

lastModifiedBy

string

Kaynağı en son değiştiren kimlik.

lastModifiedByType

createdByType

Kaynağı en son değiştiren kimlik türü.