BlobBaseClient.SetImmutabilityPolicy Method

Definition

Sets the Immutability Policy on a Blob, Blob Snapshot, or Blob Version. Note that Blob Versioning must be enabled on your storage account, and the blob must be in a Container with immutable storage with versioning enabled to call this API.

public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobImmutabilityPolicy> SetImmutabilityPolicy (Azure.Storage.Blobs.Models.BlobImmutabilityPolicy immutabilityPolicy, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetImmutabilityPolicy : Azure.Storage.Blobs.Models.BlobImmutabilityPolicy * Azure.Storage.Blobs.Models.BlobRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobImmutabilityPolicy>
override this.SetImmutabilityPolicy : Azure.Storage.Blobs.Models.BlobImmutabilityPolicy * Azure.Storage.Blobs.Models.BlobRequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Storage.Blobs.Models.BlobImmutabilityPolicy>
Public Overridable Function SetImmutabilityPolicy (immutabilityPolicy As BlobImmutabilityPolicy, Optional conditions As BlobRequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BlobImmutabilityPolicy)

Parameters

immutabilityPolicy
BlobImmutabilityPolicy

The BlobImmutabilityPolicy to set.

conditions
BlobRequestConditions

Optional BlobRequestConditions to add conditions on setting the blob's HTTP headers. Note that If Unmodified Since is the only request condition applicable to this API.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be cancelled.

Returns

A Response<T>.

Remarks

A RequestFailedException will be thrown if a failure occurs.

Applies to