SnapshotResource.UpdateImmutabilityPolicyAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Updates the immutability policy of a snapshot. Sets or extends an unlocked immutability policy with the specified duration and type. If the snapshot already has a locked policy, the request will be rejected. Use updateImmutabilityPolicyLock to lock an immutability policy.
- Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/updateImmutabilityPolicy.
- Operation Id. : Snapshots_UpdateImmutabilityPolicy.
- Default Api Version. : 2026-03-02.
- Resource. : SnapshotResource.
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.SnapshotResource>> UpdateImmutabilityPolicyAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Compute.Models.ImmutabilityPolicyContent content, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateImmutabilityPolicyAsync : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.ImmutabilityPolicyContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.SnapshotResource>>
override this.UpdateImmutabilityPolicyAsync : Azure.WaitUntil * Azure.ResourceManager.Compute.Models.ImmutabilityPolicyContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Compute.SnapshotResource>>
Public Overridable Function UpdateImmutabilityPolicyAsync (waitUntil As WaitUntil, content As ImmutabilityPolicyContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of SnapshotResource))
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.
- content
- ImmutabilityPolicyContent
Immutability policy data supplied in the body of the update immutability policy operation.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
content is null.