CognitiveServicesProjectConnectionCollection.CreateOrUpdateAsync Method

Definition

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

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/projects/{projectName}/connections/{connectionName}.
  • Operation Id. : ProjectConnections_Create.
  • Default Api Version. : 2026-03-15-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesProjectConnectionResource>> 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.CognitiveServicesProjectConnectionResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesConnectionData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesProjectConnectionResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, connectionName As String, data As CognitiveServicesConnectionData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of CognitiveServicesProjectConnectionResource))

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 null.

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

Applies to