TempUrl

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 regenerate argument to true. This will create a new resource with a new ID and URL.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var container1 = new OpenStack.ObjectStorage.Container("container1", new OpenStack.ObjectStorage.ContainerArgs
        {
            Metadata = 
            {
                { "Temp-URL-Key", "testkey" },
            },
        });
        var object1 = new OpenStack.ObjectStorage.ContainerObject("object1", new OpenStack.ObjectStorage.ContainerObjectArgs
        {
            ContainerName = container1.Name,
            Content = "Hello, world!",
        });
        var objTempurl = new OpenStack.ObjectStorage.TempUrl("objTempurl", new OpenStack.ObjectStorage.TempUrlArgs
        {
            Container = container1.Name,
            Method = "post",
            Object = object1.Name,
            Ttl = 20,
        });
    }

}

Coming soon!

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)
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const container1 = new openstack.objectstorage.Container("container_1", {
    metadata: {
        "Temp-URL-Key": "testkey",
    },
});
const object1 = new openstack.objectstorage.ContainerObject("object_1", {
    containerName: container1.name,
    content: "Hello, world!",
});
const objTempurl = new openstack.objectstorage.TempUrl("obj_tempurl", {
    container: container1.name,
    method: "post",
    object: object1.name,
    ttl: 20,
});

Create a TempUrl Resource

new TempUrl(name: string, args: TempUrlArgs, opts?: CustomResourceOptions);
def TempUrl(resource_name, opts=None, container=None, method=None, object=None, regenerate=None, region=None, split=None, ttl=None, __props__=None);
func NewTempUrl(ctx *Context, name string, args TempUrlArgs, opts ...ResourceOption) (*TempUrl, error)
public TempUrl(string name, TempUrlArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TempUrlArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TempUrlArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TempUrlArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

TempUrl Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The TempUrl resource accepts the following input properties:

Container string

The container name the object belongs to.

Object string

The object name the tempurl is for.

Ttl int

The TTL, in seconds, for the URL. For how long it should be valid.

Method string

The method allowed when accessing this URL. Valid values are GET, and POST. Default is GET.

Regenerate 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 string

The region the tempurl is located in.

Split string
Container string

The container name the object belongs to.

Object string

The object name the tempurl is for.

Ttl int

The TTL, in seconds, for the URL. For how long it should be valid.

Method string

The method allowed when accessing this URL. Valid values are GET, and POST. Default is GET.

Regenerate 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 string

The region the tempurl is located in.

Split string
container string

The container name the object belongs to.

object string

The object name the tempurl is for.

ttl number

The TTL, in seconds, for the URL. For how long it should be valid.

method string

The method allowed when accessing this URL. Valid values are GET, and POST. Default is GET.

regenerate 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.

region string

The region the tempurl is located in.

split string
container str

The container name the object belongs to.

object str

The object name the tempurl is for.

ttl float

The TTL, in seconds, for the URL. For how long it should be valid.

method str

The method allowed when accessing this URL. Valid values are GET, and POST. Default is GET.

regenerate 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 str

The region the tempurl is located in.

split str

Outputs

All input properties are implicitly available as output properties. Additionally, the TempUrl resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Url string

The URL

Id string
The provider-assigned unique ID for this managed resource.
Url string

The URL

id string
The provider-assigned unique ID for this managed resource.
url string

The URL

id str
The provider-assigned unique ID for this managed resource.
url str

The URL

Look up an Existing TempUrl Resource

Get an existing TempUrl 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?: TempUrlState, opts?: CustomResourceOptions): TempUrl
static get(resource_name, id, opts=None, container=None, method=None, object=None, regenerate=None, region=None, split=None, ttl=None, url=None, __props__=None);
func GetTempUrl(ctx *Context, name string, id IDInput, state *TempUrlState, opts ...ResourceOption) (*TempUrl, error)
public static TempUrl Get(string name, Input<string> id, TempUrlState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Container string

The container name the object belongs to.

Method string

The method allowed when accessing this URL. Valid values are GET, and POST. Default is GET.

Object string

The object name the tempurl is for.

Regenerate 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 string

The region the tempurl is located in.

Split string
Ttl int

The TTL, in seconds, for the URL. For how long it should be valid.

Url string

The URL

Container string

The container name the object belongs to.

Method string

The method allowed when accessing this URL. Valid values are GET, and POST. Default is GET.

Object string

The object name the tempurl is for.

Regenerate 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 string

The region the tempurl is located in.

Split string
Ttl int

The TTL, in seconds, for the URL. For how long it should be valid.

Url string

The URL

container string

The container name the object belongs to.

method string

The method allowed when accessing this URL. Valid values are GET, and POST. Default is GET.

object string

The object name the tempurl is for.

regenerate 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.

region string

The region the tempurl is located in.

split string
ttl number

The TTL, in seconds, for the URL. For how long it should be valid.

url string

The URL

container str

The container name the object belongs to.

method str

The method allowed when accessing this URL. Valid values are GET, and POST. Default is GET.

object str

The object name the tempurl is for.

regenerate 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 str

The region the tempurl is located in.

split str
ttl float

The TTL, in seconds, for the URL. For how long it should be valid.

url str

The URL

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.