EncryptionScopeCollection.CreateOrUpdate Method

Definition

Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}
  • Operation Id: EncryptionScopes_Put
  • Default Api Version: 2023-05-01
  • Resource: EncryptionScopeResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.EncryptionScopeResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string encryptionScopeName, Azure.ResourceManager.Storage.EncryptionScopeData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Storage.EncryptionScopeData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.EncryptionScopeResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Storage.EncryptionScopeData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.EncryptionScopeResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, encryptionScopeName As String, data As EncryptionScopeData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of EncryptionScopeResource)

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.

encryptionScopeName
String

The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.

data
EncryptionScopeData

Encryption scope properties to be used for the create or update.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

encryptionScopeName or data is null.

Applies to