This page documents the language specification for the openstack package. If you're looking for help working with the inputs, outputs, or functions of openstack resources in a Pulumi program, please see the resource documentation for examples and API reference.
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-openstack repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-openstack repo.
- class
pulumi_openstack.objectstorage.Container(resource_name, opts=None, container_read=None, container_sync_key=None, container_sync_to=None, container_write=None, content_type=None, force_destroy=None, metadata=None, name=None, region=None, versioning=None, __props__=None, __name__=None, __opts__=None)¶ Manages a V1 container resource within OpenStack.
import pulumi import pulumi_openstack as openstack container1 = openstack.objectstorage.Container("container1", content_type="application/json", metadata={ "test": "true", }, region="RegionOne", versioning={ "location": "tf-test-container-versions", "type": "versions", })
import pulumi import pulumi_openstack as openstack container1 = openstack.objectstorage.Container("container1", container_read=".r:*", region="RegionOne")
import pulumi import pulumi_openstack as openstack container1 = openstack.objectstorage.Container("container1", container_read=".r:*,.rlistings", region="RegionOne")
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")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
container_read (pulumi.Input[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 (pulumi.Input[str]) – The secret key for container synchronization. Changing this updates container synchronization.
container_sync_to (pulumi.Input[str]) – The destination for container synchronization. Changing this updates container synchronization.
container_write (pulumi.Input[str]) – Sets an ACL that grants write access. Changing this updates the access control list write access.
content_type (pulumi.Input[str]) – The MIME type for the container. Changing this updates the MIME type.
force_destroy (pulumi.Input[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 (pulumi.Input[dict]) – Custom key/value pairs to associate with the container. Changing this updates the existing container metadata.
name (pulumi.Input[str]) – A unique name for the container. Changing this creates a new container.
region (pulumi.Input[str]) – The region in which to create the container. If omitted, the
regionargument of the provider is used. Changing this creates a new container.versioning (pulumi.Input[dict]) – Enable object versioning. The structure is described below.
The versioning object supports the following:
location(pulumi.Input[str]) - Container in which versions will be stored.type(pulumi.Input[str]) - Versioning type which can beversionsorhistoryaccording to Openstack documentation.
container_read: pulumi.Output[str] = None¶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: pulumi.Output[str] = None¶The secret key for container synchronization. Changing this updates container synchronization.
container_sync_to: pulumi.Output[str] = None¶The destination for container synchronization. Changing this updates container synchronization.
container_write: pulumi.Output[str] = None¶Sets an ACL that grants write access. Changing this updates the access control list write access.
content_type: pulumi.Output[str] = None¶The MIME type for the container. Changing this updates the MIME type.
force_destroy: pulumi.Output[bool] = None¶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: pulumi.Output[dict] = None¶Custom key/value pairs to associate with the container. Changing this updates the existing container metadata.
name: pulumi.Output[str] = None¶A unique name for the container. Changing this creates a new container.
region: pulumi.Output[str] = None¶The region in which to create the container. If omitted, the
regionargument of the provider is used. Changing this creates a new container.
versioning: pulumi.Output[dict] = None¶Enable object versioning. The structure is described below.
location(str) - Container in which versions will be stored.type(str) - Versioning type which can beversionsorhistoryaccording to Openstack documentation.
- static
get(resource_name, id, opts=None, container_read=None, container_sync_key=None, container_sync_to=None, container_write=None, content_type=None, force_destroy=None, metadata=None, name=None, region=None, versioning=None)¶ Get an existing Container resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
container_read (pulumi.Input[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 (pulumi.Input[str]) – The secret key for container synchronization. Changing this updates container synchronization.
container_sync_to (pulumi.Input[str]) – The destination for container synchronization. Changing this updates container synchronization.
container_write (pulumi.Input[str]) – Sets an ACL that grants write access. Changing this updates the access control list write access.
content_type (pulumi.Input[str]) – The MIME type for the container. Changing this updates the MIME type.
force_destroy (pulumi.Input[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 (pulumi.Input[dict]) – Custom key/value pairs to associate with the container. Changing this updates the existing container metadata.
name (pulumi.Input[str]) – A unique name for the container. Changing this creates a new container.
region (pulumi.Input[str]) – The region in which to create the container. If omitted, the
regionargument of the provider is used. Changing this creates a new container.versioning (pulumi.Input[dict]) – Enable object versioning. The structure is described below.
The versioning object supports the following:
location(pulumi.Input[str]) - Container in which versions will be stored.type(pulumi.Input[str]) - Versioning type which can beversionsorhistoryaccording to Openstack documentation.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_openstack.objectstorage.ContainerObject(resource_name, opts=None, container_name=None, content=None, content_disposition=None, content_encoding=None, content_type=None, copy_from=None, delete_after=None, delete_at=None, detect_content_type=None, etag=None, metadata=None, name=None, object_manifest=None, region=None, source=None, __props__=None, __name__=None, __opts__=None)¶ Manages a V1 container object resource within OpenStack.
import pulumi import pulumi_openstack as openstack container1 = openstack.objectstorage.Container("container1", content_type="application/json", metadata={ "test": "true", }, region="RegionOne") doc1 = openstack.objectstorage.ContainerObject("doc1", container_name=container1.name, content=""" { "foo" : "bar" } """, content_type="application/json", metadata={ "test": "true", }, region="RegionOne")
import pulumi import pulumi_openstack as openstack container1 = openstack.objectstorage.Container("container1", content_type="application/json", metadata={ "test": "true", }, region="RegionOne") doc1 = openstack.objectstorage.ContainerObject("doc1", container_name=container1.name, content_type="application/json", metadata={ "test": "true", }, region="RegionOne", source="./default.json")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
container_name (pulumi.Input[str]) – 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.
content (pulumi.Input[str]) – A string representing the content of the object. Conflicts with
sourceandcopy_from.content_disposition (pulumi.Input[str]) – 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.
content_encoding (pulumi.Input[str]) – A string representing the value of the Content-Encoding metadata.
content_type (pulumi.Input[str]) – A string which sets the MIME type for the object.
copy_from (pulumi.Input[str]) – A string representing the name of an object used to create the new object by copying the
copy_fromobject. 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 withsourceandcontent.delete_after (pulumi.Input[float]) – 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.
delete_at (pulumi.Input[str]) – 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.
detect_content_type (pulumi.Input[bool]) – 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.
etag (pulumi.Input[str]) – Used to trigger updates. The only meaningful value is ${md5(file(“path/to/file”))}.
name (pulumi.Input[str]) – A unique name for the object.
object_manifest (pulumi.Input[str]) – 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.
region (pulumi.Input[str]) – The region in which to create the container. If omitted, the
regionargument of the provider is used. Changing this creates a new container.source (pulumi.Input[str]) – A string representing the local path of a file which will be used as the object’s content. Conflicts with
sourceandcopy_from.
container_name: pulumi.Output[str] = None¶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.
content: pulumi.Output[str] = None¶A string representing the content of the object. Conflicts with
sourceandcopy_from.
content_disposition: pulumi.Output[str] = None¶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.
content_encoding: pulumi.Output[str] = None¶A string representing the value of the Content-Encoding metadata.
content_length: pulumi.Output[float] = None¶If the operation succeeds, this value is zero (0) or the length of informational or error text in the response body.
content_type: pulumi.Output[str] = None¶A string which sets the MIME type for the object.
copy_from: pulumi.Output[str] = None¶A string representing the name of an object used to create the new object by copying the
copy_fromobject. 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 withsourceandcontent.
date: pulumi.Output[str] = None¶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.
delete_after: pulumi.Output[float] = None¶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.
delete_at: pulumi.Output[str] = None¶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.
detect_content_type: pulumi.Output[bool] = None¶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.
etag: pulumi.Output[str] = None¶Used to trigger updates. The only meaningful value is ${md5(file(“path/to/file”))}.
last_modified: pulumi.Output[str] = None¶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.
name: pulumi.Output[str] = None¶A unique name for the object.
object_manifest: pulumi.Output[str] = None¶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.
region: pulumi.Output[str] = None¶The region in which to create the container. If omitted, the
regionargument of the provider is used. Changing this creates a new container.
source: pulumi.Output[str] = None¶A string representing the local path of a file which will be used as the object’s content. Conflicts with
sourceandcopy_from.
trans_id: pulumi.Output[str] = None¶A unique transaction ID for this request. Your service provider might need this value if you report a problem.
- static
get(resource_name, id, opts=None, container_name=None, content=None, content_disposition=None, content_encoding=None, content_length=None, content_type=None, copy_from=None, date=None, delete_after=None, delete_at=None, detect_content_type=None, etag=None, last_modified=None, metadata=None, name=None, object_manifest=None, region=None, source=None, trans_id=None)¶ Get an existing ContainerObject resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
container_name (pulumi.Input[str]) – 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.
content (pulumi.Input[str]) – A string representing the content of the object. Conflicts with
sourceandcopy_from.content_disposition (pulumi.Input[str]) – 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.
content_encoding (pulumi.Input[str]) – A string representing the value of the Content-Encoding metadata.
content_length (pulumi.Input[float]) – If the operation succeeds, this value is zero (0) or the length of informational or error text in the response body.
content_type (pulumi.Input[str]) – A string which sets the MIME type for the object.
copy_from (pulumi.Input[str]) – A string representing the name of an object used to create the new object by copying the
copy_fromobject. 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 withsourceandcontent.date (pulumi.Input[str]) – 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.
delete_after (pulumi.Input[float]) – 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.
delete_at (pulumi.Input[str]) – 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.
detect_content_type (pulumi.Input[bool]) – 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.
etag (pulumi.Input[str]) – Used to trigger updates. The only meaningful value is ${md5(file(“path/to/file”))}.
last_modified (pulumi.Input[str]) – 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.
name (pulumi.Input[str]) – A unique name for the object.
object_manifest (pulumi.Input[str]) – 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.
region (pulumi.Input[str]) – The region in which to create the container. If omitted, the
regionargument of the provider is used. Changing this creates a new container.source (pulumi.Input[str]) – A string representing the local path of a file which will be used as the object’s content. Conflicts with
sourceandcopy_from.trans_id (pulumi.Input[str]) – A unique transaction ID for this request. Your service provider might need this value if you report a problem.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_openstack.objectstorage.TempUrl(resource_name, opts=None, container=None, method=None, object=None, regenerate=None, region=None, split=None, ttl=None, __props__=None, __name__=None, __opts__=None)¶ Use 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
regenerateargument totrue. This will create a new resource with a new ID and URL.import pulumi import pulumi_openstack as openstack container1 = openstack.objectstorage.Container("container1", metadata={ "Temp-URL-Key": "testkey", }) object1 = openstack.objectstorage.ContainerObject("object1", container_name=container1.name, content="Hello, world!") obj_tempurl = openstack.objectstorage.TempUrl("objTempurl", container=container1.name, method="post", object=object1.name, ttl=20)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
container (pulumi.Input[str]) – The container name the object belongs to.
method (pulumi.Input[str]) – The method allowed when accessing this URL. Valid values are
GET, andPOST. Default isGET.object (pulumi.Input[str]) – The object name the tempurl is for.
regenerate (pulumi.Input[bool]) – 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.
region (pulumi.Input[str]) – The region the tempurl is located in.
ttl (pulumi.Input[float]) – The TTL, in seconds, for the URL. For how long it should be valid.
container: pulumi.Output[str] = None¶The container name the object belongs to.
method: pulumi.Output[str] = None¶The method allowed when accessing this URL. Valid values are
GET, andPOST. Default isGET.
object: pulumi.Output[str] = None¶The object name the tempurl is for.
regenerate: pulumi.Output[bool] = None¶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.
region: pulumi.Output[str] = None¶The region the tempurl is located in.
ttl: pulumi.Output[float] = None¶The TTL, in seconds, for the URL. For how long it should be valid.
url: pulumi.Output[str] = None¶The URL
- static
get(resource_name, id, opts=None, container=None, method=None, object=None, regenerate=None, region=None, split=None, ttl=None, url=None)¶ Get an existing TempUrl resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
container (pulumi.Input[str]) – The container name the object belongs to.
method (pulumi.Input[str]) – The method allowed when accessing this URL. Valid values are
GET, andPOST. Default isGET.object (pulumi.Input[str]) – The object name the tempurl is for.
regenerate (pulumi.Input[bool]) – 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.
region (pulumi.Input[str]) – The region the tempurl is located in.
ttl (pulumi.Input[float]) – The TTL, in seconds, for the URL. For how long it should be valid.
url (pulumi.Input[str]) – The URL
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str