Use Pulumi's new import command to generate code from existing cloud resources. Learn More

BlobContainerImmutabilityPolicy

The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. Latest API Version: 2019-06-01.

Example Usage

CreateOrUpdateImmutabilityPolicy

using Pulumi;
using AzureNextGen = Pulumi.AzureNextGen;

class MyStack : Stack
{
    public MyStack()
    {
        var blobContainerImmutabilityPolicy = new AzureNextGen.Storage.Latest.BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicy", new AzureNextGen.Storage.Latest.BlobContainerImmutabilityPolicyArgs
        {
            AccountName = "sto7069",
            AllowProtectedAppendWrites = true,
            ContainerName = "container6397",
            ImmutabilityPeriodSinceCreationInDays = 3,
            ImmutabilityPolicyName = "default",
            ResourceGroupName = "res1782",
        });
    }

}
package main

import (
    storage "github.com/pulumi/pulumi-azure-nextgen/sdk/go/azure/storage/latest"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := storage.NewBlobContainerImmutabilityPolicy(ctx, "blobContainerImmutabilityPolicy", &storage.BlobContainerImmutabilityPolicyArgs{
            AccountName:                           pulumi.String("sto7069"),
            AllowProtectedAppendWrites:            pulumi.Bool(true),
            ContainerName:                         pulumi.String("container6397"),
            ImmutabilityPeriodSinceCreationInDays: pulumi.Int(3),
            ImmutabilityPolicyName:                pulumi.String("default"),
            ResourceGroupName:                     pulumi.String("res1782"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure_nextgen as azure_nextgen

blob_container_immutability_policy = azure_nextgen.storage.latest.BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicy",
    account_name="sto7069",
    allow_protected_append_writes=True,
    container_name="container6397",
    immutability_period_since_creation_in_days=3,
    immutability_policy_name="default",
    resource_group_name="res1782")
import * as pulumi from "@pulumi/pulumi";
import * as azure_nextgen from "@pulumi/azure-nextgen";

const blobContainerImmutabilityPolicy = new azure_nextgen.storage.latest.BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicy", {
    accountName: "sto7069",
    allowProtectedAppendWrites: true,
    containerName: "container6397",
    immutabilityPeriodSinceCreationInDays: 3,
    immutabilityPolicyName: "default",
    resourceGroupName: "res1782",
});

Create a BlobContainerImmutabilityPolicy Resource

new BlobContainerImmutabilityPolicy(name: string, args: BlobContainerImmutabilityPolicyArgs, opts?: CustomResourceOptions);
def BlobContainerImmutabilityPolicy(resource_name: str, opts: Optional[ResourceOptions] = None, account_name: Optional[str] = None, allow_protected_append_writes: Optional[bool] = None, container_name: Optional[str] = None, immutability_period_since_creation_in_days: Optional[int] = None, immutability_policy_name: Optional[str] = None, resource_group_name: Optional[str] = None)
func NewBlobContainerImmutabilityPolicy(ctx *Context, name string, args BlobContainerImmutabilityPolicyArgs, opts ...ResourceOption) (*BlobContainerImmutabilityPolicy, error)
public BlobContainerImmutabilityPolicy(string name, BlobContainerImmutabilityPolicyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args BlobContainerImmutabilityPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BlobContainerImmutabilityPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BlobContainerImmutabilityPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

BlobContainerImmutabilityPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The BlobContainerImmutabilityPolicy resource accepts the following input properties:

AccountName string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
ContainerName string
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
ImmutabilityPolicyName string
The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be ‘default’
ResourceGroupName string
The name of the resource group within the user’s subscription. The name is case insensitive.
AllowProtectedAppendWrites bool
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
ImmutabilityPeriodSinceCreationInDays int
The immutability period for the blobs in the container since the policy creation, in days.
AccountName string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
ContainerName string
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
ImmutabilityPolicyName string
The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be ‘default’
ResourceGroupName string
The name of the resource group within the user’s subscription. The name is case insensitive.
AllowProtectedAppendWrites bool
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
ImmutabilityPeriodSinceCreationInDays int
The immutability period for the blobs in the container since the policy creation, in days.
accountName string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
containerName string
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
immutabilityPolicyName string
The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be ‘default’
resourceGroupName string
The name of the resource group within the user’s subscription. The name is case insensitive.
allowProtectedAppendWrites boolean
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
immutabilityPeriodSinceCreationInDays number
The immutability period for the blobs in the container since the policy creation, in days.
account_name str
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
container_name str
The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
immutability_policy_name str
The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be ‘default’
resource_group_name str
The name of the resource group within the user’s subscription. The name is case insensitive.
allow_protected_append_writes bool
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
immutability_period_since_creation_in_days int
The immutability period for the blobs in the container since the policy creation, in days.

Outputs

All input properties are implicitly available as output properties. Additionally, the BlobContainerImmutabilityPolicy resource produces the following output properties:

Etag string
Resource Etag.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
State string
The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
Type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
Etag string
Resource Etag.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
State string
The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
Type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
etag string
Resource Etag.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
state string
The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
etag str
Resource Etag.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
state str
The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
type str
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-nextgen:storage/latest:BlobContainerImmutabilityPolicy default /subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-nextgen
License
Apache-2.0