ImmutabilityPolicyProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.ImmutabilityPolicyProperties

Implements

public final class ImmutabilityPolicyProperties
implements JsonSerializable<ImmutabilityPolicyProperties>

The properties of an ImmutabilityPolicy of a blob container.

Constructor Summary

Constructor Description
ImmutabilityPolicyProperties()

Creates an instance of ImmutabilityPolicyProperties class.

Method Summary

Modifier and Type Method and Description
Boolean allowProtectedAppendWrites()

Get the allowProtectedAppendWrites property: This property can only be changed for unlocked time-based retention policies.

Boolean allowProtectedAppendWritesAll()

Get the allowProtectedAppendWritesAll property: This property can only be changed for unlocked time-based retention policies.

String etag()

Get the etag property: ImmutabilityPolicy Etag.

static ImmutabilityPolicyProperties fromJson(JsonReader jsonReader)

Reads an instance of ImmutabilityPolicyProperties from the JsonReader.

Integer immutabilityPeriodSinceCreationInDays()

Get the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.

ImmutabilityPolicyState state()

Get the state property: The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.

JsonWriter toJson(JsonWriter jsonWriter)
List<UpdateHistoryProperty> updateHistory()

Get the updateHistory property: The ImmutabilityPolicy update history of the blob container.

void validate()

Validates the instance.

ImmutabilityPolicyProperties withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites)

Set the allowProtectedAppendWrites property: This property can only be changed for unlocked time-based retention policies.

ImmutabilityPolicyProperties withAllowProtectedAppendWritesAll(Boolean allowProtectedAppendWritesAll)

Set the allowProtectedAppendWritesAll property: This property can only be changed for unlocked time-based retention policies.

ImmutabilityPolicyProperties withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays)

Set the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.

Methods inherited from java.lang.Object

Constructor Details

ImmutabilityPolicyProperties

public ImmutabilityPolicyProperties()

Creates an instance of ImmutabilityPolicyProperties class.

Method Details

allowProtectedAppendWrites

public Boolean allowProtectedAppendWrites()

Get the allowProtectedAppendWrites property: This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.

Returns:

the allowProtectedAppendWrites value.

allowProtectedAppendWritesAll

public Boolean allowProtectedAppendWritesAll()

Get the allowProtectedAppendWritesAll property: This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.

Returns:

the allowProtectedAppendWritesAll value.

etag

public String etag()

Get the etag property: ImmutabilityPolicy Etag.

Returns:

the etag value.

fromJson

public static ImmutabilityPolicyProperties fromJson(JsonReader jsonReader)

Reads an instance of ImmutabilityPolicyProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ImmutabilityPolicyProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ImmutabilityPolicyProperties.

immutabilityPeriodSinceCreationInDays

public Integer immutabilityPeriodSinceCreationInDays()

Get the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.

Returns:

the immutabilityPeriodSinceCreationInDays value.

state

public ImmutabilityPolicyState state()

Get the state property: The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.

Returns:

the state value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

updateHistory

public List updateHistory()

Get the updateHistory property: The ImmutabilityPolicy update history of the blob container.

Returns:

the updateHistory value.

validate

public void validate()

Validates the instance.

withAllowProtectedAppendWrites

public ImmutabilityPolicyProperties withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites)

Set the allowProtectedAppendWrites property: This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.

Parameters:

allowProtectedAppendWrites - the allowProtectedAppendWrites value to set.

Returns:

the ImmutabilityPolicyProperties object itself.

withAllowProtectedAppendWritesAll

public ImmutabilityPolicyProperties withAllowProtectedAppendWritesAll(Boolean allowProtectedAppendWritesAll)

Set the allowProtectedAppendWritesAll property: This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.

Parameters:

allowProtectedAppendWritesAll - the allowProtectedAppendWritesAll value to set.

Returns:

the ImmutabilityPolicyProperties object itself.

withImmutabilityPeriodSinceCreationInDays

public ImmutabilityPolicyProperties withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays)

Set the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.

Parameters:

immutabilityPeriodSinceCreationInDays - the immutabilityPeriodSinceCreationInDays value to set.

Returns:

the ImmutabilityPolicyProperties object itself.

Applies to