UNPKG

@pulumi/openstack

Version:

A Pulumi package for creating and managing OpenStack cloud resources.

208 lines (207 loc) 6.89 kB
import * as pulumi from "@pulumi/pulumi"; /** * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as openstack from "@pulumi/openstack"; * * const container1 = new openstack.objectstorage.Container("container_1", { * name: "test", * metadata: { * "Temp-URL-Key": "testkey", * }, * }); * const object1 = new openstack.objectstorage.ContainerObject("object_1", { * containerName: container1.name, * name: "test", * content: "Hello, world!", * }); * const objTempurl = new openstack.objectstorage.TempUrl("obj_tempurl", { * container: container1.name, * object: object1.name, * method: "post", * ttl: 20, * }); * ``` */ export declare class TempUrl extends pulumi.CustomResource { /** * Get an existing TempUrl resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TempUrlState, opts?: pulumi.CustomResourceOptions): TempUrl; /** * Returns 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. */ static isInstance(obj: any): obj is TempUrl; /** * The container name the object belongs to. */ readonly container: pulumi.Output<string>; /** * The digest to use when generating the tempurl. * Supported values are `sha1`, `sha256` and `sha512`. Default is `sha1`. */ readonly digest: pulumi.Output<string | undefined>; /** * The key to use when generating the tempurl. If not * provided, the key will be read from the container or account metadata. */ readonly key: pulumi.Output<string | undefined>; /** * The method allowed when accessing this URL. * Valid values are `GET`, and `POST`. Default is `GET`. */ readonly method: pulumi.Output<string | undefined>; /** * The object name the tempurl is for. */ readonly object: pulumi.Output<string>; /** * 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. */ readonly regenerate: pulumi.Output<boolean | undefined>; /** * The region the tempurl is located in. */ readonly region: pulumi.Output<string>; /** * Split is the string on which to split the object URL. * Default is `/v1/`. */ readonly split: pulumi.Output<string | undefined>; /** * The TTL, in seconds, for the URL. For how long it should * be valid. */ readonly ttl: pulumi.Output<number>; /** * The URL */ readonly url: pulumi.Output<string>; /** * Create a TempUrl resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TempUrlArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TempUrl resources. */ export interface TempUrlState { /** * The container name the object belongs to. */ container?: pulumi.Input<string>; /** * The digest to use when generating the tempurl. * Supported values are `sha1`, `sha256` and `sha512`. Default is `sha1`. */ digest?: pulumi.Input<string>; /** * The key to use when generating the tempurl. If not * provided, the key will be read from the container or account metadata. */ key?: pulumi.Input<string>; /** * The method allowed when accessing this URL. * Valid values are `GET`, and `POST`. Default is `GET`. */ method?: pulumi.Input<string>; /** * The object name the tempurl is for. */ object?: pulumi.Input<string>; /** * 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. */ regenerate?: pulumi.Input<boolean>; /** * The region the tempurl is located in. */ region?: pulumi.Input<string>; /** * Split is the string on which to split the object URL. * Default is `/v1/`. */ split?: pulumi.Input<string>; /** * The TTL, in seconds, for the URL. For how long it should * be valid. */ ttl?: pulumi.Input<number>; /** * The URL */ url?: pulumi.Input<string>; } /** * The set of arguments for constructing a TempUrl resource. */ export interface TempUrlArgs { /** * The container name the object belongs to. */ container: pulumi.Input<string>; /** * The digest to use when generating the tempurl. * Supported values are `sha1`, `sha256` and `sha512`. Default is `sha1`. */ digest?: pulumi.Input<string>; /** * The key to use when generating the tempurl. If not * provided, the key will be read from the container or account metadata. */ key?: pulumi.Input<string>; /** * The method allowed when accessing this URL. * Valid values are `GET`, and `POST`. Default is `GET`. */ method?: pulumi.Input<string>; /** * The object name the tempurl is for. */ object: pulumi.Input<string>; /** * 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. */ regenerate?: pulumi.Input<boolean>; /** * The region the tempurl is located in. */ region?: pulumi.Input<string>; /** * Split is the string on which to split the object URL. * Default is `/v1/`. */ split?: pulumi.Input<string>; /** * The TTL, in seconds, for the URL. For how long it should * be valid. */ ttl: pulumi.Input<number>; }