@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
116 lines (115 loc) • 4.18 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Sets up a usage export bucket for a particular project. A usage export bucket
* is a pre-configured GCS bucket which is set up to receive daily and monthly
* reports of the GCE resources used.
*
* For more information see the [Docs](https://cloud.google.com/compute/docs/usage-export)
* and for further details, the
* [API Documentation](https://cloud.google.com/compute/docs/reference/rest/beta/projects/setUsageExportBucket).
*
* > **Note:** You should specify only one of these per project. If there are two or more
* they will fight over which bucket the reports should be stored in. It is
* safe to have multiple resources with the same backing bucket.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const usageExport = new gcp.projects.UsageExportBucket("usage_export", {
* project: "development-project",
* bucketName: "usage-tracking-bucket",
* });
* ```
*
* ## Import
*
* A project's Usage Export Bucket can be imported using this format:
*
* * `{{project_id}}`
*
* When using the `pulumi import` command, NAME_HERE can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:projects/usageExportBucket:UsageExportBucket default {{project_id}}
* ```
*/
export declare class UsageExportBucket extends pulumi.CustomResource {
/**
* Get an existing UsageExportBucket 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?: UsageExportBucketState, opts?: pulumi.CustomResourceOptions): UsageExportBucket;
/**
* Returns true if the given object is an instance of UsageExportBucket. 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 UsageExportBucket;
/**
* The bucket to store reports in.
*
* - - -
*/
readonly bucketName: pulumi.Output<string>;
/**
* A prefix for the reports, for instance, the project name.
*/
readonly prefix: pulumi.Output<string | undefined>;
/**
* The project to set the export bucket on. If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* Create a UsageExportBucket 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: UsageExportBucketArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering UsageExportBucket resources.
*/
export interface UsageExportBucketState {
/**
* The bucket to store reports in.
*
* - - -
*/
bucketName?: pulumi.Input<string>;
/**
* A prefix for the reports, for instance, the project name.
*/
prefix?: pulumi.Input<string>;
/**
* The project to set the export bucket on. If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a UsageExportBucket resource.
*/
export interface UsageExportBucketArgs {
/**
* The bucket to store reports in.
*
* - - -
*/
bucketName: pulumi.Input<string>;
/**
* A prefix for the reports, for instance, the project name.
*/
prefix?: pulumi.Input<string>;
/**
* The project to set the export bucket on. If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string>;
}