CognitiveServicesAccountResource.CreateOrUpdateAsync Method

Definition

Test the rai safety provider associated with the subscription.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/testRaiExternalSafetyProvider/{safetyProviderName}.
  • Operation Id. : Accounts_CreateOrUpdate.
  • Default Api Version. : 2026-01-15-preview.
  • Resource. : CognitiveServicesAccountResource.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.CognitiveServices.RaiExternalSafetyProviderSchemaResource>> CreateOrUpdateAsync(string safetyProviderName, Azure.ResourceManager.CognitiveServices.RaiExternalSafetyProviderSchemaData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : string * Azure.ResourceManager.CognitiveServices.RaiExternalSafetyProviderSchemaData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.CognitiveServices.RaiExternalSafetyProviderSchemaResource>>
override this.CreateOrUpdateAsync : string * Azure.ResourceManager.CognitiveServices.RaiExternalSafetyProviderSchemaData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.CognitiveServices.RaiExternalSafetyProviderSchemaResource>>
Public Overridable Function CreateOrUpdateAsync (safetyProviderName As String, data As RaiExternalSafetyProviderSchemaData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of RaiExternalSafetyProviderSchemaResource))

Parameters

safetyProviderName
String

The name of the Rai External Safety Provider associated with the Cognitive Services Account.

data
RaiExternalSafetyProviderSchemaData

Properties describing the rai external safety provider.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

safetyProviderName or data is null.

safetyProviderName is an empty string, and was expected to be non-empty.

Applies to