@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
270 lines • 11.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Represents an inventory report configuration.
*
* To get more information about ReportConfig, see:
*
* * [API documentation](https://cloud.google.com/storage/docs/json_api/v1/reportConfig)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/storage/docs/insights/using-storage-insights)
*
* ## Example Usage
*
* ### Storage Insights Report Config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const project = gcp.organizations.getProject({});
* const reportBucket = new gcp.storage.Bucket("report_bucket", {
* name: "my-bucket",
* location: "us-central1",
* forceDestroy: true,
* uniformBucketLevelAccess: true,
* });
* const admin = new gcp.storage.BucketIAMMember("admin", {
* bucket: reportBucket.name,
* role: "roles/storage.admin",
* member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-storageinsights.iam.gserviceaccount.com`),
* });
* const config = new gcp.storage.InsightsReportConfig("config", {
* displayName: "Test Report Config",
* location: "us-central1",
* frequencyOptions: {
* frequency: "WEEKLY",
* startDate: {
* day: 15,
* month: 3,
* year: 2050,
* },
* endDate: {
* day: 15,
* month: 4,
* year: 2050,
* },
* },
* csvOptions: {
* recordSeparator: "\n",
* delimiter: ",",
* headerRequired: false,
* },
* objectMetadataReportOptions: {
* metadataFields: [
* "bucket",
* "name",
* "project",
* ],
* storageFilters: {
* bucket: reportBucket.name,
* },
* storageDestinationOptions: {
* bucket: reportBucket.name,
* destinationPath: "test-insights-reports",
* },
* },
* }, {
* dependsOn: [admin],
* });
* ```
*
* ## Import
*
* ReportConfig can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/reportConfigs/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, ReportConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:storage/insightsReportConfig:InsightsReportConfig default projects/{{project}}/locations/{{location}}/reportConfigs/{{name}}
* $ pulumi import gcp:storage/insightsReportConfig:InsightsReportConfig default {{project}}/{{location}}/{{name}}
* $ pulumi import gcp:storage/insightsReportConfig:InsightsReportConfig default {{location}}/{{name}}
* ```
*/
export declare class InsightsReportConfig extends pulumi.CustomResource {
/**
* Get an existing InsightsReportConfig 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?: InsightsReportConfigState, opts?: pulumi.CustomResourceOptions): InsightsReportConfig;
/**
* Returns true if the given object is an instance of InsightsReportConfig. 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 InsightsReportConfig;
/**
* Options for configuring the format of the inventory report CSV file.
* Structure is documented below.
*/
readonly csvOptions: pulumi.Output<outputs.storage.InsightsReportConfigCsvOptions | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
*/
readonly displayName: pulumi.Output<string | undefined>;
/**
* If set, all the inventory report details associated with this report configuration are deleted.
*/
readonly forceDestroy: pulumi.Output<boolean | undefined>;
/**
* Options for configuring how inventory reports are generated.
* Structure is documented below.
*/
readonly frequencyOptions: pulumi.Output<outputs.storage.InsightsReportConfigFrequencyOptions | undefined>;
/**
* The location of the ReportConfig. The source and destination buckets specified in the ReportConfig
* must be in the same location.
*/
readonly location: pulumi.Output<string>;
/**
* The UUID of the inventory report configuration.
*/
readonly name: pulumi.Output<string>;
/**
* Options for including metadata in an inventory report.
* Structure is documented below.
*/
readonly objectMetadataReportOptions: pulumi.Output<outputs.storage.InsightsReportConfigObjectMetadataReportOptions | undefined>;
/**
* An option for outputting inventory reports as parquet files.
*/
readonly parquetOptions: pulumi.Output<outputs.storage.InsightsReportConfigParquetOptions | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* Create a InsightsReportConfig 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: InsightsReportConfigArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering InsightsReportConfig resources.
*/
export interface InsightsReportConfigState {
/**
* Options for configuring the format of the inventory report CSV file.
* Structure is documented below.
*/
csvOptions?: pulumi.Input<inputs.storage.InsightsReportConfigCsvOptions | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* If set, all the inventory report details associated with this report configuration are deleted.
*/
forceDestroy?: pulumi.Input<boolean | undefined>;
/**
* Options for configuring how inventory reports are generated.
* Structure is documented below.
*/
frequencyOptions?: pulumi.Input<inputs.storage.InsightsReportConfigFrequencyOptions | undefined>;
/**
* The location of the ReportConfig. The source and destination buckets specified in the ReportConfig
* must be in the same location.
*/
location?: pulumi.Input<string | undefined>;
/**
* The UUID of the inventory report configuration.
*/
name?: pulumi.Input<string | undefined>;
/**
* Options for including metadata in an inventory report.
* Structure is documented below.
*/
objectMetadataReportOptions?: pulumi.Input<inputs.storage.InsightsReportConfigObjectMetadataReportOptions | undefined>;
/**
* An option for outputting inventory reports as parquet files.
*/
parquetOptions?: pulumi.Input<inputs.storage.InsightsReportConfigParquetOptions | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a InsightsReportConfig resource.
*/
export interface InsightsReportConfigArgs {
/**
* Options for configuring the format of the inventory report CSV file.
* Structure is documented below.
*/
csvOptions?: pulumi.Input<inputs.storage.InsightsReportConfigCsvOptions | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* If set, all the inventory report details associated with this report configuration are deleted.
*/
forceDestroy?: pulumi.Input<boolean | undefined>;
/**
* Options for configuring how inventory reports are generated.
* Structure is documented below.
*/
frequencyOptions?: pulumi.Input<inputs.storage.InsightsReportConfigFrequencyOptions | undefined>;
/**
* The location of the ReportConfig. The source and destination buckets specified in the ReportConfig
* must be in the same location.
*/
location: pulumi.Input<string>;
/**
* Options for including metadata in an inventory report.
* Structure is documented below.
*/
objectMetadataReportOptions?: pulumi.Input<inputs.storage.InsightsReportConfigObjectMetadataReportOptions | undefined>;
/**
* An option for outputting inventory reports as parquet files.
*/
parquetOptions?: pulumi.Input<inputs.storage.InsightsReportConfigParquetOptions | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=insightsReportConfig.d.ts.map