Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.14.0 published on Thursday, Jul 28, 2022 by Pulumi

Blob

Manages a Blob within a Storage Container.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            AccountTier = "Standard",
            AccountReplicationType = "LRS",
        });
        var exampleContainer = new Azure.Storage.Container("exampleContainer", new Azure.Storage.ContainerArgs
        {
            StorageAccountName = exampleAccount.Name,
            ContainerAccessType = "private",
        });
        var exampleBlob = new Azure.Storage.Blob("exampleBlob", new Azure.Storage.BlobArgs
        {
            StorageAccountName = exampleAccount.Name,
            StorageContainerName = exampleContainer.Name,
            Type = "Block",
            Source = new FileAsset("some-local-file.zip"),
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
		})
		if err != nil {
			return err
		}
		exampleContainer, err := storage.NewContainer(ctx, "exampleContainer", &storage.ContainerArgs{
			StorageAccountName:  exampleAccount.Name,
			ContainerAccessType: pulumi.String("private"),
		})
		if err != nil {
			return err
		}
		_, err = storage.NewBlob(ctx, "exampleBlob", &storage.BlobArgs{
			StorageAccountName:   exampleAccount.Name,
			StorageContainerName: exampleContainer.Name,
			Type:                 pulumi.String("Block"),
			Source:               pulumi.NewFileAsset("some-local-file.zip"),
		})
		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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azure.storage.Blob;
