@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
183 lines (182 loc) • 6.17 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A Google Cloud Storage Managed Folder.
*
* You can apply Identity and Access Management (IAM) policies to
* managed folders to grant principals access only to the objects
* within the managed folder, which lets you more finely control access
* for specific data sets and tables within a bucket. You can nest
* managed folders up to 15 levels deep, including the parent managed
* folder.
*
* Managed folders can only be created in buckets that have uniform
* bucket-level access enabled.
*
* To get more information about ManagedFolder, see:
*
* * [API documentation](https://cloud.google.com/storage/docs/json_api/v1/managedFolder)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/storage/docs/managed-folders)
*
* ## Example Usage
*
* ### Storage Managed 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,
* });
* const folder = new gcp.storage.ManagedFolder("folder", {
* bucket: bucket.name,
* name: "managed/folder/name/",
* forceDestroy: true,
* });
* ```
*
* ## Import
*
* ManagedFolder can be imported using any of these accepted formats:
*
* * `{{bucket}}/managedFolders/{{name}}`
*
* * `{{bucket}}/{{name}}`
*
* When using the `pulumi import` command, ManagedFolder can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:storage/managedFolder:ManagedFolder default {{bucket}}/managedFolders/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:storage/managedFolder:ManagedFolder default {{bucket}}/{{name}}
* ```
*/
export declare class ManagedFolder extends pulumi.CustomResource {
/**
* Get an existing ManagedFolder 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?: ManagedFolderState, opts?: pulumi.CustomResourceOptions): ManagedFolder;
/**
* Returns true if the given object is an instance of ManagedFolder. 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 ManagedFolder;
/**
* The name of the bucket that contains the managed folder.
*/
readonly bucket: pulumi.Output<string>;
/**
* The timestamp at which this managed folder was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Allows the deletion of a managed folder even if contains
* objects. If a non-empty managed folder is deleted, any objects
* within the folder will remain in a simulated folder with the
* same name.
*/
readonly forceDestroy: pulumi.Output<boolean | undefined>;
/**
* The metadata generation of the managed folder.
*/
readonly metageneration: pulumi.Output<string>;
/**
* The name of the managed folder expressed as a path. Must include
* trailing '/'. For example, `example_dir/example_dir2/`.
*
*
* - - -
*/
readonly name: pulumi.Output<string>;
/**
* The URI of the created resource.
*/
readonly selfLink: pulumi.Output<string>;
/**
* The timestamp at which this managed folder was most recently updated.
*/
readonly updateTime: pulumi.Output<string>;
/**
* Create a ManagedFolder 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: ManagedFolderArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ManagedFolder resources.
*/
export interface ManagedFolderState {
/**
* The name of the bucket that contains the managed folder.
*/
bucket?: pulumi.Input<string>;
/**
* The timestamp at which this managed folder was created.
*/
createTime?: pulumi.Input<string>;
/**
* Allows the deletion of a managed folder even if contains
* objects. If a non-empty managed folder is deleted, any objects
* within the folder will remain in a simulated folder with the
* same name.
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* The metadata generation of the managed folder.
*/
metageneration?: pulumi.Input<string>;
/**
* The name of the managed folder expressed as a path. Must include
* trailing '/'. For example, `example_dir/example_dir2/`.
*
*
* - - -
*/
name?: pulumi.Input<string>;
/**
* The URI of the created resource.
*/
selfLink?: pulumi.Input<string>;
/**
* The timestamp at which this managed folder was most recently updated.
*/
updateTime?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ManagedFolder resource.
*/
export interface ManagedFolderArgs {
/**
* The name of the bucket that contains the managed folder.
*/
bucket: pulumi.Input<string>;
/**
* Allows the deletion of a managed folder even if contains
* objects. If a non-empty managed folder is deleted, any objects
* within the folder will remain in a simulated folder with the
* same name.
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* The name of the managed folder expressed as a path. Must include
* trailing '/'. For example, `example_dir/example_dir2/`.
*
*
* - - -
*/
name?: pulumi.Input<string>;
}