Class TempUrl
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.objectstorage.TempUrl
-
public class TempUrl extends com.pulumi.resources.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 ```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 com.pulumi.openstack.objectstorage.TempUrl; import com.pulumi.openstack.objectstorage.TempUrlArgs; 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() .metadata(Map.of("Temp-URL-Key", "testkey")) .build()); var object1 = new ContainerObject("object1", ContainerObjectArgs.builder() .containerName(container1.name()) .content("Hello, world!") .build()); var objTempurl = new TempUrl("objTempurl", TempUrlArgs.builder() .container(container1.name()) .object(object1.name()) .method("post") .ttl(20) .build()); } } ```
-
-
Constructor Summary
Constructors Constructor Description TempUrl(java.lang.String name)TempUrl(java.lang.String name, TempUrlArgs args)TempUrl(java.lang.String name, TempUrlArgs 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>container()static TempUrlget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, TempUrlState 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.util.Optional<java.lang.String>>method()com.pulumi.core.Output<java.lang.String>object()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>regenerate()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.String>>split()com.pulumi.core.Output<java.lang.Integer>ttl()com.pulumi.core.Output<java.lang.String>url()
-
-
-
Constructor Detail
-
TempUrl
public TempUrl(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
TempUrl
public TempUrl(java.lang.String name, TempUrlArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
TempUrl
public TempUrl(java.lang.String name, TempUrlArgs 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
-
container
public com.pulumi.core.Output<java.lang.String> container()
- Returns:
- The container name the object belongs to.
-
method
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> method()
- Returns:
- The method allowed when accessing this URL. Valid values are `GET`, and `POST`. Default is `GET`.
-
object
public com.pulumi.core.Output<java.lang.String> object()
- Returns:
- The object name the tempurl is for.
-
regenerate
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> regenerate()
- Returns:
- 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
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The region the tempurl is located in.
-
split
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> split()
-
ttl
public com.pulumi.core.Output<java.lang.Integer> ttl()
- Returns:
- The TTL, in seconds, for the URL. For how long it should be valid.
-
url
public com.pulumi.core.Output<java.lang.String> url()
- Returns:
- The URL
-
get
public static TempUrl get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable TempUrlState 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.
-
-