CognitiveServicesAccountResource.CreateOrUpdateAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.