We recommend using Azure Native.
azure.storage.Blob
Explore with Pulumi AI
Manages a Blob within a Storage Container.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleContainer = new Azure.Storage.Container("exampleContainer", new()
{
StorageAccountName = exampleAccount.Name,
ContainerAccessType = "private",
});
var exampleBlob = new Azure.Storage.Blob("exampleBlob", new()
{
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 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)
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:
- Storage
Account stringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- Storage
Container stringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- Type string
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- Access
Tier string The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- Cache
Control string Controls the cache control header content of the response when blob is requested .
- Content
Md5 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.- Content
Type string The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- Parallelism int
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- Source
Asset
Or 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
orsource_uri
is specified. Changing this forces a new resource to be created.- Source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- Source
Uri 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
orsource_content
is specified.
- Storage
Account stringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- Storage
Container stringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- Type string
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- Access
Tier string The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- Cache
Control string Controls the cache control header content of the response when blob is requested .
- Content
Md5 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.- Content
Type string The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- Parallelism int
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- Source
pulumi.
Asset Or 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
orsource_uri
is specified. Changing this forces a new resource to be created.- Source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- Source
Uri 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
orsource_content
is specified.
- storage
Account StringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- storage
Container StringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- type String
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- access
Tier String The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- cache
Control String Controls the cache control header content of the response when blob is requested .
- content
Md5 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.- content
Type String The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- parallelism Integer
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- source
Asset
Or 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Uri 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
orsource_content
is specified.
- storage
Account stringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- storage
Container stringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- type string
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- access
Tier string The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- cache
Control string Controls the cache control header content of the response when blob is requested .
- content
Md5 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.- content
Type string The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- parallelism number
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Uri 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
orsource_content
is specified.
- storage_
account_ strname Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- storage_
container_ strname The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- type str
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- access_
tier str The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- 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 toapplication/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. Changing this forces a new resource to be created.
- parallelism int
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- 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
orsource_uri
is specified. Changing this forces a new resource to be created.- 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
orsource_uri
is specified. Changing this forces a new resource to be created.- 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
orsource_content
is specified.
- storage
Account StringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- storage
Container StringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- type String
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- access
Tier String The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- cache
Control String Controls the cache control header content of the response when blob is requested .
- content
Md5 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.- content
Type String The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- parallelism Number
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Uri 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
orsource_content
is specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the Blob resource produces the following output properties:
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>, 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.
- Access
Tier string The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- Cache
Control string Controls the cache control header content of the response when blob is requested .
- Content
Md5 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.- Content
Type string The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- Parallelism int
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- Source
Asset
Or 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
orsource_uri
is specified. Changing this forces a new resource to be created.- Source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- Source
Uri 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
orsource_content
is specified.- Storage
Account stringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- Storage
Container stringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- Type string
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- Url string
The URL of the blob
- Access
Tier string The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- Cache
Control string Controls the cache control header content of the response when blob is requested .
- Content
Md5 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.- Content
Type string The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- Parallelism int
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- Source
pulumi.
Asset Or 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
orsource_uri
is specified. Changing this forces a new resource to be created.- Source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- Source
Uri 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
orsource_content
is specified.- Storage
Account stringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- Storage
Container stringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- Type string
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- Url string
The URL of the blob
- access
Tier String The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- cache
Control String Controls the cache control header content of the response when blob is requested .
- content
Md5 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.- content
Type String The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- parallelism Integer
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- source
Asset
Or 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Uri 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
orsource_content
is specified.- storage
Account StringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- storage
Container StringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- type String
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- url String
The URL of the blob
- access
Tier string The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- cache
Control string Controls the cache control header content of the response when blob is requested .
- content
Md5 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.- content
Type string The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- parallelism number
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Uri 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
orsource_content
is specified.- storage
Account stringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- storage
Container stringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- type string
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. 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
andHot
.- 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 toapplication/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. Changing this forces a new resource to be created.
- parallelism int
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- 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
orsource_uri
is specified. Changing this forces a new resource to be created.- 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
orsource_uri
is specified. Changing this forces a new resource to be created.- 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
orsource_content
is specified.- storage_
account_ strname Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- storage_
container_ strname The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- type str
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. Changing this forces a new resource to be created.- url str
The URL of the blob
- access
Tier String The access tier of the storage blob. Possible values are
Archive
,Cool
andHot
.- cache
Control String Controls the cache control header content of the response when blob is requested .
- content
Md5 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.- content
Type String The content type of the storage blob. Cannot be defined if
source_uri
is defined. Defaults toapplication/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. Changing this forces a new resource to be created.
- parallelism Number
The number of workers per CPU core to run for concurrent uploads. Defaults to
8
. Changing this forces a new resource to be created.- 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 to0
. Changing this forces a new resource to be created.- 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Content 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
orsource_uri
is specified. Changing this forces a new resource to be created.- source
Uri 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
orsource_content
is specified.- storage
Account StringName Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created. Changing this forces a new resource to be created.
- storage
Container StringName The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
- type String
The type of the storage blob to be created. Possible values are
Append
,Block
orPage
. 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
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.