Share via


CognitiveServicesConnectionCollection.CreateOrUpdateAsync Method

Definition

Create or update Cognitive Services account connection under the specified account.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/connections/{connectionName}
  • Operation Id: AccountConnection_Create
  • Default Api Version: 2025-04-01-preview
  • Resource: CognitiveServicesConnectionResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string connectionName, Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, connectionName As String, data As CognitiveServicesConnectionData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of CognitiveServicesConnectionResource))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

connectionName
String

Friendly name of the connection.

data
CognitiveServicesConnectionData

The object for creating or updating a new account connection.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

connectionName or data is null.

Applies to