AccountImmutabilityPolicyProperties Class
- java.
lang. Object - com.
azure. resourcemanager. storage. models. AccountImmutabilityPolicyProperties
- com.
Implements
public final class AccountImmutabilityPolicyProperties
implements JsonSerializable<AccountImmutabilityPolicyProperties>
This defines account-level immutability policy properties.
Constructor Summary
Constructor | Description |
---|---|
AccountImmutabilityPolicyProperties() |
Creates an instance of Account |
Method Summary
Modifier and Type | Method and Description |
---|---|
Boolean |
allowProtectedAppendWrites()
Get the allow |
static
Account |
fromJson(JsonReader jsonReader)
Reads an instance of Account |
Integer |
immutabilityPeriodSinceCreationInDays()
Get the immutability |
Account |
state()
Get the state property: The Immutability |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Account |
withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites)
Set the allow |
Account |
withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays)
Set the immutability |
Account |
withState(AccountImmutabilityPolicyState state)
Set the state property: The Immutability |
Methods inherited from java.lang.Object
Constructor Details
AccountImmutabilityPolicyProperties
public AccountImmutabilityPolicyProperties()
Creates an instance of AccountImmutabilityPolicyProperties class.
Method Details
allowProtectedAppendWrites
public Boolean allowProtectedAppendWrites()
Get the allowProtectedAppendWrites property: This property can only be changed for disabled and 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.
Returns:
fromJson
public static AccountImmutabilityPolicyProperties fromJson(JsonReader jsonReader)
Reads an instance of AccountImmutabilityPolicyProperties from the JsonReader.
Parameters:
Returns:
Throws:
immutabilityPeriodSinceCreationInDays
public Integer immutabilityPeriodSinceCreationInDays()
Get the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.
Returns:
state
public AccountImmutabilityPolicyState state()
Get the state property: The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAllowProtectedAppendWrites
public AccountImmutabilityPolicyProperties withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites)
Set the allowProtectedAppendWrites property: This property can only be changed for disabled and 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.
Parameters:
Returns:
withImmutabilityPeriodSinceCreationInDays
public AccountImmutabilityPolicyProperties withImmutabilityPeriodSinceCreationInDays(Integer immutabilityPeriodSinceCreationInDays)
Set the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.
Parameters:
Returns:
withState
public AccountImmutabilityPolicyProperties withState(AccountImmutabilityPolicyState state)
Set the state property: The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.
Parameters:
Returns:
Applies to
Azure SDK for Java