Share via


CognitiveServicesConnectionCollection.CreateOrUpdate 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 Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string connectionName, Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, connectionName As String, data As CognitiveServicesConnectionData, Optional cancellationToken As CancellationToken = Nothing) As 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