CognitiveServicesComputeCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a compute associated with the Cognitive Services account.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}.
  • Operation Id. : Computes_CreateOrUpdate.
  • Default Api Version. : 2026-03-15-preview.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesComputeResource>> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.CognitiveServices.CognitiveServicesComputeData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesComputeData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesComputeResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.CognitiveServices.CognitiveServicesComputeData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CognitiveServices.CognitiveServicesComputeResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, computeName As String, data As CognitiveServicesComputeData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of CognitiveServicesComputeResource))

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.

computeName
String

The name of the compute associated with the Cognitive Services Account.

data
CognitiveServicesComputeData

The compute properties.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

computeName or data is null.

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

Applies to