1. Registry
  2. Packages
  3. Azure Native
  4. API Docs
  5. storage
  6. Blob
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Viewing docs for Azure Native v3.32.0
published on Wednesday, Nov 18, 2026 by Pulumi
azure-native logo Azure Native
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Viewing docs for Azure Native v3.32.0
published on Wednesday, Nov 18, 2026 by Pulumi

    Manages a Blob within a Storage Container. For the supported combinations of properties and features please see here.

    Import

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

    $ pulumi import azure-native:storage:Blob myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/blobs/{blobName} 
    

    Create Blob Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Blob(name: string, args: BlobArgs, opts?: CustomResourceOptions);
    @overload
    def Blob(resource_name: str,
             args: BlobArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Blob(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             account_name: Optional[str] = None,
             container_name: Optional[str] = None,
             resource_group_name: Optional[str] = None,
             access_tier: Optional[BlobAccessTier] = None,
             blob_name: Optional[str] = None,
             content_md5: Optional[str] = None,
             content_type: Optional[str] = None,
             metadata: Optional[Mapping[str, str]] = None,
             source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
             type: Optional[BlobType] = None)
    func NewBlob(ctx *Context, name string, args BlobArgs, opts ...ResourceOption) (*Blob, error)
    public Blob(string name, BlobArgs args, CustomResourceOptions? opts = null)
    public Blob(String name, BlobArgs args)
    public Blob(String name, BlobArgs args, CustomResourceOptions options)
    
    type: azure-native:storage:Blob
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "azure-native_storage_blob" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args BlobArgs
    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 BlobArgs
    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 BlobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BlobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BlobArgs
    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 blobResource = new AzureNative.Storage.Blob("blobResource", new()
    {
        AccountName = "string",
        ContainerName = "string",
        ResourceGroupName = "string",
        AccessTier = AzureNative.Storage.BlobAccessTier.Hot,
        BlobName = "string",
        ContentMd5 = "string",
        ContentType = "string",
        Metadata = 
        {
            { "string", "string" },
        },
        Source = new StringAsset("content"),
        Type = AzureNative.Storage.BlobType.Block,
    });
    
    example, err := storage.NewBlob(ctx, "blobResource", &storage.BlobArgs{
    	AccountName:       pulumi.String("string"),
    	ContainerName:     pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	AccessTier:        storage.BlobAccessTierHot,
    	BlobName:          pulumi.String("string"),
    	ContentMd5:        pulumi.String("string"),
    	ContentType:       pulumi.String("string"),
    	Metadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Source: pulumi.NewStringAsset("content"),
    	Type:   storage.BlobTypeBlock,
    })
    
    resource "azure-native_storage_blob" "blobResource" {
      lifecycle {
        create_before_destroy = true
      }
      account_name        = "string"
      container_name      = "string"
      resource_group_name = "string"
      access_tier         = "Hot"
      blob_name           = "string"
      content_md5         = "string"
      content_type        = "string"
      metadata = {
        "string" = "string"
      }
      source = stringasset("content")
      type   = "Block"
    }
    
    var blobResource = new Blob("blobResource", BlobArgs.builder()
        .accountName("string")
        .containerName("string")
        .resourceGroupName("string")
        .accessTier(com.pulumi.azurenative.storage.enums.BlobAccessTier.Hot)
        .blobName("string")
        .contentMd5("string")
        .contentType("string")
        .metadata(Map.of("string", "string"))
        .source(new StringAsset("content"))
        .type(com.pulumi.azurenative.storage.enums.BlobType.Block)
        .build());
    
    blob_resource = azure_native.storage.Blob("blobResource",
        account_name="string",
        container_name="string",
        resource_group_name="string",
        access_tier=azure_native.storage.BlobAccessTier.HOT,
        blob_name="string",
        content_md5="string",
        content_type="string",
        metadata={
            "string": "string",
        },
        source=pulumi.StringAsset("content"),
        type=azure_native.storage.BlobType.BLOCK)
    
    const blobResource = new azure_native.storage.Blob("blobResource", {
        accountName: "string",
        containerName: "string",
        resourceGroupName: "string",
        accessTier: azure_native.storage.BlobAccessTier.Hot,
        blobName: "string",
        contentMd5: "string",
        contentType: "string",
        metadata: {
            string: "string",
        },
        source: new pulumi.asset.StringAsset("content"),
        type: azure_native.storage.BlobType.Block,
    });
    
    type: azure-native:storage:Blob
    properties:
        accessTier: Hot
        accountName: string
        blobName: string
        containerName: string
        contentMd5: string
        contentType: string
        metadata:
            string: string
        resourceGroupName: string
        source:
            fn::stringAsset: content
        type: Block
    

    Blob Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Blob resource accepts the following input properties:

    AccountName string
    Specifies the storage account in which to create the storage container.
    ContainerName string
    The name of the storage container in which this blob should be created.
    ResourceGroupName string
    The name of the resource group within the user's subscription.
    AccessTier Pulumi.AzureNative.Storage.BlobAccessTier
    The access tier of the storage blob. Only supported for standard storage accounts, not premium.
    BlobName string
    The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
    ContentMd5 string
    The MD5 sum of the blob contents, base64-encoded. Cannot be defined if blob type is Append.
    ContentType string
    The content type of the storage blob. Defaults to application/octet-stream.
    Metadata Dictionary<string, string>
    A map of custom blob metadata.
    Source AssetOrArchive
    An asset to copy to the blob contents. This field cannot be specified for Append blobs.
    Type Pulumi.AzureNative.Storage.BlobType
    The type of the storage blob to be created. Defaults to 'Block'.
    AccountName string
    Specifies the storage account in which to create the storage container.
    ContainerName string
    The name of the storage container in which this blob should be created.
    ResourceGroupName string
    The name of the resource group within the user's subscription.
    AccessTier BlobAccessTier
    The access tier of the storage blob. Only supported for standard storage accounts, not premium.
    BlobName string
    The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
    ContentMd5 string
    The MD5 sum of the blob contents, base64-encoded. Cannot be defined if blob type is Append.
    ContentType string
    The content type of the storage blob. Defaults to application/octet-stream.
    Metadata map[string]string
    A map of custom blob metadata.
    Source pulumi.AssetOrArchive
    An asset to copy to the blob contents. This field cannot be specified for Append blobs.
    Type BlobType
    The type of the storage blob to be created. Defaults to 'Block'.
    account_name string
    Specifies the storage account in which to create the storage container.
    container_name string
    The name of the storage container in which this blob should be created.
    resource_group_name string
    The name of the resource group within the user's subscription.
    access_tier "Hot" | "Cool" | "Archive"
    The access tier of the storage blob. Only supported for standard storage accounts, not premium.
    blob_name string
    The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
    content_md5 string
    The MD5 sum of the blob contents, base64-encoded. Cannot be defined if blob type is Append.
    content_type string
    The content type of the storage blob. Defaults to application/octet-stream.
    metadata map(string)
    A map of custom blob metadata.
    source asset
    An asset to copy to the blob contents. This field cannot be specified for Append blobs.
    type "Block" | "Append"
    The type of the storage blob to be created. Defaults to 'Block'.
    accountName String
    Specifies the storage account in which to create the storage container.
    containerName String
    The name of the storage container in which this blob should be created.
    resourceGroupName String
    The name of the resource group within the user's subscription.
    accessTier BlobAccessTier
    The access tier of the storage blob. Only supported for standard storage accounts, not premium.
    blobName String
    The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
    contentMd5 String
    The MD5 sum of the blob contents, base64-encoded. Cannot be defined if blob type is Append.
    contentType String
    The content type of the storage blob. Defaults to application/octet-stream.
    metadata Map<String,String>
    A map of custom blob metadata.
    source AssetOrArchive
    An asset to copy to the blob contents. This field cannot be specified for Append blobs.
    type BlobType
    The type of the storage blob to be created. Defaults to 'Block'.
    accountName string
    Specifies the storage account in which to create the storage container.
    containerName string
    The name of the storage container in which this blob should be created.
    resourceGroupName string
    The name of the resource group within the user's subscription.
    accessTier BlobAccessTier
    The access tier of the storage blob. Only supported for standard storage accounts, not premium.
    blobName string
    The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
    contentMd5 string
    The MD5 sum of the blob contents, base64-encoded. Cannot be defined if blob type is Append.
    contentType string
    The content type of the storage blob. Defaults to application/octet-stream.
    metadata {[key: string]: string}
    A map of custom blob metadata.
    source pulumi.asset.Asset | pulumi.asset.Archive
    An asset to copy to the blob contents. This field cannot be specified for Append blobs.
    type BlobType
    The type of the storage blob to be created. Defaults to 'Block'.
    account_name str
    Specifies the storage account in which to create the storage container.
    container_name str
    The name of the storage container in which this blob should be created.
    resource_group_name str
    The name of the resource group within the user's subscription.
    access_tier BlobAccessTier
    The access tier of the storage blob. Only supported for standard storage accounts, not premium.
    blob_name str
    The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
    content_md5 str
    The MD5 sum of the blob contents, base64-encoded. Cannot be defined if blob type is Append.
    content_type str
    The content type of the storage blob. Defaults to application/octet-stream.
    metadata Mapping[str, str]
    A map of custom blob metadata.
    source Union[pulumi.Asset, pulumi.Archive]
    An asset to copy to the blob contents. This field cannot be specified for Append blobs.
    type BlobType
    The type of the storage blob to be created. Defaults to 'Block'.
    accountName String
    Specifies the storage account in which to create the storage container.
    containerName String
    The name of the storage container in which this blob should be created.
    resourceGroupName String
    The name of the resource group within the user's subscription.
    accessTier "Hot" | "Cool" | "Archive"
    The access tier of the storage blob. Only supported for standard storage accounts, not premium.
    blobName String
    The name of the storage blob. Must be unique within the storage container the blob is located. If this property is not specified it will be set to the name of the resource.
    contentMd5 String
    The MD5 sum of the blob contents, base64-encoded. Cannot be defined if blob type is Append.
    contentType String
    The content type of the storage blob. Defaults to application/octet-stream.
    metadata Map<String>
    A map of custom blob metadata.
    source Asset
    An asset to copy to the blob contents. This field cannot be specified for Append blobs.
    type "Block" | "Append"
    The type of the storage blob to be created. Defaults to 'Block'.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the storage blob.
    Url string
    The URL of the blob.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the storage blob.
    Url string
    The URL of the blob.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the storage blob.
    url string
    The URL of the blob.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the storage blob.
    url String
    The URL of the blob.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the storage blob.
    url string
    The URL of the blob.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the storage blob.
    url str
    The URL of the blob.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the storage blob.
    url String
    The URL of the blob.

    Look up Existing Blob Resource

    Get an existing Blob resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, opts?: CustomResourceOptions): Blob
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> Blob
    func GetBlob(ctx *Context, name string, id IDInput, state *BlobState, opts ...ResourceOption) (*Blob, error)
    public static Blob Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static Blob get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingBlob:    type: azure-native:storage:Blob    get:      id: ${id}
    import {
      to = azure-native_storage_blob.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state BlobState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Supporting Types

    BlobAccessTier

    The access tier of a storage blob.

    NameValueDescription
    HotHotOptimized for storing data that is accessed frequently.
    CoolCoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
    ArchiveArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
    NameValueDescription
    BlobAccessTierHotHotOptimized for storing data that is accessed frequently.
    BlobAccessTierCoolCoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
    BlobAccessTierArchiveArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
    ValueDescription
    HotOptimized for storing data that is accessed frequently.
    CoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
    ArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
    NameValueDescription
    HotHotOptimized for storing data that is accessed frequently.
    CoolCoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
    ArchiveArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
    NameValueDescription
    HotHotOptimized for storing data that is accessed frequently.
    CoolCoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
    ArchiveArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
    NameValueDescription
    HOTHotOptimized for storing data that is accessed frequently.
    COOLCoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
    ARCHIVEArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.
    ValueDescription
    HotOptimized for storing data that is accessed frequently.
    CoolOptimized for storing data that is infrequently accessed and stored for at least 30 days.
    ArchiveOptimized for storing data that is rarely accessed and stored for at least 180 days with flexible latency requirements, on the order of hours.

    BlobType

    The type of a storage blob to be created.

    NameValueDescription
    BlockBlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
    AppendAppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
    NameValueDescription
    BlobTypeBlockBlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
    BlobTypeAppendAppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
    ValueDescription
    BlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
    AppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
    NameValueDescription
    BlockBlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
    AppendAppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
    NameValueDescription
    BlockBlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
    AppendAppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
    NameValueDescription
    BLOCKBlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
    APPENDAppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.
    ValueDescription
    BlockBlock blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually.
    AppendAppend blobs are made up of blocks like block blobs, but are optimized for append operations.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo Azure Native
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Viewing docs for Azure Native v3.32.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial