1. Packages
  2. OpenStack
  3. API Docs
  4. objectstorage
  5. Container
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

openstack.objectstorage.Container

Explore with Pulumi AI

openstack logo
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

    Manages a V1 container resource within OpenStack.

    Example Usage

    Basic Container

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var container1 = new OpenStack.ObjectStorage.Container("container1", new()
        {
            ContentType = "application/json",
            Metadata = 
            {
                { "test", "true" },
            },
            Region = "RegionOne",
            Versioning = true,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/objectstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := objectstorage.NewContainer(ctx, "container1", &objectstorage.ContainerArgs{
    			ContentType: pulumi.String("application/json"),
    			Metadata: pulumi.Map{
    				"test": pulumi.Any("true"),
    			},
    			Region:     pulumi.String("RegionOne"),
    			Versioning: pulumi.Bool(true),
    		})
    		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.openstack.objectstorage.Container;
    import com.pulumi.openstack.objectstorage.ContainerArgs;
    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 container1 = new Container("container1", ContainerArgs.builder()        
                .contentType("application/json")
                .metadata(Map.of("test", "true"))
                .region("RegionOne")
                .versioning(true)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    container1 = openstack.objectstorage.Container("container1",
        content_type="application/json",
        metadata={
            "test": "true",
        },
        region="RegionOne",
        versioning=True)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const container1 = new openstack.objectstorage.Container("container1", {
        contentType: "application/json",
        metadata: {
            test: "true",
        },
        region: "RegionOne",
        versioning: true,
    });
    
    resources:
      container1:
        type: openstack:objectstorage:Container
        properties:
          contentType: application/json
          metadata:
            test: 'true'
          region: RegionOne
          versioning: true
    

    Basic Container with legacy versioning

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var container1 = new OpenStack.ObjectStorage.Container("container1", new()
        {
            ContentType = "application/json",
            Metadata = 
            {
                { "test", "true" },
            },
            Region = "RegionOne",
            VersioningLegacy = new OpenStack.ObjectStorage.Inputs.ContainerVersioningLegacyArgs
            {
                Location = "tf-test-container-versions",
                Type = "versions",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/objectstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := objectstorage.NewContainer(ctx, "container1", &objectstorage.ContainerArgs{
    			ContentType: pulumi.String("application/json"),
    			Metadata: pulumi.Map{
    				"test": pulumi.Any("true"),
    			},
    			Region: pulumi.String("RegionOne"),
    			VersioningLegacy: &objectstorage.ContainerVersioningLegacyArgs{
    				Location: pulumi.String("tf-test-container-versions"),
    				Type:     pulumi.String("versions"),
    			},
    		})
    		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.openstack.objectstorage.Container;
    import com.pulumi.openstack.objectstorage.ContainerArgs;
    import com.pulumi.openstack.objectstorage.inputs.ContainerVersioningLegacyArgs;
    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 container1 = new Container("container1", ContainerArgs.builder()        
                .contentType("application/json")
                .metadata(Map.of("test", "true"))
                .region("RegionOne")
                .versioningLegacy(ContainerVersioningLegacyArgs.builder()
                    .location("tf-test-container-versions")
                    .type("versions")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    container1 = openstack.objectstorage.Container("container1",
        content_type="application/json",
        metadata={
            "test": "true",
        },
        region="RegionOne",
        versioning_legacy=openstack.objectstorage.ContainerVersioningLegacyArgs(
            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("container1", {
        contentType: "application/json",
        metadata: {
            test: "true",
        },
        region: "RegionOne",
        versioningLegacy: {
            location: "tf-test-container-versions",
            type: "versions",
        },
    });
    
    resources:
      container1:
        type: openstack:objectstorage:Container
        properties:
          contentType: application/json
          metadata:
            test: 'true'
          region: RegionOne
          versioningLegacy:
            location: tf-test-container-versions
            type: versions
    

    Global Read Access

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var container1 = new OpenStack.ObjectStorage.Container("container1", new()
        {
            ContainerRead = ".r:*",
            Region = "RegionOne",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/objectstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := objectstorage.NewContainer(ctx, "container1", &objectstorage.ContainerArgs{
    			ContainerRead: pulumi.String(".r:*"),
    			Region:        pulumi.String("RegionOne"),
    		})
    		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.openstack.objectstorage.Container;
    import com.pulumi.openstack.objectstorage.ContainerArgs;
    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 container1 = new Container("container1", ContainerArgs.builder()        
                .containerRead(".r:*")
                .region("RegionOne")
                .build());
    
        }
    }
    
    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("container1", {
        containerRead: ".r:*",
        region: "RegionOne",
    });
    
    resources:
      container1:
        type: openstack:objectstorage:Container
        properties:
          containerRead: .r:*
          region: RegionOne
    

    Global Read and List Access

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var container1 = new OpenStack.ObjectStorage.Container("container1", new()
        {
            ContainerRead = ".r:*,.rlistings",
            Region = "RegionOne",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/objectstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := objectstorage.NewContainer(ctx, "container1", &objectstorage.ContainerArgs{
    			ContainerRead: pulumi.String(".r:*,.rlistings"),
    			Region:        pulumi.String("RegionOne"),
    		})
    		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.openstack.objectstorage.Container;
    import com.pulumi.openstack.objectstorage.ContainerArgs;
    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 container1 = new Container("container1", ContainerArgs.builder()        
                .containerRead(".r:*,.rlistings")
                .region("RegionOne")
                .build());
    
        }
    }
    
    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("container1", {
        containerRead: ".r:*,.rlistings",
        region: "RegionOne",
    });
    
    resources:
      container1:
        type: openstack:objectstorage:Container
        properties:
          containerRead: .r:*,.rlistings
          region: RegionOne
    

    Write-Only Access for a User

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var current = OpenStack.Identity.GetAuthScope.Invoke(new()
        {
            Name = "current",
        });
    
        var container1 = new OpenStack.ObjectStorage.Container("container1", new()
        {
            ContainerRead = $".r:-{@var.Username}",
            ContainerWrite = $"{current.Apply(getAuthScopeResult => getAuthScopeResult.ProjectId)}:{@var.Username}",
            Region = "RegionOne",
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/identity"
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/objectstorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := identity.GetAuthScope(ctx, &identity.GetAuthScopeArgs{
    			Name: "current",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = objectstorage.NewContainer(ctx, "container1", &objectstorage.ContainerArgs{
    			ContainerRead:  pulumi.String(fmt.Sprintf(".r:-%v", _var.Username)),
    			ContainerWrite: pulumi.String(fmt.Sprintf("%v:%v", current.ProjectId, _var.Username)),
    			Region:         pulumi.String("RegionOne"),
    		})
    		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.openstack.identity.IdentityFunctions;
    import com.pulumi.openstack.identity.inputs.GetAuthScopeArgs;
    import com.pulumi.openstack.objectstorage.Container;
    import com.pulumi.openstack.objectstorage.ContainerArgs;
    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) {
            final var current = IdentityFunctions.getAuthScope(GetAuthScopeArgs.builder()
                .name("current")
                .build());
    
            var container1 = new Container("container1", ContainerArgs.builder()        
                .containerRead(String.format(".r:-%s", var_.username()))
                .containerWrite(String.format("%s:%s", current.applyValue(getAuthScopeResult -> getAuthScopeResult.projectId()),var_.username()))
                .region("RegionOne")
                .build());
    
        }
    }
    
    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 = openstack.identity.getAuthScope({
        name: "current",
    });
    const container1 = new openstack.objectstorage.Container("container1", {
        containerRead: `.r:-${_var.username}`,
        containerWrite: current.then(current => `${current.projectId}:${_var.username}`),
        region: "RegionOne",
    });
    
    resources:
      container1:
        type: openstack:objectstorage:Container
        properties:
          containerRead: .r:-${var.username}
          containerWrite: ${current.projectId}:${var.username}
          region: RegionOne
    variables:
      current:
        fn::invoke:
          Function: openstack:identity:getAuthScope
          Arguments:
            name: current
    

    Create Container Resource

    new Container(name: string, args?: ContainerArgs, opts?: CustomResourceOptions);
    @overload
    def Container(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  container_read: Optional[str] = None,
                  container_sync_key: Optional[str] = None,
                  container_sync_to: Optional[str] = None,
                  container_write: Optional[str] = None,
                  content_type: Optional[str] = None,
                  force_destroy: Optional[bool] = None,
                  metadata: Optional[Mapping[str, Any]] = None,
                  name: Optional[str] = None,
                  region: Optional[str] = None,
                  storage_policy: Optional[str] = None,
                  versioning: Optional[bool] = None,
                  versioning_legacy: Optional[ContainerVersioningLegacyArgs] = None)
    @overload
    def Container(resource_name: str,
                  args: Optional[ContainerArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    func NewContainer(ctx *Context, name string, args *ContainerArgs, opts ...ResourceOption) (*Container, error)
    public Container(string name, ContainerArgs? args = null, CustomResourceOptions? opts = null)
    public Container(String name, ContainerArgs args)
    public Container(String name, ContainerArgs args, CustomResourceOptions options)
    
    type: openstack:objectstorage:Container
    properties: # The arguments to resource properties.
    options: # 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.
    resource_name str
    The unique name of the resource.
    args ContainerArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control 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.
    name String
    The unique name of the resource.
    args ContainerArgs
    The arguments to resource properties.
    options 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 Architecture and Concepts 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.
    StoragePolicy string
    The storage policy to be used for the container. Changing this creates a new container.
    Versioning bool
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    VersioningLegacy Pulumi.OpenStack.ObjectStorage.Inputs.ContainerVersioningLegacy
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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.
    StoragePolicy string
    The storage policy to be used for the container. Changing this creates a new container.
    Versioning bool
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    VersioningLegacy ContainerVersioningLegacyArgs
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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 Map<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.
    storagePolicy String
    The storage policy to be used for the container. Changing this creates a new container.
    versioning Boolean
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    versioningLegacy ContainerVersioningLegacy
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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.
    storagePolicy string
    The storage policy to be used for the container. Changing this creates a new container.
    versioning boolean
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    versioningLegacy ContainerVersioningLegacy
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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 Mapping[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.
    storage_policy str
    The storage policy to be used for the container. Changing this creates a new container.
    versioning bool
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    versioning_legacy ContainerVersioningLegacyArgs
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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 Map<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.
    storagePolicy String
    The storage policy to be used for the container. Changing this creates a new container.
    versioning Boolean
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    versioningLegacy Property Map
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            container_read: Optional[str] = None,
            container_sync_key: Optional[str] = None,
            container_sync_to: Optional[str] = None,
            container_write: Optional[str] = None,
            content_type: Optional[str] = None,
            force_destroy: Optional[bool] = None,
            metadata: Optional[Mapping[str, Any]] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            storage_policy: Optional[str] = None,
            versioning: Optional[bool] = None,
            versioning_legacy: Optional[ContainerVersioningLegacyArgs] = None) -> Container
    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)
    public static Container get(String name, Output<String> id, ContainerState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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.
    StoragePolicy string
    The storage policy to be used for the container. Changing this creates a new container.
    Versioning bool
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    VersioningLegacy Pulumi.OpenStack.ObjectStorage.Inputs.ContainerVersioningLegacy
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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.
    StoragePolicy string
    The storage policy to be used for the container. Changing this creates a new container.
    Versioning bool
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    VersioningLegacy ContainerVersioningLegacyArgs
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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 Map<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.
    storagePolicy String
    The storage policy to be used for the container. Changing this creates a new container.
    versioning Boolean
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    versioningLegacy ContainerVersioningLegacy
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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.
    storagePolicy string
    The storage policy to be used for the container. Changing this creates a new container.
    versioning boolean
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    versioningLegacy ContainerVersioningLegacy
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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 Mapping[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.
    storage_policy str
    The storage policy to be used for the container. Changing this creates a new container.
    versioning bool
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    versioning_legacy ContainerVersioningLegacyArgs
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    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 Map<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.
    storagePolicy String
    The storage policy to be used for the container. Changing this creates a new container.
    versioning Boolean
    A boolean that can enable or disable object versioning. The default value is false. To use this feature, your Swift version must be 2.24 or higher (as described in the OpenStack Swift Ussuri release notes), and a cloud administrator must have set the allow_object_versioning = true configuration option in Swift. If you cannot set this versioning type, you may want to consider using versioning_legacy instead.
    versioningLegacy Property Map
    Enable legacy object versioning. The structure is described below.

    Deprecated:Use newer "versioning" implementation

    Supporting Types

    ContainerVersioningLegacy, ContainerVersioningLegacyArgs

    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 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.
    location String
    Container in which versions will be stored.
    type String
    Versioning type which can be versions or history according to Openstack documentation.

    Import

    This resource can be imported by specifying the name of the container:

    Some attributes can’t be imported * force_destroy * content_type * metadata * container_sync_to * container_sync_key

    So you’ll have to pulumi preview and pulumi up after the import to fix those missing attributes.

     $ pulumi import openstack:objectstorage/container:Container container_1 container_name
    

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi