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}} * ``` * * ```sh * $ pulumi import gcp:storage/insightsReportConfig:InsightsReportConfig default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ 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, 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; /** * The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty. */ readonly displayName: pulumi.Output; /** * If set, all the inventory report details associated with this report configuration are deleted. */ readonly forceDestroy: pulumi.Output; /** * Options for configuring how inventory reports are generated. * Structure is documented below. */ readonly frequencyOptions: pulumi.Output; /** * The location of the ReportConfig. The source and destination buckets specified in the ReportConfig * must be in the same location. */ readonly location: pulumi.Output; /** * The UUID of the inventory report configuration. */ readonly name: pulumi.Output; /** * Options for including metadata in an inventory report. * Structure is documented below. */ readonly objectMetadataReportOptions: pulumi.Output; /** * An option for outputting inventory reports as parquet files. */ readonly parquetOptions: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * 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; /** * The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty. */ displayName?: pulumi.Input; /** * If set, all the inventory report details associated with this report configuration are deleted. */ forceDestroy?: pulumi.Input; /** * Options for configuring how inventory reports are generated. * Structure is documented below. */ frequencyOptions?: pulumi.Input; /** * The location of the ReportConfig. The source and destination buckets specified in the ReportConfig * must be in the same location. */ location?: pulumi.Input; /** * The UUID of the inventory report configuration. */ name?: pulumi.Input; /** * Options for including metadata in an inventory report. * Structure is documented below. */ objectMetadataReportOptions?: pulumi.Input; /** * An option for outputting inventory reports as parquet files. */ parquetOptions?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; } /** * 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; /** * The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty. */ displayName?: pulumi.Input; /** * If set, all the inventory report details associated with this report configuration are deleted. */ forceDestroy?: pulumi.Input; /** * Options for configuring how inventory reports are generated. * Structure is documented below. */ frequencyOptions?: pulumi.Input; /** * The location of the ReportConfig. The source and destination buckets specified in the ReportConfig * must be in the same location. */ location: pulumi.Input; /** * Options for including metadata in an inventory report. * Structure is documented below. */ objectMetadataReportOptions?: pulumi.Input; /** * An option for outputting inventory reports as parquet files. */ parquetOptions?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; }