StorageCacheCollection.CreateOrUpdate Method

Definition

Create or update a cache.

  • Request Path: /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}
  • Operation Id: Caches_CreateOrUpdate
  • Default Api Version: 2024-03-01
  • Resource: StorageCacheResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageCache.StorageCacheResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string cacheName, Azure.ResourceManager.StorageCache.StorageCacheData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.StorageCache.StorageCacheData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageCache.StorageCacheResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.StorageCache.StorageCacheData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.StorageCache.StorageCacheResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, cacheName As String, data As StorageCacheData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of StorageCacheResource)

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.

cacheName
String

Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.

data
StorageCacheData

Object containing the user-selectable properties of the new cache. If read-only properties are included, they must match the existing values of those properties.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

cacheName or data is null.

Applies to