openstack.objectstorage.Container
Explore with Pulumi AI
Manages a V1 container resource within OpenStack.
Example Usage
Basic Container
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const container1 = new openstack.objectstorage.Container("container_1", {
region: "RegionOne",
name: "tf-test-container-1",
metadata: {
test: "true",
},
contentType: "application/json",
versioning: true,
});
import pulumi
import pulumi_openstack as openstack
container1 = openstack.objectstorage.Container("container_1",
region="RegionOne",
name="tf-test-container-1",
metadata={
"test": "true",
},
content_type="application/json",
versioning=True)
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/objectstorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := objectstorage.NewContainer(ctx, "container_1", &objectstorage.ContainerArgs{
Region: pulumi.String("RegionOne"),
Name: pulumi.String("tf-test-container-1"),
Metadata: pulumi.StringMap{
"test": pulumi.String("true"),
},
ContentType: pulumi.String("application/json"),
Versioning: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var container1 = new OpenStack.ObjectStorage.Container("container_1", new()
{
Region = "RegionOne",
Name = "tf-test-container-1",
Metadata =
{
{ "test", "true" },
},
ContentType = "application/json",
Versioning = true,
});
});
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()
.region("RegionOne")
.name("tf-test-container-1")
.metadata(Map.of("test", "true"))
.contentType("application/json")
.versioning(true)
.build());
}
}
resources:
container1:
type: openstack:objectstorage:Container
name: container_1
properties:
region: RegionOne
name: tf-test-container-1
metadata:
test: 'true'
contentType: application/json
versioning: true
Basic Container with legacy versioning
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const container1 = new openstack.objectstorage.Container("container_1", {
region: "RegionOne",
name: "tf-test-container-1",
metadata: {
test: "true",
},
contentType: "application/json",
versioningLegacy: {
type: "versions",
location: "tf-test-container-versions",
},
});
import pulumi
import pulumi_openstack as openstack
container1 = openstack.objectstorage.Container("container_1",
region="RegionOne",
name="tf-test-container-1",
metadata={
"test": "true",
},
content_type="application/json",
versioning_legacy={
"type": "versions",
"location": "tf-test-container-versions",
})
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/objectstorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := objectstorage.NewContainer(ctx, "container_1", &objectstorage.ContainerArgs{
Region: pulumi.String("RegionOne"),
Name: pulumi.String("tf-test-container-1"),
Metadata: pulumi.StringMap{
"test": pulumi.String("true"),
},
ContentType: pulumi.String("application/json"),
VersioningLegacy: &objectstorage.ContainerVersioningLegacyArgs{
Type: pulumi.String("versions"),
Location: pulumi.String("tf-test-container-versions"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var container1 = new OpenStack.ObjectStorage.Container("container_1", new()
{
Region = "RegionOne",
Name = "tf-test-container-1",
Metadata =
{
{ "test", "true" },
},
ContentType = "application/json",
VersioningLegacy = new OpenStack.ObjectStorage.Inputs.ContainerVersioningLegacyArgs
{
Type = "versions",
Location = "tf-test-container-versions",
},
});
});
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()
.region("RegionOne")
.name("tf-test-container-1")
.metadata(Map.of("test", "true"))
.contentType("application/json")
.versioningLegacy(ContainerVersioningLegacyArgs.builder()
.type("versions")
.location("tf-test-container-versions")
.build())
.build());
}
}
resources:
container1:
type: openstack:objectstorage:Container
name: container_1
properties:
region: RegionOne
name: tf-test-container-1
metadata:
test: 'true'
contentType: application/json
versioningLegacy:
type: versions
location: tf-test-container-versions
Global Read Access
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
// Requires that a user know the object name they are attempting to download
const container1 = new openstack.objectstorage.Container("container_1", {
region: "RegionOne",
name: "tf-test-container-1",
containerRead: ".r:*",
});
import pulumi
import pulumi_openstack as openstack
# Requires that a user know the object name they are attempting to download
container1 = openstack.objectstorage.Container("container_1",
region="RegionOne",
name="tf-test-container-1",
container_read=".r:*")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/objectstorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Requires that a user know the object name they are attempting to download
_, err := objectstorage.NewContainer(ctx, "container_1", &objectstorage.ContainerArgs{
Region: pulumi.String("RegionOne"),
Name: pulumi.String("tf-test-container-1"),
ContainerRead: pulumi.String(".r:*"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
// Requires that a user know the object name they are attempting to download
var container1 = new OpenStack.ObjectStorage.Container("container_1", new()
{
Region = "RegionOne",
Name = "tf-test-container-1",
ContainerRead = ".r:*",
});
});
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) {
// Requires that a user know the object name they are attempting to download
var container1 = new Container("container1", ContainerArgs.builder()
.region("RegionOne")
.name("tf-test-container-1")
.containerRead(".r:*")
.build());
}
}
resources:
# Requires that a user know the object name they are attempting to download
container1:
type: openstack:objectstorage:Container
name: container_1
properties:
region: RegionOne
name: tf-test-container-1
containerRead: .r:*
Global Read and List Access
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
// Any user can read any object, and list all objects in the container
const container1 = new openstack.objectstorage.Container("container_1", {
region: "RegionOne",
name: "tf-test-container-1",
containerRead: ".r:*,.rlistings",
});
import pulumi
import pulumi_openstack as openstack
# Any user can read any object, and list all objects in the container
container1 = openstack.objectstorage.Container("container_1",
region="RegionOne",
name="tf-test-container-1",
container_read=".r:*,.rlistings")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/objectstorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Any user can read any object, and list all objects in the container
_, err := objectstorage.NewContainer(ctx, "container_1", &objectstorage.ContainerArgs{
Region: pulumi.String("RegionOne"),
Name: pulumi.String("tf-test-container-1"),
ContainerRead: pulumi.String(".r:*,.rlistings"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
// Any user can read any object, and list all objects in the container
var container1 = new OpenStack.ObjectStorage.Container("container_1", new()
{
Region = "RegionOne",
Name = "tf-test-container-1",
ContainerRead = ".r:*,.rlistings",
});
});
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) {
// Any user can read any object, and list all objects in the container
var container1 = new Container("container1", ContainerArgs.builder()
.region("RegionOne")
.name("tf-test-container-1")
.containerRead(".r:*,.rlistings")
.build());
}
}
resources:
# Any user can read any object, and list all objects in the container
container1:
type: openstack:objectstorage:Container
name: container_1
properties:
region: RegionOne
name: tf-test-container-1
containerRead: .r:*,.rlistings
Write-Only Access for a User
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const current = openstack.identity.getAuthScope({
name: "current",
});
// The named user can only upload objects, not read objects or list the container
const container1 = new openstack.objectstorage.Container("container_1", {
region: "RegionOne",
name: "tf-test-container-1",
containerRead: `.r:-${username}`,
containerWrite: current.then(current => `${current.projectId}:${username}`),
});
import pulumi
import pulumi_openstack as openstack
current = openstack.identity.get_auth_scope(name="current")
# The named user can only upload objects, not read objects or list the container
container1 = openstack.objectstorage.Container("container_1",
region="RegionOne",
name="tf-test-container-1",
container_read=f".r:-{username}",
container_write=f"{current.project_id}:{username}")
package main
import (
"fmt"
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/identity"
"github.com/pulumi/pulumi-openstack/sdk/v4/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
}
// The named user can only upload objects, not read objects or list the container
_, err = objectstorage.NewContainer(ctx, "container_1", &objectstorage.ContainerArgs{
Region: pulumi.String("RegionOne"),
Name: pulumi.String("tf-test-container-1"),
ContainerRead: pulumi.Sprintf(".r:-%v", username),
ContainerWrite: pulumi.Sprintf("%v:%v", current.ProjectId, username),
})
if err != nil {
return err
}
return nil
})
}
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",
});
// The named user can only upload objects, not read objects or list the container
var container1 = new OpenStack.ObjectStorage.Container("container_1", new()
{
Region = "RegionOne",
Name = "tf-test-container-1",
ContainerRead = $".r:-{username}",
ContainerWrite = $"{current.Apply(getAuthScopeResult => getAuthScopeResult.ProjectId)}:{username}",
});
});
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());
// The named user can only upload objects, not read objects or list the container
var container1 = new Container("container1", ContainerArgs.builder()
.region("RegionOne")
.name("tf-test-container-1")
.containerRead(String.format(".r:-%s", username))
.containerWrite(String.format("%s:%s", current.applyValue(getAuthScopeResult -> getAuthScopeResult.projectId()),username))
.build());
}
}
resources:
# The named user can only upload objects, not read objects or list the container
container1:
type: openstack:objectstorage:Container
name: container_1
properties:
region: RegionOne
name: tf-test-container-1
containerRead: .r:-${username}
containerWrite: ${current.projectId}:${username}
variables:
current:
fn::invoke:
Function: openstack:identity:getAuthScope
Arguments:
name: current
Create Container Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Container(name: string, args?: ContainerArgs, opts?: CustomResourceOptions);
@overload
def Container(resource_name: str,
args: Optional[ContainerArgs] = None,
opts: Optional[ResourceOptions] = None)
@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, str]] = None,
name: Optional[str] = None,
region: Optional[str] = None,
storage_policy: Optional[str] = None,
versioning: Optional[bool] = None,
versioning_legacy: Optional[ContainerVersioningLegacyArgs] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var containerResource = new OpenStack.ObjectStorage.Container("containerResource", new()
{
ContainerRead = "string",
ContainerSyncKey = "string",
ContainerSyncTo = "string",
ContainerWrite = "string",
ContentType = "string",
ForceDestroy = false,
Metadata =
{
{ "string", "string" },
},
Name = "string",
Region = "string",
StoragePolicy = "string",
Versioning = false,
});
example, err := objectstorage.NewContainer(ctx, "containerResource", &objectstorage.ContainerArgs{
ContainerRead: pulumi.String("string"),
ContainerSyncKey: pulumi.String("string"),
ContainerSyncTo: pulumi.String("string"),
ContainerWrite: pulumi.String("string"),
ContentType: pulumi.String("string"),
ForceDestroy: pulumi.Bool(false),
Metadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Region: pulumi.String("string"),
StoragePolicy: pulumi.String("string"),
Versioning: pulumi.Bool(false),
})
var containerResource = new Container("containerResource", ContainerArgs.builder()
.containerRead("string")
.containerSyncKey("string")
.containerSyncTo("string")
.containerWrite("string")
.contentType("string")
.forceDestroy(false)
.metadata(Map.of("string", "string"))
.name("string")
.region("string")
.storagePolicy("string")
.versioning(false)
.build());
container_resource = openstack.objectstorage.Container("containerResource",
container_read="string",
container_sync_key="string",
container_sync_to="string",
container_write="string",
content_type="string",
force_destroy=False,
metadata={
"string": "string",
},
name="string",
region="string",
storage_policy="string",
versioning=False)
const containerResource = new openstack.objectstorage.Container("containerResource", {
containerRead: "string",
containerSyncKey: "string",
containerSyncTo: "string",
containerWrite: "string",
contentType: "string",
forceDestroy: false,
metadata: {
string: "string",
},
name: "string",
region: "string",
storagePolicy: "string",
versioning: false,
});
type: openstack:objectstorage:Container
properties:
containerRead: string
containerSyncKey: string
containerSyncTo: string
containerWrite: string
contentType: string
forceDestroy: false
metadata:
string: string
name: string
region: string
storagePolicy: string
versioning: false
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:
- Container
Read 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.
- Container
Sync stringKey - The secret key for container synchronization. Changing this updates container synchronization.
- Container
Sync stringTo - The destination for container synchronization. Changing this updates container synchronization.
- Container
Write string - Sets an ACL that grants write access. Changing this updates the access control list write access.
- Content
Type string - 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 Dictionary<string, string>
- 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. - Storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - Versioning
Legacy Pulumi.Open Stack. Object Storage. Inputs. Container Versioning Legacy - Enable legacy object versioning. The structure is described below.
- Container
Read 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.
- Container
Sync stringKey - The secret key for container synchronization. Changing this updates container synchronization.
- Container
Sync stringTo - The destination for container synchronization. Changing this updates container synchronization.
- Container
Write string - Sets an ACL that grants write access. Changing this updates the access control list write access.
- Content
Type string - 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 map[string]string
- 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. - Storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - Versioning
Legacy ContainerVersioning Legacy Args - Enable legacy object versioning. The structure is described below.
- container
Read 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.
- container
Sync StringKey - The secret key for container synchronization. Changing this updates container synchronization.
- container
Sync StringTo - The destination for container synchronization. Changing this updates container synchronization.
- container
Write String - Sets an ACL that grants write access. Changing this updates the access control list write access.
- content
Type String - The MIME type for the container. Changing this updates the MIME type.
- force
Destroy 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,String>
- 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. - storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - versioning
Legacy ContainerVersioning Legacy - Enable legacy object versioning. The structure is described below.
- container
Read 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.
- container
Sync stringKey - The secret key for container synchronization. Changing this updates container synchronization.
- container
Sync stringTo - The destination for container synchronization. Changing this updates container synchronization.
- container
Write string - Sets an ACL that grants write access. Changing this updates the access control list write access.
- content
Type string - The MIME type for the container. Changing this updates the MIME type.
- force
Destroy 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]: string}
- 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. - storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - versioning
Legacy ContainerVersioning Legacy - Enable legacy 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_ strkey - The secret key for container synchronization. Changing this updates container synchronization.
- container_
sync_ strto - 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, str]
- 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - versioning_
legacy ContainerVersioning Legacy Args - Enable legacy object versioning. The structure is described below.
- container
Read 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.
- container
Sync StringKey - The secret key for container synchronization. Changing this updates container synchronization.
- container
Sync StringTo - The destination for container synchronization. Changing this updates container synchronization.
- container
Write String - Sets an ACL that grants write access. Changing this updates the access control list write access.
- content
Type String - The MIME type for the container. Changing this updates the MIME type.
- force
Destroy 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>
- 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. - storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - versioning
Legacy Property Map - Enable legacy 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 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, str]] = 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.
- Container
Read 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.
- Container
Sync stringKey - The secret key for container synchronization. Changing this updates container synchronization.
- Container
Sync stringTo - The destination for container synchronization. Changing this updates container synchronization.
- Container
Write string - Sets an ACL that grants write access. Changing this updates the access control list write access.
- Content
Type string - 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 Dictionary<string, string>
- 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. - Storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - Versioning
Legacy Pulumi.Open Stack. Object Storage. Inputs. Container Versioning Legacy - Enable legacy object versioning. The structure is described below.
- Container
Read 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.
- Container
Sync stringKey - The secret key for container synchronization. Changing this updates container synchronization.
- Container
Sync stringTo - The destination for container synchronization. Changing this updates container synchronization.
- Container
Write string - Sets an ACL that grants write access. Changing this updates the access control list write access.
- Content
Type string - 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 map[string]string
- 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. - Storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - Versioning
Legacy ContainerVersioning Legacy Args - Enable legacy object versioning. The structure is described below.
- container
Read 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.
- container
Sync StringKey - The secret key for container synchronization. Changing this updates container synchronization.
- container
Sync StringTo - The destination for container synchronization. Changing this updates container synchronization.
- container
Write String - Sets an ACL that grants write access. Changing this updates the access control list write access.
- content
Type String - The MIME type for the container. Changing this updates the MIME type.
- force
Destroy 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,String>
- 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. - storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - versioning
Legacy ContainerVersioning Legacy - Enable legacy object versioning. The structure is described below.
- container
Read 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.
- container
Sync stringKey - The secret key for container synchronization. Changing this updates container synchronization.
- container
Sync stringTo - The destination for container synchronization. Changing this updates container synchronization.
- container
Write string - Sets an ACL that grants write access. Changing this updates the access control list write access.
- content
Type string - The MIME type for the container. Changing this updates the MIME type.
- force
Destroy 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]: string}
- 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. - storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - versioning
Legacy ContainerVersioning Legacy - Enable legacy 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_ strkey - The secret key for container synchronization. Changing this updates container synchronization.
- container_
sync_ strto - 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, str]
- 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - versioning_
legacy ContainerVersioning Legacy Args - Enable legacy object versioning. The structure is described below.
- container
Read 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.
- container
Sync StringKey - The secret key for container synchronization. Changing this updates container synchronization.
- container
Sync StringTo - The destination for container synchronization. Changing this updates container synchronization.
- container
Write String - Sets an ACL that grants write access. Changing this updates the access control list write access.
- content
Type String - The MIME type for the container. Changing this updates the MIME type.
- force
Destroy 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>
- 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. - storage
Policy 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 theallow_object_versioning = true
configuration option in Swift. If you cannot set this versioning type, you may want to consider usingversioning_legacy
instead. - versioning
Legacy Property Map - Enable legacy object versioning. The structure is described below.
Supporting Types
ContainerVersioningLegacy, ContainerVersioningLegacyArgs
- Location string
- Container in which versions will be stored.
- Type string
- Versioning type which can be
versions
orhistory
according to Openstack documentation.
- Location string
- Container in which versions will be stored.
- Type string
- Versioning type which can be
versions
orhistory
according to Openstack documentation.
- location String
- Container in which versions will be stored.
- type String
- Versioning type which can be
versions
orhistory
according to Openstack documentation.
- location string
- Container in which versions will be stored.
- type string
- Versioning type which can be
versions
orhistory
according to Openstack documentation.
- location str
- Container in which versions will be stored.
- type str
- Versioning type which can be
versions
orhistory
according to Openstack documentation.
- location String
- Container in which versions will be stored.
- type String
- Versioning type which can be
versions
orhistory
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.