import * as pulumi from "@pulumi/pulumi"; /** * Manages an Immutability Policy for a Container within an Azure Storage Account. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleAccount = new azure.storage.Account("example", { * name: "examplestoraccount", * resourceGroupName: example.name, * location: example.location, * accountTier: "Standard", * accountReplicationType: "LRS", * tags: { * environment: "staging", * }, * }); * const exampleContainer = new azure.storage.Container("example", { * name: "example", * storageAccountName: exampleAccount.name, * containerAccessType: "private", * }); * const exampleContainerImmutabilityPolicy = new azure.storage.ContainerImmutabilityPolicy("example", { * storageContainerResourceManagerId: exampleContainer.id, * immutabilityPeriodInDays: 14, * protectedAppendWritesAllEnabled: false, * protectedAppendWritesEnabled: true, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Storage` - 2025-06-01 * * ## Import * * Storage Container Immutability Policies can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:storage/containerImmutabilityPolicy:ContainerImmutabilityPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/blobServices/default/containers/mycontainer/immutabilityPolicies/default * ``` */ export declare class ContainerImmutabilityPolicy extends pulumi.CustomResource { /** * Get an existing ContainerImmutabilityPolicy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ContainerImmutabilityPolicyState, opts?: pulumi.CustomResourceOptions): ContainerImmutabilityPolicy; /** * Returns true if the given object is an instance of ContainerImmutabilityPolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ContainerImmutabilityPolicy; /** * The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state. */ readonly immutabilityPeriodInDays: pulumi.Output; /** * Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked. * * !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information. */ readonly locked: pulumi.Output; /** * Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`. */ readonly protectedAppendWritesAllEnabled: pulumi.Output; /** * Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`. */ readonly protectedAppendWritesEnabled: pulumi.Output; /** * The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created. */ readonly storageContainerResourceManagerId: pulumi.Output; /** * Create a ContainerImmutabilityPolicy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ContainerImmutabilityPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ContainerImmutabilityPolicy resources. */ export interface ContainerImmutabilityPolicyState { /** * The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state. */ immutabilityPeriodInDays?: pulumi.Input; /** * Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked. * * !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information. */ locked?: pulumi.Input; /** * Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`. */ protectedAppendWritesAllEnabled?: pulumi.Input; /** * Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`. */ protectedAppendWritesEnabled?: pulumi.Input; /** * The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created. */ storageContainerResourceManagerId?: pulumi.Input; } /** * The set of arguments for constructing a ContainerImmutabilityPolicy resource. */ export interface ContainerImmutabilityPolicyArgs { /** * The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state. */ immutabilityPeriodInDays: pulumi.Input; /** * Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked. * * !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information. */ locked?: pulumi.Input; /** * Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`. */ protectedAppendWritesAllEnabled?: pulumi.Input; /** * Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`. */ protectedAppendWritesEnabled?: pulumi.Input; /** * The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created. */ storageContainerResourceManagerId: pulumi.Input; }