import com.pulumi.azure.storage.BlobArgs;
import com.pulumi.asset.FileAsset;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .build());

        var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()        
            .storageAccountName(exampleAccount.name())
            .containerAccessType("private")
            .build());

        var exampleBlob = new Blob("exampleBlob", BlobArgs.builder()        
            .storageAccountName(exampleAccount.name())
            .storageContainerName(exampleContainer.name())
            .type("Block")
            .source(new FileAsset("some-local-file.zip"))
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS")
example_container = azure.storage.Container("exampleContainer",
    storage_account_name=example_account.name,
    container_access_type="private")
example_blob = azure.storage.Blob("exampleBlob",
    storage_account_name=example_account.name,
    storage_container_name=example_container.name,
    type="Block",
    source=pulumi.FileAsset("some-local-file.zip"))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
});
const exampleContainer = new azure.storage.Container("exampleContainer", {
    storageAccountName: exampleAccount.name,
    containerAccessType: "private",
});
const exampleBlob = new azure.storage.Blob("exampleBlob", {
    storageAccountName: exampleAccount.name,
    storageContainerName: exampleContainer.name,
    type: "Block",
    source: new pulumi.asset.FileAsset("some-local-file.zip"),
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAccount:
    type: azure:storage:Account
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountReplicationType: LRS
  exampleContainer:
    type: azure:storage:Container
    properties:
      storageAccountName: ${exampleAccount.name}
      containerAccessType: private
  exampleBlob:
    type: azure:storage:Blob
    properties:
      storageAccountName: ${exampleAccount.name}
      storageContainerName: ${exampleContainer.name}
      type: Block
      source:
        Fn::FileAsset: some-local-file.zip

Create a Blob Resource

new Blob(name: string, args: BlobArgs, opts?: CustomResourceOptions);
@overload
def Blob(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         access_tier: Optional[str] = None,
         cache_control: Optional[str] = None,
         content_md5: Optional[str] = None,
         content_type: Optional[str] = None,
         metadata: Optional[Mapping[str, str]] = None,
         name: Optional[str] = None,
         parallelism: Optional[int] = None,
         size: Optional[int] = None,
         source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
         source_content: Optional[str] = None,
         source_uri: Optional[str] = None,
         storage_account_name: Optional[str] = None,
         storage_container_name: Optional[str] = None,
         type: Optional[str] = None)
@overload
def Blob(resource_name: str,
         args: BlobArgs,
         opts: Optional[ResourceOptions] = 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:storage:Blob
properties: # The arguments to resource properties.
options: # 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.
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.

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

The Blob resource accepts the following input properties:

StorageAccountName string

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

StorageContainerName string

The name of the storage container in which this blob should be created.

Type string

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

AccessTier string

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

CacheControl string

Controls the cache control header content of the response when blob is requested .

ContentMd5 string

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

ContentType string

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

Metadata Dictionary<string, string>

A map of custom blob metadata.

Name string

The name of the storage blob. Must be unique within the storage container the blob is located.

Parallelism int

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

Size int

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

Source AssetOrArchive

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

SourceContent string

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

SourceUri string

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

StorageAccountName string

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

StorageContainerName string

The name of the storage container in which this blob should be created.

Type string

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

AccessTier string

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

CacheControl string

Controls the cache control header content of the response when blob is requested .

ContentMd5 string

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

ContentType string

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

Metadata map[string]string

A map of custom blob metadata.

Name string

The name of the storage blob. Must be unique within the storage container the blob is located.

Parallelism int

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

Size int

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

Source pulumi.AssetOrArchive

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

SourceContent string

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

SourceUri string

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

storageAccountName String

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

storageContainerName String

The name of the storage container in which this blob should be created.

type String

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

accessTier String

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

cacheControl String

Controls the cache control header content of the response when blob is requested .

contentMd5 String

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

contentType String

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

metadata Map<String,String>

A map of custom blob metadata.

name String

The name of the storage blob. Must be unique within the storage container the blob is located.

parallelism Integer

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

size Integer

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

source AssetOrArchive

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

sourceContent String

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

sourceUri String

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

storageAccountName string

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

storageContainerName string

The name of the storage container in which this blob should be created.

type string

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

accessTier string

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

cacheControl string

Controls the cache control header content of the response when blob is requested .

contentMd5 string

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

contentType string

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

metadata {[key: string]: string}

A map of custom blob metadata.

name string

The name of the storage blob. Must be unique within the storage container the blob is located.

parallelism number

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

size number

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

source pulumi.asset.Asset | pulumi.asset.Archive

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

sourceContent string

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

sourceUri string

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

storage_account_name str

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

storage_container_name str

The name of the storage container in which this blob should be created.

type str

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

access_tier str

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

cache_control str

Controls the cache control header content of the response when blob is requested .

content_md5 str

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

content_type str

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

metadata Mapping[str, str]

A map of custom blob metadata.

name str

The name of the storage blob. Must be unique within the storage container the blob is located.

parallelism int

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

size int

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

source Union[pulumi.Asset, pulumi.Archive]

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

source_content str

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

source_uri str

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

storageAccountName String

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

storageContainerName String

The name of the storage container in which this blob should be created.

type String

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

accessTier String

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

cacheControl String

Controls the cache control header content of the response when blob is requested .

contentMd5 String

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

contentType String

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

metadata Map<String>

A map of custom blob metadata.

name String

The name of the storage blob. Must be unique within the storage container the blob is located.

parallelism Number

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

size Number

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

source Asset

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

sourceContent String

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

sourceUri String

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

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.

Url string

The URL of the blob

Id string

The provider-assigned unique ID for this managed resource.

Url string

The URL of the blob

id String

The provider-assigned unique ID for this managed resource.

url String

The URL of the blob

id string

The provider-assigned unique ID for this managed resource.

url string

The URL of the blob

id str

The provider-assigned unique ID for this managed resource.

url str

The URL of the blob

id String

The provider-assigned unique ID for this managed resource.

url String

The URL of the blob

Look up an 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>, state?: BlobState, opts?: CustomResourceOptions): Blob
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_tier: Optional[str] = None,
        cache_control: Optional[str] = None,
        content_md5: Optional[str] = None,
        content_type: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        parallelism: Optional[int] = None,
        size: Optional[int] = None,
        source: Optional[Union[pulumi.Asset, pulumi.Archive]] = None,
        source_content: Optional[str] = None,
        source_uri: Optional[str] = None,
        storage_account_name: Optional[str] = None,
        storage_container_name: Optional[str] = None,
        type: Optional[str] = None,
        url: Optional[str] = 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, BlobState? state, CustomResourceOptions? opts = null)
public static Blob get(String name, Output<String> id, BlobState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessTier string

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

CacheControl string

Controls the cache control header content of the response when blob is requested .

ContentMd5 string

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

ContentType string

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

Metadata Dictionary<string, string>

A map of custom blob metadata.

Name string

The name of the storage blob. Must be unique within the storage container the blob is located.

Parallelism int

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

Size int

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

Source AssetOrArchive

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

SourceContent string

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

SourceUri string

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

StorageAccountName string

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

StorageContainerName string

The name of the storage container in which this blob should be created.

Type string

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

Url string

The URL of the blob

AccessTier string

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

CacheControl string

Controls the cache control header content of the response when blob is requested .

ContentMd5 string

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

ContentType string

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

Metadata map[string]string

A map of custom blob metadata.

Name string

The name of the storage blob. Must be unique within the storage container the blob is located.

Parallelism int

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

Size int

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

Source pulumi.AssetOrArchive

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

SourceContent string

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

SourceUri string

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

StorageAccountName string

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

StorageContainerName string

The name of the storage container in which this blob should be created.

Type string

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

Url string

The URL of the blob

accessTier String

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

cacheControl String

Controls the cache control header content of the response when blob is requested .

contentMd5 String

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

contentType String

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

metadata Map<String,String>

A map of custom blob metadata.

name String

The name of the storage blob. Must be unique within the storage container the blob is located.

parallelism Integer

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

size Integer

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

source AssetOrArchive

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

sourceContent String

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

sourceUri String

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

storageAccountName String

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

storageContainerName String

The name of the storage container in which this blob should be created.

type String

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

url String

The URL of the blob

accessTier string

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

cacheControl string

Controls the cache control header content of the response when blob is requested .

contentMd5 string

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

contentType string

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

metadata {[key: string]: string}

A map of custom blob metadata.

name string

The name of the storage blob. Must be unique within the storage container the blob is located.

parallelism number

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

size number

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

source pulumi.asset.Asset | pulumi.asset.Archive

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

sourceContent string

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

sourceUri string

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

storageAccountName string

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

storageContainerName string

The name of the storage container in which this blob should be created.

type string

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

url string

The URL of the blob

access_tier str

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

cache_control str

Controls the cache control header content of the response when blob is requested .

content_md5 str

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

content_type str

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

metadata Mapping[str, str]

A map of custom blob metadata.

name str

The name of the storage blob. Must be unique within the storage container the blob is located.

parallelism int

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

size int

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

source Union[pulumi.Asset, pulumi.Archive]

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

source_content str

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

source_uri str

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

storage_account_name str

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

storage_container_name str

The name of the storage container in which this blob should be created.

type str

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

url str

The URL of the blob

accessTier String

The access tier of the storage blob. Possible values are Archive, Cool and Hot.

cacheControl String

Controls the cache control header content of the response when blob is requested .

contentMd5 String

The MD5 sum of the blob contents. Cannot be defined if source_uri is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.

contentType String

The content type of the storage blob. Cannot be defined if source_uri is defined. Defaults to application/octet-stream.

metadata Map<String>

A map of custom blob metadata.

name String

The name of the storage blob. Must be unique within the storage container the blob is located.

parallelism Number

The number of workers per CPU core to run for concurrent uploads. Defaults to 8.

size Number

Used only for page blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to 0.

source Asset

An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if source_content or source_uri is specified.

sourceContent String

The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if source or source_uri is specified.

sourceUri String

The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if source or source_content is specified.

storageAccountName String

Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.

storageContainerName String

The name of the storage container in which this blob should be created.

type String

The type of the storage blob to be created. Possible values are Append, Block or Page. Changing this forces a new resource to be created.

url String

The URL of the blob

Import

Storage Blob’s can be imported using the resource id, e.g.

 $ pulumi import azure:storage/blob:Blob blob1 https://example.blob.core.windows.net/container/blob.vhd

Package Details

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

This Pulumi package is based on the azurerm Terraform Provider.