Class ImmutableStorageAccount
java.lang.Object
com.azure.resourcemanager.storage.models.ImmutableStorageAccount
This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ImmutableStorageAccount class. -
Method Summary
Modifier and TypeMethodDescriptionenabled()Get the enabled property: A boolean flag which enables account-level immutability.Get the immutabilityPolicy property: Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level.voidvalidate()Validates the instance.withEnabled(Boolean enabled) Set the enabled property: A boolean flag which enables account-level immutability.withImmutabilityPolicy(AccountImmutabilityPolicyProperties immutabilityPolicy) Set the immutabilityPolicy property: Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level.
-
Constructor Details
-
ImmutableStorageAccount
public ImmutableStorageAccount()Creates an instance of ImmutableStorageAccount class.
-
-
Method Details
-
enabled
Get the enabled property: A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default.- Parameters:
enabled- the enabled value to set.- Returns:
- the ImmutableStorageAccount object itself.
-
immutabilityPolicy
Get the immutabilityPolicy property: Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy.- Returns:
- the immutabilityPolicy value.
-
withImmutabilityPolicy
public ImmutableStorageAccount withImmutabilityPolicy(AccountImmutabilityPolicyProperties immutabilityPolicy) Set the immutabilityPolicy property: Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy.- Parameters:
immutabilityPolicy- the immutabilityPolicy value to set.- Returns:
- the ImmutableStorageAccount object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-