UNPKG

@pulumi/gcp

Version:

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

91 lines (90 loc) 2.83 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Gets existing objects inside an existing bucket in Google Cloud Storage service (GCS). * See [the official documentation](https://cloud.google.com/storage/docs/key-terms#objects) * and [API](https://cloud.google.com/storage/docs/json_api/v1/objects/list). * * ## Example Usage * * Example files stored within a bucket. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const files = gcp.storage.getBucketObjects({ * bucket: "file-store", * }); * ``` */ export declare function getBucketObjects(args: GetBucketObjectsArgs, opts?: pulumi.InvokeOptions): Promise<GetBucketObjectsResult>; /** * A collection of arguments for invoking getBucketObjects. */ export interface GetBucketObjectsArgs { /** * The name of the containing bucket. */ bucket: string; /** * A glob pattern used to filter results (for example, `foo*bar`). */ matchGlob?: string; /** * Filter results to include only objects whose names begin with this prefix. */ prefix?: string; } /** * A collection of values returned by getBucketObjects. */ export interface GetBucketObjectsResult { readonly bucket: string; /** * A list of retrieved objects contained in the provided GCS bucket. Structure is defined below. */ readonly bucketObjects: outputs.storage.GetBucketObjectsBucketObject[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly matchGlob?: string; readonly prefix?: string; } /** * Gets existing objects inside an existing bucket in Google Cloud Storage service (GCS). * See [the official documentation](https://cloud.google.com/storage/docs/key-terms#objects) * and [API](https://cloud.google.com/storage/docs/json_api/v1/objects/list). * * ## Example Usage * * Example files stored within a bucket. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const files = gcp.storage.getBucketObjects({ * bucket: "file-store", * }); * ``` */ export declare function getBucketObjectsOutput(args: GetBucketObjectsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetBucketObjectsResult>; /** * A collection of arguments for invoking getBucketObjects. */ export interface GetBucketObjectsOutputArgs { /** * The name of the containing bucket. */ bucket: pulumi.Input<string>; /** * A glob pattern used to filter results (for example, `foo*bar`). */ matchGlob?: pulumi.Input<string>; /** * Filter results to include only objects whose names begin with this prefix. */ prefix?: pulumi.Input<string>; }