UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

163 lines (162 loc) 5.3 kB
import * as pulumi from "@pulumi/pulumi"; /** * A Google Cloud Storage Folder. * * The Folder resource represents a folder in a Cloud Storage bucket with hierarchical namespace enabled * * To get more information about Folder, see: * * * [API documentation](https://cloud.google.com/storage/docs/json_api/v1/folders) * * How-to Guides * * [Official Documentation](https://cloud.google.com/storage/docs/folders-overview) * * ## Example Usage * * ### Storage Folder Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const bucket = new gcp.storage.Bucket("bucket", { * name: "my-bucket", * location: "EU", * uniformBucketLevelAccess: true, * hierarchicalNamespace: { * enabled: true, * }, * }); * const folder = new gcp.storage.Folder("folder", { * bucket: bucket.name, * name: "parent-folder/", * }); * const subfolder = new gcp.storage.Folder("subfolder", { * bucket: bucket.name, * name: pulumi.interpolate`${folder.name}subfolder/`, * }); * ``` * * ## Import * * Folder can be imported using any of these accepted formats: * * * `{{bucket}}/folders/{{name}}` * * * `{{bucket}}/{{name}}` * * When using the `pulumi import` command, Folder can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:storage/folder:Folder default {{bucket}}/folders/{{name}} * ``` * * ```sh * $ pulumi import gcp:storage/folder:Folder default {{bucket}}/{{name}} * ``` */ export declare class Folder extends pulumi.CustomResource { /** * Get an existing Folder 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?: FolderState, opts?: pulumi.CustomResourceOptions): Folder; /** * Returns true if the given object is an instance of Folder. 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 Folder; /** * The name of the bucket that contains the folder. */ readonly bucket: pulumi.Output<string>; /** * The timestamp at which this folder was created. */ readonly createTime: pulumi.Output<string>; /** * If set to true, items within folder if any will be force destroyed. */ readonly forceDestroy: pulumi.Output<boolean | undefined>; /** * The metadata generation of the folder. */ readonly metageneration: pulumi.Output<string>; /** * The name of the folder expressed as a path. Must include * trailing '/'. For example, `example_dir/example_dir2/`, `example@#/`, `a-b/d-f/`. */ readonly name: pulumi.Output<string>; /** * The URI of the created resource. */ readonly selfLink: pulumi.Output<string>; /** * The timestamp at which this folder was most recently updated. */ readonly updateTime: pulumi.Output<string>; /** * Create a Folder 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: FolderArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Folder resources. */ export interface FolderState { /** * The name of the bucket that contains the folder. */ bucket?: pulumi.Input<string>; /** * The timestamp at which this folder was created. */ createTime?: pulumi.Input<string>; /** * If set to true, items within folder if any will be force destroyed. */ forceDestroy?: pulumi.Input<boolean>; /** * The metadata generation of the folder. */ metageneration?: pulumi.Input<string>; /** * The name of the folder expressed as a path. Must include * trailing '/'. For example, `example_dir/example_dir2/`, `example@#/`, `a-b/d-f/`. */ name?: pulumi.Input<string>; /** * The URI of the created resource. */ selfLink?: pulumi.Input<string>; /** * The timestamp at which this folder was most recently updated. */ updateTime?: pulumi.Input<string>; } /** * The set of arguments for constructing a Folder resource. */ export interface FolderArgs { /** * The name of the bucket that contains the folder. */ bucket: pulumi.Input<string>; /** * If set to true, items within folder if any will be force destroyed. */ forceDestroy?: pulumi.Input<boolean>; /** * The name of the folder expressed as a path. Must include * trailing '/'. For example, `example_dir/example_dir2/`, `example@#/`, `a-b/d-f/`. */ name?: pulumi.Input<string>; }