Module objectstorage
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-openstackrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-openstackrepo.
Resources
Others
Resources
Resource Container
class Container extends CustomResourceManages 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("container1", {
contentType: "application/json",
metadata: {
test: "true",
},
region: "RegionOne",
versioning: {
location: "tf-test-container-versions",
type: "versions",
},
});Global Read Access
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const container1 = new openstack.objectstorage.Container("container1", {
containerRead: ".r:*",
region: "RegionOne",
});Global Read and List Access
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const container1 = new openstack.objectstorage.Container("container1", {
containerRead: ".r:*,.rlistings",
region: "RegionOne",
});Write-Only Access for a User
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const current = pulumi.output(openstack.identity.getAuthScope({
name: "current",
}, { async: true }));
const container1 = new openstack.objectstorage.Container("container1", {
containerRead: `.r:-${var_username}`,
containerWrite: pulumi.interpolate`${current.projectId}:${var_username}`,
region: "RegionOne",
});constructor
new Container(name: string, args?: ContainerArgs, opts?: pulumi.CustomResourceOptions)Create a Container resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ContainerState, opts?: pulumi.CustomResourceOptions): ContainerGet an existing Container resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ContainerReturns true if the given object is an instance of Container. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property containerRead
public containerRead: pulumi.Output<string | undefined>;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.
property containerSyncKey
public containerSyncKey: pulumi.Output<string | undefined>;The secret key for container synchronization. Changing this updates container synchronization.
property containerSyncTo
public containerSyncTo: pulumi.Output<string | undefined>;The destination for container synchronization. Changing this updates container synchronization.
property containerWrite
public containerWrite: pulumi.Output<string | undefined>;Sets an ACL that grants write access. Changing this updates the access control list write access.
property contentType
public contentType: pulumi.Output<string | undefined>;The MIME type for the container. Changing this updates the MIME type.
property forceDestroy
public forceDestroy: pulumi.Output<boolean | undefined>;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.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property metadata
public metadata: pulumi.Output<{[key: string]: any} | undefined>;Custom key/value pairs to associate with the container. Changing this updates the existing container metadata.
property name
public name: pulumi.Output<string>;A unique name for the container. Changing this creates a new container.
property region
public region: pulumi.Output<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.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property versioning
public versioning: pulumi.Output<ContainerVersioning | undefined>;Enable object versioning. The structure is described below.
Resource ContainerObject
class ContainerObject extends CustomResourceManages a V1 container object resource within OpenStack.
Example Usage
Example with simple content
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",
});
const doc1 = new openstack.objectstorage.ContainerObject("doc1", {
containerName: container1.name,
content: ` {
"foo" : "bar"
}
`,
contentType: "application/json",
metadata: {
test: "true",
},
region: "RegionOne",
});Example with content from file
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",
});
const doc1 = new openstack.objectstorage.ContainerObject("doc1", {
containerName: container1.name,
contentType: "application/json",
metadata: {
test: "true",
},
region: "RegionOne",
source: "./default.json",
});constructor
new ContainerObject(name: string, args: ContainerObjectArgs, opts?: pulumi.CustomResourceOptions)Create a ContainerObject resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ContainerObjectState, opts?: pulumi.CustomResourceOptions): ContainerObjectGet an existing ContainerObject resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ContainerObjectReturns true if the given object is an instance of ContainerObject. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property containerName
public containerName: pulumi.Output<string>;A unique (within an account) name for the container. The container name must be from 1 to 256 characters long and can start with any character and contain any pattern. Character set must be UTF-8. The container name cannot contain a slash (/) character because this character delimits the container and object name. For example, the path /v1/account/www/pages specifies the www container, not the www/pages container.
property content
public content: pulumi.Output<string | undefined>;A string representing the content of the object. Conflicts with
source and copyFrom.
property contentDisposition
public contentDisposition: pulumi.Output<string>;A string which specifies the override behavior for the browser. For example, this header might specify that the browser use a download program to save this file rather than show the file, which is the default.
property contentEncoding
public contentEncoding: pulumi.Output<string>;A string representing the value of the Content-Encoding metadata.
property contentLength
public contentLength: pulumi.Output<number>;If the operation succeeds, this value is zero (0) or the length of informational or error text in the response body.
property contentType
public contentType: pulumi.Output<string>;A string which sets the MIME type for the object.
property copyFrom
public copyFrom: pulumi.Output<string | undefined>;A string representing the name of an object
used to create the new object by copying the copyFrom object. The value is in form
{container}/{object}. You must UTF-8-encode and then URL-encode the names of the
container and object before you include them in the header. Conflicts with source and
content.
property date
public date: pulumi.Output<string>;The date and time the system responded to the request, using the preferred format of RFC 7231 as shown in this example Thu, 16 Jun 2016 15:10:38 GMT. The time is always in UTC.
property deleteAfter
public deleteAfter: pulumi.Output<number | undefined>;An integer representing the number of seconds after which the system removes the object. Internally, the Object Storage system stores this value in the X-Delete-At metadata item.
property deleteAt
public deleteAt: pulumi.Output<string>;An string representing the date when the system removes the object. For example, “2015-08-26” is equivalent to Mon, Wed, 26 Aug 2015 00:00:00 GMT.
property detectContentType
public detectContentType: pulumi.Output<boolean | undefined>;If set to true, Object Storage guesses the content type based on the file extension and ignores the value sent in the Content-Type header, if present.
property etag
public etag: pulumi.Output<string>;Used to trigger updates. The only meaningful value is ${md5(file(“path/to/file”))}.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property lastModified
public lastModified: pulumi.Output<string>;The date and time when the object was last modified. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.
property metadata
public metadata: pulumi.Output<{[key: string]: any} | undefined>;property name
public name: pulumi.Output<string>;A unique name for the object.
property objectManifest
public objectManifest: pulumi.Output<string>;A string set to specify that this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the form container/prefix. You must UTF-8-encode and then URL-encode the names of the container and prefix before you include them in this header.
property region
public region: pulumi.Output<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.
property source
public source: pulumi.Output<string | undefined>;A string representing the local path of a file which will be used
as the object’s content. Conflicts with source and copyFrom.
property transId
public transId: pulumi.Output<string>;A unique transaction ID for this request. Your service provider might need this value if you report a problem.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource TempUrl
class TempUrl extends CustomResourceUse this resource to generate an OpenStack Object Storage temporary URL.
The temporary URL will be valid for as long as TTL is set to (in seconds).
Once the URL has expired, it will no longer be valid, but the resource
will remain in place. If you wish to automatically regenerate a URL, set
the regenerate argument to true. This will create a new resource with
a new ID and URL.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const container1 = new openstack.objectstorage.Container("container1", {
metadata: {
"Temp-URL-Key": "testkey",
},
});
const object1 = new openstack.objectstorage.ContainerObject("object1", {
containerName: container1.name,
content: "Hello, world!",
});
const objTempurl = new openstack.objectstorage.TempUrl("objTempurl", {
container: container1.name,
method: "post",
object: object1.name,
ttl: 20,
});constructor
new TempUrl(name: string, args: TempUrlArgs, opts?: pulumi.CustomResourceOptions)Create a TempUrl resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TempUrlState, opts?: pulumi.CustomResourceOptions): TempUrlGet an existing TempUrl resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is TempUrlReturns true if the given object is an instance of TempUrl. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property container
public container: pulumi.Output<string>;The container name the object belongs to.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property method
public method: pulumi.Output<string | undefined>;The method allowed when accessing this URL.
Valid values are GET, and POST. Default is GET.
property object
public object: pulumi.Output<string>;The object name the tempurl is for.
property regenerate
public regenerate: pulumi.Output<boolean | undefined>;Whether to automatically regenerate the URL when it has expired. If set to true, this will create a new resource with a new ID and new URL. Defaults to false.
property region
public region: pulumi.Output<string>;The region the tempurl is located in.
property split
public split: pulumi.Output<string | undefined>;property ttl
public ttl: pulumi.Output<number>;The TTL, in seconds, for the URL. For how long it should be valid.
property url
public url: pulumi.Output<string>;The URL
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Others
interface ContainerArgs
interface ContainerArgsThe set of arguments for constructing a Container resource.
property containerRead
containerRead?: pulumi.Input<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.
property containerSyncKey
containerSyncKey?: pulumi.Input<string>;The secret key for container synchronization. Changing this updates container synchronization.
property containerSyncTo
containerSyncTo?: pulumi.Input<string>;The destination for container synchronization. Changing this updates container synchronization.
property containerWrite
containerWrite?: pulumi.Input<string>;Sets an ACL that grants write access. Changing this updates the access control list write access.
property contentType
contentType?: pulumi.Input<string>;The MIME type for the container. Changing this updates the MIME type.
property forceDestroy
forceDestroy?: pulumi.Input<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.
property metadata
metadata?: pulumi.Input<{[key: string]: any}>;Custom key/value pairs to associate with the container. Changing this updates the existing container metadata.
property name
name?: pulumi.Input<string>;A unique name for the container. Changing this creates a new container.
property region
region?: pulumi.Input<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.
property versioning
versioning?: pulumi.Input<ContainerVersioning>;Enable object versioning. The structure is described below.
interface ContainerObjectArgs
interface ContainerObjectArgsThe set of arguments for constructing a ContainerObject resource.
property containerName
containerName: pulumi.Input<string>;A unique (within an account) name for the container. The container name must be from 1 to 256 characters long and can start with any character and contain any pattern. Character set must be UTF-8. The container name cannot contain a slash (/) character because this character delimits the container and object name. For example, the path /v1/account/www/pages specifies the www container, not the www/pages container.
property content
content?: pulumi.Input<string>;A string representing the content of the object. Conflicts with
source and copyFrom.
property contentDisposition
contentDisposition?: pulumi.Input<string>;A string which specifies the override behavior for the browser. For example, this header might specify that the browser use a download program to save this file rather than show the file, which is the default.
property contentEncoding
contentEncoding?: pulumi.Input<string>;A string representing the value of the Content-Encoding metadata.
property contentType
contentType?: pulumi.Input<string>;A string which sets the MIME type for the object.
property copyFrom
copyFrom?: pulumi.Input<string>;A string representing the name of an object
used to create the new object by copying the copyFrom object. The value is in form
{container}/{object}. You must UTF-8-encode and then URL-encode the names of the
container and object before you include them in the header. Conflicts with source and
content.
property deleteAfter
deleteAfter?: pulumi.Input<number>;An integer representing the number of seconds after which the system removes the object. Internally, the Object Storage system stores this value in the X-Delete-At metadata item.
property deleteAt
deleteAt?: pulumi.Input<string>;An string representing the date when the system removes the object. For example, “2015-08-26” is equivalent to Mon, Wed, 26 Aug 2015 00:00:00 GMT.
property detectContentType
detectContentType?: pulumi.Input<boolean>;If set to true, Object Storage guesses the content type based on the file extension and ignores the value sent in the Content-Type header, if present.
property etag
etag?: pulumi.Input<string>;Used to trigger updates. The only meaningful value is ${md5(file(“path/to/file”))}.
property metadata
metadata?: pulumi.Input<{[key: string]: any}>;property name
name?: pulumi.Input<string>;A unique name for the object.
property objectManifest
objectManifest?: pulumi.Input<string>;A string set to specify that this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the form container/prefix. You must UTF-8-encode and then URL-encode the names of the container and prefix before you include them in this header.
property region
region?: pulumi.Input<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.
property source
source?: pulumi.Input<string>;A string representing the local path of a file which will be used
as the object’s content. Conflicts with source and copyFrom.
interface ContainerObjectState
interface ContainerObjectStateInput properties used for looking up and filtering ContainerObject resources.
property containerName
containerName?: pulumi.Input<string>;A unique (within an account) name for the container. The container name must be from 1 to 256 characters long and can start with any character and contain any pattern. Character set must be UTF-8. The container name cannot contain a slash (/) character because this character delimits the container and object name. For example, the path /v1/account/www/pages specifies the www container, not the www/pages container.
property content
content?: pulumi.Input<string>;A string representing the content of the object. Conflicts with
source and copyFrom.
property contentDisposition
contentDisposition?: pulumi.Input<string>;A string which specifies the override behavior for the browser. For example, this header might specify that the browser use a download program to save this file rather than show the file, which is the default.
property contentEncoding
contentEncoding?: pulumi.Input<string>;A string representing the value of the Content-Encoding metadata.
property contentLength
contentLength?: pulumi.Input<number>;If the operation succeeds, this value is zero (0) or the length of informational or error text in the response body.
property contentType
contentType?: pulumi.Input<string>;A string which sets the MIME type for the object.
property copyFrom
copyFrom?: pulumi.Input<string>;A string representing the name of an object
used to create the new object by copying the copyFrom object. The value is in form
{container}/{object}. You must UTF-8-encode and then URL-encode the names of the
container and object before you include them in the header. Conflicts with source and
content.
property date
date?: pulumi.Input<string>;The date and time the system responded to the request, using the preferred format of RFC 7231 as shown in this example Thu, 16 Jun 2016 15:10:38 GMT. The time is always in UTC.
property deleteAfter
deleteAfter?: pulumi.Input<number>;An integer representing the number of seconds after which the system removes the object. Internally, the Object Storage system stores this value in the X-Delete-At metadata item.
property deleteAt
deleteAt?: pulumi.Input<string>;An string representing the date when the system removes the object. For example, “2015-08-26” is equivalent to Mon, Wed, 26 Aug 2015 00:00:00 GMT.
property detectContentType
detectContentType?: pulumi.Input<boolean>;If set to true, Object Storage guesses the content type based on the file extension and ignores the value sent in the Content-Type header, if present.
property etag
etag?: pulumi.Input<string>;Used to trigger updates. The only meaningful value is ${md5(file(“path/to/file”))}.
property lastModified
lastModified?: pulumi.Input<string>;The date and time when the object was last modified. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm For example, 2015-08-27T09:49:58-05:00. The ±hh:mm value, if included, is the time zone as an offset from UTC. In the previous example, the offset value is -05:00.
property metadata
metadata?: pulumi.Input<{[key: string]: any}>;property name
name?: pulumi.Input<string>;A unique name for the object.
property objectManifest
objectManifest?: pulumi.Input<string>;A string set to specify that this is a dynamic large object manifest object. The value is the container and object name prefix of the segment objects in the form container/prefix. You must UTF-8-encode and then URL-encode the names of the container and prefix before you include them in this header.
property region
region?: pulumi.Input<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.
property source
source?: pulumi.Input<string>;A string representing the local path of a file which will be used
as the object’s content. Conflicts with source and copyFrom.
property transId
transId?: pulumi.Input<string>;A unique transaction ID for this request. Your service provider might need this value if you report a problem.
interface ContainerState
interface ContainerStateInput properties used for looking up and filtering Container resources.
property containerRead
containerRead?: pulumi.Input<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.
property containerSyncKey
containerSyncKey?: pulumi.Input<string>;The secret key for container synchronization. Changing this updates container synchronization.
property containerSyncTo
containerSyncTo?: pulumi.Input<string>;The destination for container synchronization. Changing this updates container synchronization.
property containerWrite
containerWrite?: pulumi.Input<string>;Sets an ACL that grants write access. Changing this updates the access control list write access.
property contentType
contentType?: pulumi.Input<string>;The MIME type for the container. Changing this updates the MIME type.
property forceDestroy
forceDestroy?: pulumi.Input<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.
property metadata
metadata?: pulumi.Input<{[key: string]: any}>;Custom key/value pairs to associate with the container. Changing this updates the existing container metadata.
property name
name?: pulumi.Input<string>;A unique name for the container. Changing this creates a new container.
property region
region?: pulumi.Input<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.
property versioning
versioning?: pulumi.Input<ContainerVersioning>;Enable object versioning. The structure is described below.
interface TempUrlArgs
interface TempUrlArgsThe set of arguments for constructing a TempUrl resource.
property container
container: pulumi.Input<string>;The container name the object belongs to.
property method
method?: pulumi.Input<string>;The method allowed when accessing this URL.
Valid values are GET, and POST. Default is GET.
property object
object: pulumi.Input<string>;The object name the tempurl is for.
property regenerate
regenerate?: pulumi.Input<boolean>;Whether to automatically regenerate the URL when it has expired. If set to true, this will create a new resource with a new ID and new URL. Defaults to false.
property region
region?: pulumi.Input<string>;The region the tempurl is located in.
property split
split?: pulumi.Input<string>;property ttl
ttl: pulumi.Input<number>;The TTL, in seconds, for the URL. For how long it should be valid.
interface TempUrlState
interface TempUrlStateInput properties used for looking up and filtering TempUrl resources.
property container
container?: pulumi.Input<string>;The container name the object belongs to.
property method
method?: pulumi.Input<string>;The method allowed when accessing this URL.
Valid values are GET, and POST. Default is GET.
property object
object?: pulumi.Input<string>;The object name the tempurl is for.
property regenerate
regenerate?: pulumi.Input<boolean>;Whether to automatically regenerate the URL when it has expired. If set to true, this will create a new resource with a new ID and new URL. Defaults to false.
property region
region?: pulumi.Input<string>;The region the tempurl is located in.
property split
split?: pulumi.Input<string>;property ttl
ttl?: pulumi.Input<number>;The TTL, in seconds, for the URL. For how long it should be valid.
property url
url?: pulumi.Input<string>;The URL