Class ContainerObject
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.objectstorage.ContainerObject
-
public class ContainerObject extends com.pulumi.resources.CustomResourceManages a V1 container object resource within OpenStack. ## Example Usage ### Example with simple content ```java 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.ContainerObject; import com.pulumi.openstack.objectstorage.ContainerObjectArgs; 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") .metadata(Map.of("test", "true")) .contentType("application/json") .build()); var doc1 = new ContainerObject("doc1", ContainerObjectArgs.builder() .region("RegionOne") .containerName(container1.name()) .metadata(Map.of("test", "true")) .contentType("application/json") .content(""" { "foo" : "bar" } """) .build()); } } ``` ### Example with content from file ```java 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.ContainerObject; import com.pulumi.openstack.objectstorage.ContainerObjectArgs; 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") .metadata(Map.of("test", "true")) .contentType("application/json") .build()); var doc1 = new ContainerObject("doc1", ContainerObjectArgs.builder() .region("RegionOne") .containerName(container1.name()) .metadata(Map.of("test", "true")) .contentType("application/json") .source("./default.json") .build()); } } ```
-
-
Constructor Summary
Constructors Constructor Description ContainerObject(java.lang.String name)ContainerObject(java.lang.String name, ContainerObjectArgs args)ContainerObject(java.lang.String name, ContainerObjectArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>containerName()com.pulumi.core.Output<java.util.Optional<java.lang.String>>content()com.pulumi.core.Output<java.lang.String>contentDisposition()com.pulumi.core.Output<java.lang.String>contentEncoding()com.pulumi.core.Output<java.lang.Integer>contentLength()com.pulumi.core.Output<java.lang.String>contentType()com.pulumi.core.Output<java.util.Optional<java.lang.String>>copyFrom()com.pulumi.core.Output<java.lang.String>date()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>deleteAfter()com.pulumi.core.Output<java.lang.String>deleteAt()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>detectContentType()com.pulumi.core.Output<java.lang.String>etag()static ContainerObjectget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ContainerObjectState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>lastModified()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>>metadata()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>objectManifest()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.String>>source()com.pulumi.core.Output<java.lang.String>transId()
-
-
-
Constructor Detail
-
ContainerObject
public ContainerObject(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
ContainerObject
public ContainerObject(java.lang.String name, ContainerObjectArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
ContainerObject
public ContainerObject(java.lang.String name, ContainerObjectArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
containerName
public com.pulumi.core.Output<java.lang.String> containerName()
- Returns:
- 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
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> content()
- Returns:
- A string representing the content of the object. Conflicts with `source` and `copy_from`.
-
contentDisposition
public com.pulumi.core.Output<java.lang.String> contentDisposition()
- Returns:
- 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.
-
contentEncoding
public com.pulumi.core.Output<java.lang.String> contentEncoding()
- Returns:
- A string representing the value of the Content-Encoding metadata.
-
contentLength
public com.pulumi.core.Output<java.lang.Integer> contentLength()
- Returns:
- If the operation succeeds, this value is zero (0) or the length of informational or error text in the response body.
-
contentType
public com.pulumi.core.Output<java.lang.String> contentType()
- Returns:
- A string which sets the MIME type for the object.
-
copyFrom
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> copyFrom()
- Returns:
- A string representing the name of an object used to create the new object by copying the `copy_from` 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`.
-
date
public com.pulumi.core.Output<java.lang.String> date()
- Returns:
- 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.
-
deleteAfter
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> deleteAfter()
- Returns:
- 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.
-
deleteAt
public com.pulumi.core.Output<java.lang.String> deleteAt()
- Returns:
- 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.
-
detectContentType
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> detectContentType()
- Returns:
- 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
public com.pulumi.core.Output<java.lang.String> etag()
- Returns:
- Used to trigger updates. The only meaningful value is ${md5(file("path/to/file"))}.
-
lastModified
public com.pulumi.core.Output<java.lang.String> lastModified()
- Returns:
- 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.
-
metadata
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>> metadata()
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- A unique name for the object.
-
objectManifest
public com.pulumi.core.Output<java.lang.String> objectManifest()
- Returns:
- 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
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The region in which to create the container. If omitted, the `region` argument of the provider is used. Changing this creates a new container.
-
source
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> source()
- Returns:
- A string representing the local path of a file which will be used as the object's content. Conflicts with `source` and `copy_from`.
-
transId
public com.pulumi.core.Output<java.lang.String> transId()
- Returns:
- A unique transaction ID for this request. Your service provider might need this value if you report a problem.
-
get
public static ContainerObject get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ContainerObjectState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-