BlobArgs

data class BlobArgs(val accessTier: Output<String>? = null, val cacheControl: Output<String>? = null, val contentMd5: Output<String>? = null, val contentType: Output<String>? = null, val metadata: Output<Map<String, String>>? = null, val name: Output<String>? = null, val parallelism: Output<Int>? = null, val size: Output<Int>? = null, val source: Output<AssetOrArchive>? = null, val sourceContent: Output<String>? = null, val sourceUri: Output<String>? = null, val storageAccountName: Output<String>? = null, val storageContainerName: Output<String>? = null, val type: Output<String>? = null) : ConvertibleToJava<BlobArgs>

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

Constructors

Link copied to clipboard
fun BlobArgs(accessTier: Output<String>? = null, cacheControl: Output<String>? = null, contentMd5: Output<String>? = null, contentType: Output<String>? = null, metadata: Output<Map<String, String>>? = null, name: Output<String>? = null, parallelism: Output<Int>? = null, size: Output<Int>? = null, source: Output<AssetOrArchive>? = null, sourceContent: Output<String>? = null, sourceUri: Output<String>? = null, storageAccountName: Output<String>? = null, storageContainerName: Output<String>? = null, type: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): BlobArgs

Properties

Link copied to clipboard
val accessTier: Output<String>? = null

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

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

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

Link copied to clipboard
val contentMd5: Output<String>? = null

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>? = null

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 metadata: Output<Map<String, String>>? = null

A map of custom blob metadata.

Link copied to clipboard
val name: Output<String>? = null

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>? = null

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 size: Output<Int>? = null

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>? = null

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>? = null

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>? = null

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
val storageAccountName: Output<String>? = null

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
val storageContainerName: Output<String>? = null

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>? = null

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.