Show / Hide Table of Contents

Class Container

Manages a V1 container resource within OpenStack.

Example Usage

Basic Container

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var container1 = new OpenStack.ObjectStorage.Container("container1", new OpenStack.ObjectStorage.ContainerArgs
    {
        ContentType = "application/json",
        Metadata = 
        {
            { "test", "true" },
        },
        Region = "RegionOne",
        Versioning = new OpenStack.ObjectStorage.Inputs.ContainerVersioningArgs
        {
            Location = "tf-test-container-versions",
            Type = "versions",
        },
    });
}

}

Global Read Access

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var container1 = new OpenStack.ObjectStorage.Container("container1", new OpenStack.ObjectStorage.ContainerArgs
    {
        ContainerRead = ".r:*",
        Region = "RegionOne",
    });
}

}

Global Read and List Access

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var container1 = new OpenStack.ObjectStorage.Container("container1", new OpenStack.ObjectStorage.ContainerArgs
    {
        ContainerRead = ".r:*,.rlistings",
        Region = "RegionOne",
    });
}

}

Write-Only Access for a User

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var current = Output.Create(OpenStack.Identity.GetAuthScope.InvokeAsync(new OpenStack.Identity.GetAuthScopeArgs
    {
        Name = "current",
    }));
    var container1 = new OpenStack.ObjectStorage.Container("container1", new OpenStack.ObjectStorage.ContainerArgs
    {
        ContainerRead = $".r:-{@var.Username}",
        ContainerWrite = current.Apply(current => $"{current.ProjectId}:{@var.Username}"),
        Region = "RegionOne",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Container
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.ObjectStorage
Assembly: Pulumi.OpenStack.dll
Syntax
public class Container : CustomResource

Constructors

View Source

Container(String, ContainerArgs, CustomResourceOptions)

Create a Container resource with the given unique name, arguments, and options.

Declaration
public Container(string name, ContainerArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ContainerArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ContainerRead

Sets an access control list (ACL) that grants read access. This header can contain a comma-delimited list of users that can read the container (allows the GET method for all objects in the container). Changing this updates the access control list read access.

Declaration
public Output<string> ContainerRead { get; }
Property Value
Type Description
Output<System.String>
View Source

ContainerSyncKey

The secret key for container synchronization. Changing this updates container synchronization.

Declaration
public Output<string> ContainerSyncKey { get; }
Property Value
Type Description
Output<System.String>
View Source

ContainerSyncTo

The destination for container synchronization. Changing this updates container synchronization.

Declaration
public Output<string> ContainerSyncTo { get; }
Property Value
Type Description
Output<System.String>
View Source

ContainerWrite

Sets an ACL that grants write access. Changing this updates the access control list write access.

Declaration
public Output<string> ContainerWrite { get; }
Property Value
Type Description
Output<System.String>
View Source

ContentType

The MIME type for the container. Changing this updates the MIME type.

Declaration
public Output<string> ContentType { get; }
Property Value
Type Description
Output<System.String>
View Source

ForceDestroy

A boolean that indicates all objects should be deleted from the container so that the container can be destroyed without error. These objects are not recoverable.

Declaration
public Output<bool?> ForceDestroy { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Metadata

Custom key/value pairs to associate with the container. Changing this updates the existing container metadata.

Declaration
public Output<ImmutableDictionary<string, object>> Metadata { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Name

A unique name for the container. Changing this creates a new container.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

The region in which to create the container. If omitted, the region argument of the provider is used. Changing this creates a new container.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

Versioning

Enable object versioning. The structure is described below.

Declaration
public Output<ContainerVersioning> Versioning { get; }
Property Value
Type Description
Output<ContainerVersioning>

Methods

View Source

Get(String, Input<String>, ContainerState, CustomResourceOptions)

Get an existing Container resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Container Get(string name, Input<string> id, ContainerState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ContainerState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Container
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.