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",
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

container1 = openstack.objectstorage.Container("container1",
    content_type="application/json",
    metadata={
        "test": "true",
    },
    region="RegionOne",
    versioning={
        "location": "tf-test-container-versions",
        "type": "versions",
    })
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const container1 = new openstack.objectstorage.Container("container_1", {
    contentType: "application/json",
    metadata: {
        test: "true",
    },
    region: "RegionOne",
    versioning: {
        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",
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

container1 = openstack.objectstorage.Container("container1",
    container_read=".r:*",
    region="RegionOne")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const container1 = new openstack.objectstorage.Container("container_1", {
    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",
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

container1 = openstack.objectstorage.Container("container1",
    container_read=".r:*,.rlistings",
    region="RegionOne")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const container1 = new openstack.objectstorage.Container("container_1", {
    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",
        });
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

current = openstack.identity.get_auth_scope(name="current")
container1 = openstack.objectstorage.Container("container1",
    container_read=f".r:-{var['username']}",
    container_write=f"{current.project_id}:{var['username']}",
    region="RegionOne")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const current = pulumi.output(openstack.identity.getAuthScope({
    name: "current",
}, { async: true }));
const container1 = new openstack.objectstorage.Container("container_1", {
    containerRead: `.r:-${var_username}`,
    containerWrite: pulumi.interpolate`${current.projectId}:${var_username}`,
    region: "RegionOne",
});

Create a Container Resource

def Container(resource_name, opts=None, container_read=None, container_sync_key=None, container_sync_to=None, container_write=None, content_type=None, force_destroy=None, metadata=None, name=None, region=None, versioning=None, __props__=None);
func NewContainer(ctx *Context, name string, args *ContainerArgs, opts ...ResourceOption) (*Container, error)
public Container(string name, ContainerArgs? args = null, 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:

ContainerRead string

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.

ContainerSyncKey string

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

ContainerSyncTo string

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

ContainerWrite string

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

ContentType string

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

ForceDestroy bool

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.

Metadata Dictionary<string, object>

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

Name string

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

Region string

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

Versioning Pulumi.OpenStack.ObjectStorage.Inputs.ContainerVersioningArgs

Enable object versioning. The structure is described below.

ContainerRead string

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.

ContainerSyncKey string

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

ContainerSyncTo string

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

ContainerWrite string

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

ContentType string

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

ForceDestroy bool

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.

Metadata map[string]interface{}

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

Name string

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

Region string

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

Versioning ContainerVersioning

Enable object versioning. The structure is described below.

containerRead string

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.

containerSyncKey string

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

containerSyncTo string

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

containerWrite string

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

contentType string

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

forceDestroy boolean

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.

metadata {[key: string]: any}

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

name string

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

region string

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

versioning ContainerVersioning

Enable object versioning. The structure is described below.

container_read str

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.

container_sync_key str

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

container_sync_to str

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

container_write str

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

content_type str

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

force_destroy bool

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.

metadata Dict[str, Any]

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

name str

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

region str

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

versioning Dict[ContainerVersioning]

Enable object versioning. The structure is described below.

Outputs

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

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

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_read=None, container_sync_key=None, container_sync_to=None, container_write=None, content_type=None, force_destroy=None, metadata=None, name=None, region=None, versioning=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:

ContainerRead string

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.

ContainerSyncKey string

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

ContainerSyncTo string

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

ContainerWrite string

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

ContentType string

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

ForceDestroy bool

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.

Metadata Dictionary<string, object>

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

Name string

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

Region string

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

Versioning Pulumi.OpenStack.ObjectStorage.Inputs.ContainerVersioningArgs

Enable object versioning. The structure is described below.

ContainerRead string

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.

ContainerSyncKey string

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

ContainerSyncTo string

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

ContainerWrite string

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

ContentType string

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

ForceDestroy bool

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.

Metadata map[string]interface{}

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

Name string

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

Region string

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

Versioning ContainerVersioning

Enable object versioning. The structure is described below.

containerRead string

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.

containerSyncKey string

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

containerSyncTo string

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

containerWrite string

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

contentType string

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

forceDestroy boolean

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.

metadata {[key: string]: any}

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

name string

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

region string

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

versioning ContainerVersioning

Enable object versioning. The structure is described below.

container_read str

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.

container_sync_key str

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

container_sync_to str

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

container_write str

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

content_type str

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

force_destroy bool

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.

metadata Dict[str, Any]

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

name str

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

region str

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

versioning Dict[ContainerVersioning]

Enable object versioning. The structure is described below.

Supporting Types

ContainerVersioning

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Location string

Container in which versions will be stored.

Type string

Versioning type which can be versions or history according to Openstack documentation.

Location string

Container in which versions will be stored.

Type string

Versioning type which can be versions or history according to Openstack documentation.

location string

Container in which versions will be stored.

type string

Versioning type which can be versions or history according to Openstack documentation.

location str

Container in which versions will be stored.

type str

Versioning type which can be versions or history according to Openstack documentation.

Package Details

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