Language

GarnetClusterCollection.CreateOrUpdate Method

Definition

Create or update a Garnet cache cluster. When updating, you must specify all writable properties.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/garnetClusters/{clusterName}.
  • Operation Id. : GarnetClusters_CreateUpdate.
  • Default Api Version. : 2026-04-01-preview.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CosmosDB.GarnetClusterResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string clusterName, Azure.ResourceManager.CosmosDB.GarnetClusterData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.CosmosDB.GarnetClusterData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CosmosDB.GarnetClusterResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.CosmosDB.GarnetClusterData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.CosmosDB.GarnetClusterResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, clusterName As String, data As GarnetClusterData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of GarnetClusterResource)

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.

clusterName
String

The name of the GarnetClusterResource.

data
GarnetClusterData

Resource create parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

clusterName or data is null.

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

Applies to