Condividi tramite


ImmutabilityPolicyResource.CreateOrUpdate Method

Definition

Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/{immutabilityPolicyName}
  • Operation Id: BlobContainers_CreateOrUpdateImmutabilityPolicy
  • Default Api Version: 2023-05-01
  • Resource: ImmutabilityPolicyResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.ImmutabilityPolicyResource> CreateOrUpdate (Azure.WaitUntil waitUntil, Azure.ResourceManager.Storage.ImmutabilityPolicyData data, Azure.ETag? ifMatch = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * Azure.ResourceManager.Storage.ImmutabilityPolicyData * Nullable<Azure.ETag> * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.ImmutabilityPolicyResource>
override this.CreateOrUpdate : Azure.WaitUntil * Azure.ResourceManager.Storage.ImmutabilityPolicyData * Nullable<Azure.ETag> * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Storage.ImmutabilityPolicyResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, data As ImmutabilityPolicyData, Optional ifMatch As Nullable(Of ETag) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of ImmutabilityPolicyResource)

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.

data
ImmutabilityPolicyData

The ImmutabilityPolicy Properties that will be created or updated to a blob container.

ifMatch
Nullable<ETag>

The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

data is null.

Applies to