@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
82 lines (81 loc) • 2.36 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Gets a list of existing GCS buckets.
* See [the official documentation](https://cloud.google.com/storage/docs/introduction)
* and [API](https://cloud.google.com/storage/docs/json_api/v1/buckets/list).
*
* ## Example Usage
*
* Example GCS buckets.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const example = gcp.storage.getBuckets({
* project: "example-project",
* });
* ```
*/
export declare function getBuckets(args?: GetBucketsArgs, opts?: pulumi.InvokeOptions): Promise<GetBucketsResult>;
/**
* A collection of arguments for invoking getBuckets.
*/
export interface GetBucketsArgs {
/**
* Filter results to buckets whose names begin with this prefix.
*/
prefix?: string;
/**
* The ID of the project. If it is not provided, the provider project is used.
*/
project?: string;
}
/**
* A collection of values returned by getBuckets.
*/
export interface GetBucketsResult {
/**
* A list of all retrieved GCS buckets. Structure is defined below.
*/
readonly buckets: outputs.storage.GetBucketsBucket[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly prefix?: string;
readonly project?: string;
}
/**
* Gets a list of existing GCS buckets.
* See [the official documentation](https://cloud.google.com/storage/docs/introduction)
* and [API](https://cloud.google.com/storage/docs/json_api/v1/buckets/list).
*
* ## Example Usage
*
* Example GCS buckets.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const example = gcp.storage.getBuckets({
* project: "example-project",
* });
* ```
*/
export declare function getBucketsOutput(args?: GetBucketsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetBucketsResult>;
/**
* A collection of arguments for invoking getBuckets.
*/
export interface GetBucketsOutputArgs {
/**
* Filter results to buckets whose names begin with this prefix.
*/
prefix?: pulumi.Input<string>;
/**
* The ID of the project. If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}