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

BlobContainer

Properties of the blob container, including Id, resource name, resource type, Etag. Latest API Version: 2019-06-01.

Example Usage

PutContainerWithDefaultEncryptionScope

using Pulumi;
using AzureNextGen = Pulumi.AzureNextGen;

class MyStack : Stack
{
    public MyStack()
    {
        var blobContainer = new AzureNextGen.Storage.Latest.BlobContainer("blobContainer", new AzureNextGen.Storage.Latest.BlobContainerArgs
        {
            AccountName = "sto328",
            ContainerName = "container6185",
            DefaultEncryptionScope = "encryptionscope185",
            DenyEncryptionScopeOverride = true,
            ResourceGroupName = "res3376",
        });
    }

}
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.NewBlobContainer(ctx, "blobContainer", &storage.BlobContainerArgs{
            AccountName:                 pulumi.String("sto328"),
            ContainerName:               pulumi.String("container6185"),
            DefaultEncryptionScope:      pulumi.String("encryptionscope185"),
            DenyEncryptionScopeOverride: pulumi.Bool(true),
            ResourceGroupName:           pulumi.String("res3376"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure_nextgen as azure_nextgen

blob_container = azure_nextgen.storage.latest.BlobContainer("blobContainer",
    account_name="sto328",
    container_name="container6185",
    default_encryption_scope="encryptionscope185",
    deny_encryption_scope_override=True,
    resource_group_name="res3376")
import * as pulumi from "@pulumi/pulumi";
import * as azure_nextgen from "@pulumi/azure-nextgen";

const blobContainer = new azure_nextgen.storage.latest.BlobContainer("blobContainer", {
    accountName: "sto328",
    containerName: "container6185",
    defaultEncryptionScope: "encryptionscope185",
    denyEncryptionScopeOverride: true,
    resourceGroupName: "res3376",
});

PutContainers

using Pulumi;
using AzureNextGen = Pulumi.AzureNextGen;

class MyStack : Stack
{
    public MyStack()
    {
        var blobContainer = new AzureNextGen.Storage.Latest.BlobContainer("blobContainer", new AzureNextGen.Storage.Latest.BlobContainerArgs
        {
            AccountName = "sto328",
            ContainerName = "container6185",
            ResourceGroupName = "res3376",
        });
    }

}
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.NewBlobContainer(ctx, "blobContainer", &storage.BlobContainerArgs{
            AccountName:       pulumi.String("sto328"),
            ContainerName:     pulumi.String("container6185"),
            ResourceGroupName: pulumi.String("res3376"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure_nextgen as azure_nextgen

blob_container = azure_nextgen.storage.latest.BlobContainer("blobContainer",
    account_name="sto328",
    container_name="container6185",
    resource_group_name="res3376")
import * as pulumi from "@pulumi/pulumi";
import * as azure_nextgen from "@pulumi/azure-nextgen";

const blobContainer = new azure_nextgen.storage.latest.BlobContainer("blobContainer", {
    accountName: "sto328",
    containerName: "container6185",
    resourceGroupName: "res3376",
});

Create a BlobContainer Resource

new BlobContainer(name: string, args: BlobContainerArgs, opts?: CustomResourceOptions);
def BlobContainer(resource_name: str, opts: Optional[ResourceOptions] = None, account_name: Optional[str] = None, container_name: Optional[str] = None, default_encryption_scope: Optional[str] = None, deny_encryption_scope_override: Optional[bool] = None, metadata: Optional[Mapping[str, str]] = None, public_access: Optional[PublicAccess] = None, resource_group_name: Optional[str] = None)
func NewBlobContainer(ctx *Context, name string, args BlobContainerArgs, opts ...ResourceOption) (*BlobContainer, error)
public BlobContainer(string name, BlobContainerArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args BlobContainerArgs
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 BlobContainerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BlobContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

BlobContainer Resource Properties

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

Inputs

The BlobContainer 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.
DefaultEncryptionScope string
Default the container to use specified encryption scope for all writes.
DenyEncryptionScopeOverride bool
Block override of encryption scope from the container default.
Metadata Dictionary<string, string>
A name-value pair to associate with the container as metadata.
PublicAccess Pulumi.AzureNextGen.Storage.PublicAccess
Specifies whether data in the container may be accessed publicly and the level of access.
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.
DefaultEncryptionScope string
Default the container to use specified encryption scope for all writes.
DenyEncryptionScopeOverride bool
Block override of encryption scope from the container default.
Metadata map[string]string
A name-value pair to associate with the container as metadata.
PublicAccess PublicAccess
Specifies whether data in the container may be accessed publicly and the level of access.
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.
defaultEncryptionScope string
Default the container to use specified encryption scope for all writes.
denyEncryptionScopeOverride boolean
Block override of encryption scope from the container default.
metadata {[key: string]: string}
A name-value pair to associate with the container as metadata.
publicAccess PublicAccess
Specifies whether data in the container may be accessed publicly and the level of access.
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.
default_encryption_scope str
Default the container to use specified encryption scope for all writes.
deny_encryption_scope_override bool
Block override of encryption scope from the container default.
metadata Mapping[str, str]
A name-value pair to associate with the container as metadata.
public_access PublicAccess
Specifies whether data in the container may be accessed publicly and the level of access.

Outputs

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

Deleted bool
Indicates whether the blob container was deleted.
DeletedTime string
Blob container deletion time.
Etag string
Resource Etag.
HasImmutabilityPolicy bool
The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
HasLegalHold bool
The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
Id string
The provider-assigned unique ID for this managed resource.
ImmutabilityPolicy Pulumi.AzureNextGen.Storage.Outputs.ImmutabilityPolicyPropertiesResponse
The ImmutabilityPolicy property of the container.
LastModifiedTime string
Returns the date and time the container was last modified.
LeaseDuration string
Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
LeaseState string
Lease state of the container.
LeaseStatus string
The lease status of the container.
LegalHold Pulumi.AzureNextGen.Storage.Outputs.LegalHoldPropertiesResponse
The LegalHold property of the container.
Name string
The name of the resource
RemainingRetentionDays int
Remaining retention days for soft deleted blob container.
Type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
Version string
The version of the deleted blob container.
Deleted bool
Indicates whether the blob container was deleted.
DeletedTime string
Blob container deletion time.
Etag string
Resource Etag.
HasImmutabilityPolicy bool
The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
HasLegalHold bool
The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
Id string
The provider-assigned unique ID for this managed resource.
ImmutabilityPolicy ImmutabilityPolicyPropertiesResponse
The ImmutabilityPolicy property of the container.
LastModifiedTime string
Returns the date and time the container was last modified.
LeaseDuration string
Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
LeaseState string
Lease state of the container.
LeaseStatus string
The lease status of the container.
LegalHold LegalHoldPropertiesResponse
The LegalHold property of the container.
Name string
The name of the resource
RemainingRetentionDays int
Remaining retention days for soft deleted blob container.
Type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
Version string
The version of the deleted blob container.
deleted boolean
Indicates whether the blob container was deleted.
deletedTime string
Blob container deletion time.
etag string
Resource Etag.
hasImmutabilityPolicy boolean
The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
hasLegalHold boolean
The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
id string
The provider-assigned unique ID for this managed resource.
immutabilityPolicy ImmutabilityPolicyPropertiesResponse
The ImmutabilityPolicy property of the container.
lastModifiedTime string
Returns the date and time the container was last modified.
leaseDuration string
Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
leaseState string
Lease state of the container.
leaseStatus string
The lease status of the container.
legalHold LegalHoldPropertiesResponse
The LegalHold property of the container.
name string
The name of the resource
remainingRetentionDays number
Remaining retention days for soft deleted blob container.
type string
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
version string
The version of the deleted blob container.
deleted bool
Indicates whether the blob container was deleted.
deleted_time str
Blob container deletion time.
etag str
Resource Etag.
has_immutability_policy bool
The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.
has_legal_hold bool
The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
id str
The provider-assigned unique ID for this managed resource.
immutability_policy ImmutabilityPolicyPropertiesResponse
The ImmutabilityPolicy property of the container.
last_modified_time str
Returns the date and time the container was last modified.
lease_duration str
Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
lease_state str
Lease state of the container.
lease_status str
The lease status of the container.
legal_hold LegalHoldPropertiesResponse
The LegalHold property of the container.
name str
The name of the resource
remaining_retention_days int
Remaining retention days for soft deleted blob container.
type str
The type of the resource. E.g. “Microsoft.Compute/virtualMachines” or “Microsoft.Storage/storageAccounts”
version str
The version of the deleted blob container.

Supporting Types

ImmutabilityPolicyPropertiesResponse

Etag string
ImmutabilityPolicy Etag.
State string
The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
UpdateHistory List<Pulumi.AzureNextGen.Storage.Inputs.UpdateHistoryPropertyResponseArgs>
The ImmutabilityPolicy update history of the blob container.
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.
Etag string
ImmutabilityPolicy Etag.
State string
The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
UpdateHistory []UpdateHistoryPropertyResponse
The ImmutabilityPolicy update history of the blob container.
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.
etag string
ImmutabilityPolicy Etag.
state string
The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
updateHistory UpdateHistoryPropertyResponse[]
The ImmutabilityPolicy update history of the blob container.
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.
etag str
ImmutabilityPolicy Etag.
state str
The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.
update_history Sequence[UpdateHistoryPropertyResponseArgs]
The ImmutabilityPolicy update history of the blob container.
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.

LegalHoldPropertiesResponse

HasLegalHold bool
The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
Tags List<Pulumi.AzureNextGen.Storage.Inputs.TagPropertyResponseArgs>
The list of LegalHold tags of a blob container.
HasLegalHold bool
The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
Tags []TagPropertyResponse
The list of LegalHold tags of a blob container.
hasLegalHold boolean
The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
tags TagPropertyResponse[]
The list of LegalHold tags of a blob container.
has_legal_hold bool
The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.
tags Sequence[TagPropertyResponseArgs]
The list of LegalHold tags of a blob container.

PublicAccess

Container
Container
Blob
Blob
None
None
PublicAccessContainer
Container
PublicAccessBlob
Blob
PublicAccessNone
None
Container
Container
Blob
Blob
None
None
CONTAINER
Container
BLOB
Blob
NONE
None

TagPropertyResponse

ObjectIdentifier string
Returns the Object ID of the user who added the tag.
Tag string
The tag value.
TenantId string
Returns the Tenant ID that issued the token for the user who added the tag.
Timestamp string
Returns the date and time the tag was added.
Upn string
Returns the User Principal Name of the user who added the tag.
ObjectIdentifier string
Returns the Object ID of the user who added the tag.
Tag string
The tag value.
TenantId string
Returns the Tenant ID that issued the token for the user who added the tag.
Timestamp string
Returns the date and time the tag was added.
Upn string
Returns the User Principal Name of the user who added the tag.
objectIdentifier string
Returns the Object ID of the user who added the tag.
tag string
The tag value.
tenantId string
Returns the Tenant ID that issued the token for the user who added the tag.
timestamp string
Returns the date and time the tag was added.
upn string
Returns the User Principal Name of the user who added the tag.
object_identifier str
Returns the Object ID of the user who added the tag.
tag str
The tag value.
tenant_id str
Returns the Tenant ID that issued the token for the user who added the tag.
timestamp str
Returns the date and time the tag was added.
upn str
Returns the User Principal Name of the user who added the tag.

UpdateHistoryPropertyResponse

ImmutabilityPeriodSinceCreationInDays int
The immutability period for the blobs in the container since the policy creation, in days.
ObjectIdentifier string
Returns the Object ID of the user who updated the ImmutabilityPolicy.
TenantId string
Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.
Timestamp string
Returns the date and time the ImmutabilityPolicy was updated.
Update string
The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.
Upn string
Returns the User Principal Name of the user who updated the ImmutabilityPolicy.
ImmutabilityPeriodSinceCreationInDays int
The immutability period for the blobs in the container since the policy creation, in days.
ObjectIdentifier string
Returns the Object ID of the user who updated the ImmutabilityPolicy.
TenantId string
Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.
Timestamp string
Returns the date and time the ImmutabilityPolicy was updated.
Update string
The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.
Upn string
Returns the User Principal Name of the user who updated the ImmutabilityPolicy.
immutabilityPeriodSinceCreationInDays number
The immutability period for the blobs in the container since the policy creation, in days.
objectIdentifier string
Returns the Object ID of the user who updated the ImmutabilityPolicy.
tenantId string
Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.
timestamp string
Returns the date and time the ImmutabilityPolicy was updated.
update string
The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.
upn string
Returns the User Principal Name of the user who updated the ImmutabilityPolicy.
immutability_period_since_creation_in_days int
The immutability period for the blobs in the container since the policy creation, in days.
object_identifier str
Returns the Object ID of the user who updated the ImmutabilityPolicy.
tenant_id str
Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.
timestamp str
Returns the date and time the ImmutabilityPolicy was updated.
update str
The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.
upn str
Returns the User Principal Name of the user who updated the ImmutabilityPolicy.

Import

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

$ pulumi import azure-nextgen:storage/latest:BlobContainer container6185 /subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185 

Package Details

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