ImmutabilityPolicyInner Class

public final class ImmutabilityPolicyInner
extends AzureEntityResource

The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.

Constructor Summary

Constructor Description
ImmutabilityPolicyInner()

Creates an instance of ImmutabilityPolicyInner 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: Resource Etag.

static ImmutabilityPolicyInner fromJson(JsonReader jsonReader)

Reads an instance of ImmutabilityPolicyInner from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

Integer immutabilityPeriodSinceCreationInDays()

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

String name()

Get the name property: The name of the resource.

ImmutabilityPolicyState state()

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

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

void validate()

Validates the instance.

ImmutabilityPolicyInner withAllowProtectedAppendWrites(Boolean allowProtectedAppendWrites)

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

ImmutabilityPolicyInner withAllowProtectedAppendWritesAll(Boolean allowProtectedAppendWritesAll)

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

ImmutabilityPolicyInner 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 AzureEntityResource

Methods inherited from java.lang.Object

Constructor Details

ImmutabilityPolicyInner

public ImmutabilityPolicyInner()

Creates an instance of ImmutabilityPolicyInner 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: Resource Etag.

Overrides:

ImmutabilityPolicyInner.etag()

Returns:

the etag value.

fromJson

public static ImmutabilityPolicyInner fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

ImmutabilityPolicyInner.id()

Returns:

the id 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.

name

public String name()

Get the name property: The name of the resource.

Overrides:

ImmutabilityPolicyInner.name()

Returns:

the name 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)

Overrides:

ImmutabilityPolicyInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

ImmutabilityPolicyInner.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

ImmutabilityPolicyInner.validate()

withAllowProtectedAppendWrites

public ImmutabilityPolicyInner 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 ImmutabilityPolicyInner object itself.

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.

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.

Applies to