Blob

class Blob : KotlinCustomResource

Manages a Blob within a Storage Container.

Example Usage

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

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

Properties

Link copied to clipboard
val accessTier: Output<String>

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

Link copied to clipboard
val cacheControl: Output<String>?

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

Link copied to clipboard
val contentMd5: Output<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.

Link copied to clipboard
val contentType: Output<String>?

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val metadata: Output<Map<String, String>>

A map of custom blob metadata.

Link copied to clipboard
val name: Output<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.

Link copied to clipboard
val parallelism: Output<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.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val size: Output<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. Changing this forces a new resource to be created.

Link copied to clipboard
val source: Output<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. Changing this forces a new resource to be created.

Link copied to clipboard
val sourceContent: Output<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. Changing this forces a new resource to be created.

Link copied to clipboard
val sourceUri: Output<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.

Link copied to clipboard

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.

Link copied to clipboard

The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val type: Output<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.

Link copied to clipboard
val url: Output<String>

The URL of the blob

Link copied to clipboard
val urn: Output<String>