Container

Manages a Container within an Azure Storage Account.

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",
            Tags = 
            {
                { "environment", "staging" },
            },
        });
        var exampleContainer = new Azure.Storage.Container("exampleContainer", new Azure.Storage.ContainerArgs
        {
            StorageAccountName = exampleAccount.Name,
            ContainerAccessType = "private",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/storage"
    "github.com/pulumi/pulumi/sdk/v2/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"),
            Tags: pulumi.Map{
                "environment": pulumi.String("staging"),
            },
        })
        if err != nil {
            return err
        }
        _, err = storage.NewContainer(ctx, "exampleContainer", &storage.ContainerArgs{
            StorageAccountName:  exampleAccount.Name,
            ContainerAccessType: pulumi.String("private"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
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",
    tags={
        "environment": "staging",
    })
example_container = azure.storage.Container("exampleContainer",
    storage_account_name=example_account.name,
    container_access_type="private")
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",
    tags: {
        environment: "staging",
    },
});
const exampleContainer = new azure.storage.Container("exampleContainer", {
    storageAccountName: exampleAccount.name,
    containerAccessType: "private",
});

Create a Container Resource

def Container(resource_name, opts=None, container_access_type=None, metadata=None, name=None, storage_account_name=None, __props__=None);
func NewContainer(ctx *Context, name string, args ContainerArgs, opts ...ResourceOption) (*Container, error)
public Container(string name, ContainerArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ContainerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Container Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Container resource accepts the following input properties:

StorageAccountName string

The name of the Storage Account where the Container should be created.

ContainerAccessType string

The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private.

Metadata Dictionary<string, string>

A mapping of MetaData for this Container.

Name string

The name of the Container which should be created within the Storage Account.

StorageAccountName string

The name of the Storage Account where the Container should be created.

ContainerAccessType string

The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private.

Metadata map[string]string

A mapping of MetaData for this Container.

Name string

The name of the Container which should be created within the Storage Account.

storageAccountName string

The name of the Storage Account where the Container should be created.

containerAccessType string

The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private.

metadata {[key: string]: string}

A mapping of MetaData for this Container.

name string

The name of the Container which should be created within the Storage Account.

storage_account_name str

The name of the Storage Account where the Container should be created.

container_access_type str

The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private.

metadata Dict[str, str]

A mapping of MetaData for this Container.

name str

The name of the Container which should be created within the Storage Account.

Outputs

All input properties are implicitly available as output properties. Additionally, the Container resource produces the following output properties:

HasImmutabilityPolicy bool

Is there an Immutability Policy configured on this Storage Container?

HasLegalHold bool

Is there a Legal Hold configured on this Storage Container?

Id string
The provider-assigned unique ID for this managed resource.
ResourceManagerId string

The Resource Manager ID of this Storage Container.

HasImmutabilityPolicy bool

Is there an Immutability Policy configured on this Storage Container?

HasLegalHold bool

Is there a Legal Hold configured on this Storage Container?

Id string
The provider-assigned unique ID for this managed resource.
ResourceManagerId string

The Resource Manager ID of this Storage Container.

hasImmutabilityPolicy boolean

Is there an Immutability Policy configured on this Storage Container?

hasLegalHold boolean

Is there a Legal Hold configured on this Storage Container?

id string
The provider-assigned unique ID for this managed resource.
resourceManagerId string

The Resource Manager ID of this Storage Container.

has_immutability_policy bool

Is there an Immutability Policy configured on this Storage Container?

has_legal_hold bool

Is there a Legal Hold configured on this Storage Container?

id str
The provider-assigned unique ID for this managed resource.
resource_manager_id str

The Resource Manager ID of this Storage Container.

Look up an Existing Container Resource

Get an existing Container 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?: ContainerState, opts?: CustomResourceOptions): Container
static get(resource_name, id, opts=None, container_access_type=None, has_immutability_policy=None, has_legal_hold=None, metadata=None, name=None, resource_manager_id=None, storage_account_name=None, __props__=None);
func GetContainer(ctx *Context, name string, id IDInput, state *ContainerState, opts ...ResourceOption) (*Container, error)
public static Container Get(string name, Input<string> id, ContainerState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

ContainerAccessType string

The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private.

HasImmutabilityPolicy bool

Is there an Immutability Policy configured on this Storage Container?

HasLegalHold bool

Is there a Legal Hold configured on this Storage Container?

Metadata Dictionary<string, string>

A mapping of MetaData for this Container.

Name string

The name of the Container which should be created within the Storage Account.

ResourceManagerId string

The Resource Manager ID of this Storage Container.

StorageAccountName string

The name of the Storage Account where the Container should be created.

ContainerAccessType string

The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private.

HasImmutabilityPolicy bool

Is there an Immutability Policy configured on this Storage Container?

HasLegalHold bool

Is there a Legal Hold configured on this Storage Container?

Metadata map[string]string

A mapping of MetaData for this Container.

Name string

The name of the Container which should be created within the Storage Account.

ResourceManagerId string

The Resource Manager ID of this Storage Container.

StorageAccountName string

The name of the Storage Account where the Container should be created.

containerAccessType string

The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private.

hasImmutabilityPolicy boolean

Is there an Immutability Policy configured on this Storage Container?

hasLegalHold boolean

Is there a Legal Hold configured on this Storage Container?

metadata {[key: string]: string}

A mapping of MetaData for this Container.

name string

The name of the Container which should be created within the Storage Account.

resourceManagerId string

The Resource Manager ID of this Storage Container.

storageAccountName string

The name of the Storage Account where the Container should be created.

container_access_type str

The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private.

has_immutability_policy bool

Is there an Immutability Policy configured on this Storage Container?

has_legal_hold bool

Is there a Legal Hold configured on this Storage Container?

metadata Dict[str, str]

A mapping of MetaData for this Container.

name str

The name of the Container which should be created within the Storage Account.

resource_manager_id str

The Resource Manager ID of this Storage Container.

storage_account_name str

The name of the Storage Account where the Container should be created.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.