BlobContainer

class BlobContainer : KotlinCustomResource

Properties of the blob container, including Id, resource name, resource type, Etag. Uses Azure REST API version 2022-09-01. In version 1.x of the Azure Native provider, it used API version 2021-02-01. Other available API versions: 2023-01-01, 2023-04-01, 2023-05-01, 2024-01-01.

Example Usage

PutContainerWithDefaultEncryptionScope

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var blobContainer = new AzureNative.Storage.BlobContainer("blobContainer", new()
{
AccountName = "sto328",
ContainerName = "container6185",
DefaultEncryptionScope = "encryptionscope185",
DenyEncryptionScopeOverride = true,
ResourceGroupName = "res3376",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewBlobContainer(ctx, "blobContainer", &storage.BlobContainerArgs{
AccountName: pulumi.String("sto328"),
ContainerName: pulumi.String("container6185"),
DefaultEncryptionScope: pulumi.String("encryptionscope185"),
DenyEncryptionScopeOverride: pulumi.Bool(true),
ResourceGroupName: pulumi.String("res3376"),
})
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.azurenative.storage.BlobContainer;
import com.pulumi.azurenative.storage.BlobContainerArgs;
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 blobContainer = new BlobContainer("blobContainer", BlobContainerArgs.builder()
.accountName("sto328")
.containerName("container6185")
.defaultEncryptionScope("encryptionscope185")
.denyEncryptionScopeOverride(true)
.resourceGroupName("res3376")
.build());
}
}

PutContainerWithObjectLevelWorm

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var blobContainer = new AzureNative.Storage.BlobContainer("blobContainer", new()
{
AccountName = "sto328",
ContainerName = "container6185",
ImmutableStorageWithVersioning = new AzureNative.Storage.Inputs.ImmutableStorageWithVersioningArgs
{
Enabled = true,
},
ResourceGroupName = "res3376",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewBlobContainer(ctx, "blobContainer", &storage.BlobContainerArgs{
AccountName: pulumi.String("sto328"),
ContainerName: pulumi.String("container6185"),
ImmutableStorageWithVersioning: &storage.ImmutableStorageWithVersioningArgs{
Enabled: pulumi.Bool(true),
},
ResourceGroupName: pulumi.String("res3376"),
})
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.azurenative.storage.BlobContainer;
import com.pulumi.azurenative.storage.BlobContainerArgs;
import com.pulumi.azurenative.storage.inputs.ImmutableStorageWithVersioningArgs;
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 blobContainer = new BlobContainer("blobContainer", BlobContainerArgs.builder()
.accountName("sto328")
.containerName("container6185")
.immutableStorageWithVersioning(ImmutableStorageWithVersioningArgs.builder()
.enabled(true)
.build())
.resourceGroupName("res3376")
.build());
}
}

PutContainers

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var blobContainer = new AzureNative.Storage.BlobContainer("blobContainer", new()
{
AccountName = "sto328",
ContainerName = "container6185",
ResourceGroupName = "res3376",
});
});
package main
import (
storage "github.com/pulumi/pulumi-azure-native-sdk/storage/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storage.NewBlobContainer(ctx, "blobContainer", &storage.BlobContainerArgs{
AccountName: pulumi.String("sto328"),
ContainerName: pulumi.String("container6185"),
ResourceGroupName: pulumi.String("res3376"),
})
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.azurenative.storage.BlobContainer;
import com.pulumi.azurenative.storage.BlobContainerArgs;
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 blobContainer = new BlobContainer("blobContainer", BlobContainerArgs.builder()
.accountName("sto328")
.containerName("container6185")
.resourceGroupName("res3376")
.build());
}
}

Import

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

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

Properties

Link copied to clipboard

Default the container to use specified encryption scope for all writes.

Link copied to clipboard
val deleted: Output<Boolean>

Indicates whether the blob container was deleted.

Link copied to clipboard
val deletedTime: Output<String>

Blob container deletion time.

Link copied to clipboard

Block override of encryption scope from the container default.

Link copied to clipboard

Enable NFSv3 all squash on blob container.

Link copied to clipboard

Enable NFSv3 root squash on blob container.

Link copied to clipboard
val etag: Output<String>

Resource Etag.

Link copied to clipboard

The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.

Link copied to clipboard
val hasLegalHold: Output<Boolean>

The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The ImmutabilityPolicy property of the container.

Link copied to clipboard

The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.

Link copied to clipboard

Returns the date and time the container was last modified.

Link copied to clipboard
val leaseDuration: Output<String>

Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.

Link copied to clipboard
val leaseState: Output<String>

Lease state of the container.

Link copied to clipboard
val leaseStatus: Output<String>

The lease status of the container.

Link copied to clipboard

The LegalHold property of the container.

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

A name-value pair to associate with the container as metadata.

Link copied to clipboard
val name: Output<String>

The name of the resource

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

Specifies whether data in the container may be accessed publicly and the level of access.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Remaining retention days for soft deleted blob container.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val version: Output<String>

The version of the deleted blob container.