Class ImmutabilityPolicyProperties
- java.lang.Object
-
- com.azure.resourcemanager.storage.models.ImmutabilityPolicyProperties
-
public final class ImmutabilityPolicyProperties extends Object
The properties of an ImmutabilityPolicy of a blob container.
-
-
Constructor Summary
Constructors Constructor Description ImmutabilityPolicyProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanallowProtectedAppendWrites()Get the allowProtectedAppendWrites property: This property can only be changed for unlocked time-based retention policies.Stringetag()Get the etag property: ImmutabilityPolicy Etag.IntegerimmutabilityPeriodSinceCreationInDays()Get the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.ImmutabilityPolicyStatestate()Get the state property: The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.List<UpdateHistoryProperty>updateHistory()Get the updateHistory property: The ImmutabilityPolicy update history of the blob container.voidvalidate()Validates the instance.ImmutabilityPolicyPropertieswithAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites)Set the allowProtectedAppendWrites property: This property can only be changed for unlocked time-based retention policies.ImmutabilityPolicyPropertieswithImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays)Set the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.
-
-
-
Method Detail
-
etag
public String etag()
Get the etag property: ImmutabilityPolicy Etag.- Returns:
- the etag value.
-
updateHistory
public List<UpdateHistoryProperty> updateHistory()
Get the updateHistory property: The ImmutabilityPolicy update history of the blob container.- Returns:
- the updateHistory value.
-
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.
-
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.
-
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.
-
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.
-
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.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-