com.pulumi.azure.storage.outputs.AccountImmutabilityPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.storage.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
@CustomType
public final class AccountImmutabilityPolicy {
/**
* @return 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.
*
*/
private Boolean allowProtectedAppendWrites;
/**
* @return The immutability period for the blobs in the container since the policy creation, in days.
*
*/
private Integer periodSinceCreationInDays;
/**
* @return 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.
*
*/
private String state;
private AccountImmutabilityPolicy() {}
/**
* @return 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.
*
*/
public Boolean allowProtectedAppendWrites() {
return this.allowProtectedAppendWrites;
}
/**
* @return The immutability period for the blobs in the container since the policy creation, in days.
*
*/
public Integer periodSinceCreationInDays() {
return this.periodSinceCreationInDays;
}
/**
* @return 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.
*
*/
public String state() {
return this.state;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AccountImmutabilityPolicy defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private Boolean allowProtectedAppendWrites;
private Integer periodSinceCreationInDays;
private String state;
public Builder() {}
public Builder(AccountImmutabilityPolicy defaults) {
Objects.requireNonNull(defaults);
this.allowProtectedAppendWrites = defaults.allowProtectedAppendWrites;
this.periodSinceCreationInDays = defaults.periodSinceCreationInDays;
this.state = defaults.state;
}
@CustomType.Setter
public Builder allowProtectedAppendWrites(Boolean allowProtectedAppendWrites) {
if (allowProtectedAppendWrites == null) {
throw new MissingRequiredPropertyException("AccountImmutabilityPolicy", "allowProtectedAppendWrites");
}
this.allowProtectedAppendWrites = allowProtectedAppendWrites;
return this;
}
@CustomType.Setter
public Builder periodSinceCreationInDays(Integer periodSinceCreationInDays) {
if (periodSinceCreationInDays == null) {
throw new MissingRequiredPropertyException("AccountImmutabilityPolicy", "periodSinceCreationInDays");
}
this.periodSinceCreationInDays = periodSinceCreationInDays;
return this;
}
@CustomType.Setter
public Builder state(String state) {
if (state == null) {
throw new MissingRequiredPropertyException("AccountImmutabilityPolicy", "state");
}
this.state = state;
return this;
}
public AccountImmutabilityPolicy build() {
final var _resultValue = new AccountImmutabilityPolicy();
_resultValue.allowProtectedAppendWrites = allowProtectedAppendWrites;
_resultValue.periodSinceCreationInDays = periodSinceCreationInDays;
_resultValue.state = state;
return _resultValue;
}
}
}