azure-native.storage.BlobContainerImmutabilityPolicy
Explore with Pulumi AI
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 System.Linq;
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/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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BlobContainerImmutabilityPolicy(name: string, args: BlobContainerImmutabilityPolicyArgs, opts?: CustomResourceOptions);
@overload
def BlobContainerImmutabilityPolicy(resource_name: str,
args: BlobContainerImmutabilityPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BlobContainerImmutabilityPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_name: Optional[str] = None,
container_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
allow_protected_append_writes: Optional[bool] = None,
immutability_period_since_creation_in_days: Optional[int] = None,
immutability_policy_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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var blobContainerImmutabilityPolicyResource = new AzureNative.Storage.BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicyResource", new()
{
AccountName = "string",
ContainerName = "string",
ResourceGroupName = "string",
AllowProtectedAppendWrites = false,
ImmutabilityPeriodSinceCreationInDays = 0,
ImmutabilityPolicyName = "string",
});
example, err := storage.NewBlobContainerImmutabilityPolicy(ctx, "blobContainerImmutabilityPolicyResource", &storage.BlobContainerImmutabilityPolicyArgs{
AccountName: "string",
ContainerName: "string",
ResourceGroupName: "string",
AllowProtectedAppendWrites: false,
ImmutabilityPeriodSinceCreationInDays: 0,
ImmutabilityPolicyName: "string",
})
var blobContainerImmutabilityPolicyResource = new BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicyResource", BlobContainerImmutabilityPolicyArgs.builder()
.accountName("string")
.containerName("string")
.resourceGroupName("string")
.allowProtectedAppendWrites(false)
.immutabilityPeriodSinceCreationInDays(0)
.immutabilityPolicyName("string")
.build());
blob_container_immutability_policy_resource = azure_native.storage.BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicyResource",
account_name=string,
container_name=string,
resource_group_name=string,
allow_protected_append_writes=False,
immutability_period_since_creation_in_days=0,
immutability_policy_name=string)
const blobContainerImmutabilityPolicyResource = new azure_native.storage.BlobContainerImmutabilityPolicy("blobContainerImmutabilityPolicyResource", {
accountName: "string",
containerName: "string",
resourceGroupName: "string",
allowProtectedAppendWrites: false,
immutabilityPeriodSinceCreationInDays: 0,
immutabilityPolicyName: "string",
});
type: azure-native:storage:BlobContainerImmutabilityPolicy
properties:
accountName: string
allowProtectedAppendWrites: false
containerName: string
immutabilityPeriodSinceCreationInDays: 0
immutabilityPolicyName: string
resourceGroupName: string
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:
- Account
Name 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.
- Container
Name 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.
- Resource
Group stringName - The name of the resource group within the user's subscription. The name is case insensitive.
- Allow
Protected boolAppend Writes - 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 intSince Creation In Days - The immutability period for the blobs in the container since the policy creation, in days.
- Immutability
Policy stringName - The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
- Account
Name 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.
- Container
Name 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.
- Resource
Group stringName - The name of the resource group within the user's subscription. The name is case insensitive.
- Allow
Protected boolAppend Writes - 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 intSince Creation In Days - The immutability period for the blobs in the container since the policy creation, in days.
- Immutability
Policy stringName - The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
- account
Name 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.
- container
Name 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.
- resource
Group StringName - The name of the resource group within the user's subscription. The name is case insensitive.
- allow
Protected BooleanAppend Writes - 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 IntegerSince Creation In Days - The immutability period for the blobs in the container since the policy creation, in days.
- immutability
Policy StringName - The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
- account
Name 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.
- container
Name 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.
- resource
Group stringName - The name of the resource group within the user's subscription. The name is case insensitive.
- allow
Protected booleanAppend Writes - 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 numberSince Creation In Days - The immutability period for the blobs in the container since the policy creation, in days.
- immutability
Policy stringName - 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_ strname - The name of the resource group within the user's subscription. The name is case insensitive.
- allow_
protected_ boolappend_ writes - 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_ intsince_ creation_ in_ days - The immutability period for the blobs in the container since the policy creation, in days.
- immutability_
policy_ strname - The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'
- account
Name 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.
- container
Name 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.
- resource
Group StringName - The name of the resource group within the user's subscription. The name is case insensitive.
- allow
Protected BooleanAppend Writes - 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 NumberSince Creation In Days - The immutability period for the blobs in the container since the policy creation, in days.
- immutability
Policy StringName - 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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0