azure-native.storage.BlobContainerImmutabilityPolicy

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

Example Usage

CreateOrUpdateImmutabilityPolicy

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var blobContainerImmutabilityPolicy = new AzureNative.Storage.BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicy", new()
    {
        AccountName = "sto7069",
        AllowProtectedAppendWrites = true,
        ContainerName = "container6397",
        ImmutabilityPeriodSinceCreationInDays = 3,
        ImmutabilityPolicyName = "default",
        ResourceGroupName = "res1782",
    });

});
package main

import (
	storage "github.com/pulumi/pulumi-azure-native/sdk/go/azure/storage"
	"github.com/pulumi/pulumi/sdk/v3/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
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.storage.BlobContainerImmutabilityPolicy;
import com.pulumi.azurenative.storage.BlobContainerImmutabilityPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var blobContainerImmutabilityPolicy = new BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicy", BlobContainerImmutabilityPolicyArgs.builder()        
            .accountName("sto7069")
            .allowProtectedAppendWrites(true)
            .containerName("container6397")
            .immutabilityPeriodSinceCreationInDays(3)
            .immutabilityPolicyName("default")
            .resourceGroupName("res1782")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

blob_container_immutability_policy = azure_native.storage.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_native from "@pulumi/azure-native";

const blobContainerImmutabilityPolicy = new azure_native.storage.BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicy", {
    accountName: "sto7069",
    allowProtectedAppendWrites: true,
    containerName: "container6397",
    immutabilityPeriodSinceCreationInDays: 3,
    immutabilityPolicyName: "default",
    resourceGroupName: "res1782",
});
resources:
  blobContainerImmutabilityPolicy:
    type: azure-native:storage:BlobContainerImmutabilityPolicy
    properties:
      accountName: sto7069
      allowProtectedAppendWrites: true
      containerName: container6397
      immutabilityPeriodSinceCreationInDays: 3
      immutabilityPolicyName: default
      resourceGroupName: res1782

Create BlobContainerImmutabilityPolicy Resource

new BlobContainerImmutabilityPolicy(name: string, args: BlobContainerImmutabilityPolicyArgs, opts?: CustomResourceOptions);
@overload
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)
@overload
def BlobContainerImmutabilityPolicy(resource_name: str,
                                    args: BlobContainerImmutabilityPolicyArgs,
                                    opts: Optional[ResourceOptions] = None)
func NewBlobContainerImmutabilityPolicy(ctx *Context, name string, args BlobContainerImmutabilityPolicyArgs, opts ...ResourceOption) (*BlobContainerImmutabilityPolicy, error)
public BlobContainerImmutabilityPolicy(string name, BlobContainerImmutabilityPolicyArgs args, CustomResourceOptions? opts = null)
public BlobContainerImmutabilityPolicy(String name, BlobContainerImmutabilityPolicyArgs args)
public BlobContainerImmutabilityPolicy(String name, BlobContainerImmutabilityPolicyArgs args, CustomResourceOptions options)
type: azure-native:storage:BlobContainerImmutabilityPolicy
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args BlobContainerImmutabilityPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control 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.
name String
The unique name of the resource.
args BlobContainerImmutabilityPolicyArgs
The arguments to resource properties.
options 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 Architecture and Concepts 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.

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.

ImmutabilityPolicyName string

The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'

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.

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.

ImmutabilityPolicyName string

The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'

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.

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 Integer

The immutability period for the blobs in the container since the policy creation, in days.

immutabilityPolicyName String

The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'

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.

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.

immutabilityPolicyName string

The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'

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.

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.

immutability_policy_name str

The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'

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.

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.

immutabilityPolicyName String

The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'

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 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"

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"

Import

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

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

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0