Microsoft.Storage storageAccounts/blobServices/containers/immutabilityPolicies 2021-02-01

Bicep resource definition

The storageAccounts/blobServices/containers/immutabilityPolicies resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies@2021-02-01' = {
  name: 'default'
  parent: resourceSymbolicName
  properties: {
    allowProtectedAppendWrites: bool
    immutabilityPeriodSinceCreationInDays: int
  }
}

Property values

storageAccounts/blobServices/containers/immutability...

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
'default'
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: containers
properties The properties of an ImmutabilityPolicy of a blob container. ImmutabilityPolicyProperty (required)

ImmutabilityPolicyProperty

Name Description Value
allowProtectedAppendWrites 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 bool
immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. int

ARM template resource definition

The storageAccounts/blobServices/containers/immutabilityPolicies resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies resource, add the following JSON to your template.

{
  "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies",
  "apiVersion": "2021-02-01",
  "name": "default",
  "properties": {
    "allowProtectedAppendWrites": "bool",
    "immutabilityPeriodSinceCreationInDays": "int"
  }
}

Property values

storageAccounts/blobServices/containers/immutability...

Name Description Value
type The resource type 'Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies'
apiVersion The resource api version '2021-02-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
'default'
properties The properties of an ImmutabilityPolicy of a blob container. ImmutabilityPolicyProperty (required)

ImmutabilityPolicyProperty

Name Description Value
allowProtectedAppendWrites 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 bool
immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. int

Terraform (AzAPI provider) resource definition

The storageAccounts/blobServices/containers/immutabilityPolicies resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies@2021-02-01"
  name = "default"
  parent_id = "string"
  body = jsonencode({
    properties = {
      allowProtectedAppendWrites = bool
      immutabilityPeriodSinceCreationInDays = int
    }
  })
}

Property values

storageAccounts/blobServices/containers/immutability...

Name Description Value
type The resource type "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies@2021-02-01"
name The resource name "default"
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: containers
properties The properties of an ImmutabilityPolicy of a blob container. ImmutabilityPolicyProperty (required)

ImmutabilityPolicyProperty

Name Description Value
allowProtectedAppendWrites 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 bool
immutabilityPeriodSinceCreationInDays The immutability period for the blobs in the container since the policy creation, in days. int