Class ImmutabilityPolicyInner
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.resourcemanager.storage.models.AzureEntityResource
com.azure.resourcemanager.storage.fluent.models.ImmutabilityPolicyInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ImmutabilityPolicyInner class. -
Method Summary
Modifier and TypeMethodDescriptionGet the allowProtectedAppendWrites property: This property can only be changed for unlocked time-based retention policies.Get the allowProtectedAppendWritesAll property: This property can only be changed for unlocked time-based retention policies.etag()Get the etag property: Resource Etag.static ImmutabilityPolicyInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ImmutabilityPolicyInner from the JsonReader.id()Get the id property: Fully qualified resource Id for the resource.Get the immutabilityPeriodSinceCreationInDays property: The immutability period for the blobs in the container since the policy creation, in days.name()Get the name property: The name of the resource.state()Get the state property: The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The type of the resource.voidvalidate()Validates the instance.withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites) Set the allowProtectedAppendWrites property: This property can only be changed for unlocked time-based retention policies.withAllowProtectedAppendWritesAll(Boolean allowProtectedAppendWritesAll) Set the allowProtectedAppendWritesAll property: This property can only be changed for unlocked time-based retention policies.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 class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ImmutabilityPolicyInner
public ImmutabilityPolicyInner()Creates an instance of ImmutabilityPolicyInner class.
-
-
Method Details
-
etag
Get the etag property: Resource Etag.- Overrides:
etagin classAzureEntityResource- Returns:
- the etag value.
-
type
Get the type property: The type of the resource.- Overrides:
typein classAzureEntityResource- Returns:
- the type value.
-
name
Get the name property: The name of the resource.- Overrides:
namein classAzureEntityResource- Returns:
- the name value.
-
id
Get the id property: Fully qualified resource Id for the resource.- Overrides:
idin classAzureEntityResource- Returns:
- the id value.
-
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 ImmutabilityPolicyInner 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 ImmutabilityPolicyInner object itself.
-
state
Get the state property: The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.- Returns:
- the state value.
-
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
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 ImmutabilityPolicyInner object itself.
-
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.
-
withAllowProtectedAppendWritesAll
public ImmutabilityPolicyInner 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 ImmutabilityPolicyInner object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classAzureEntityResource- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>- Overrides:
toJsonin classAzureEntityResource- Throws:
IOException
-
fromJson
public static ImmutabilityPolicyInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ImmutabilityPolicyInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ImmutabilityPolicyInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ImmutabilityPolicyInner.
-