gcp.storage.InsightsReportConfig
Explore with Pulumi AI
Represents an inventory report configuration.
To get more information about ReportConfig, see:
- API documentation
- How-to Guides
Example Usage
Storage Insights Report Config
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 pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
report_bucket = gcp.storage.Bucket("report_bucket",
    name="my-bucket",
    location="us-central1",
    force_destroy=True,
    uniform_bucket_level_access=True)
admin = gcp.storage.BucketIAMMember("admin",
    bucket=report_bucket.name,
    role="roles/storage.admin",
    member=f"serviceAccount:service-{project.number}@gcp-sa-storageinsights.iam.gserviceaccount.com")
config = gcp.storage.InsightsReportConfig("config",
    display_name="Test Report Config",
    location="us-central1",
    frequency_options={
        "frequency": "WEEKLY",
        "start_date": {
            "day": 15,
            "month": 3,
            "year": 2050,
        },
        "end_date": {
            "day": 15,
            "month": 4,
            "year": 2050,
        },
    },
    csv_options={
        "record_separator": "\n",
        "delimiter": ",",
        "header_required": False,
    },
    object_metadata_report_options={
        "metadata_fields": [
            "bucket",
            "name",
            "project",
        ],
        "storage_filters": {
            "bucket": report_bucket.name,
        },
        "storage_destination_options": {
            "bucket": report_bucket.name,
            "destination_path": "test-insights-reports",
        },
    },
    opts = pulumi.ResourceOptions(depends_on=[admin]))
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
		if err != nil {
			return err
		}
		reportBucket, err := storage.NewBucket(ctx, "report_bucket", &storage.BucketArgs{
			Name:                     pulumi.String("my-bucket"),
			Location:                 pulumi.String("us-central1"),
			ForceDestroy:             pulumi.Bool(true),
			UniformBucketLevelAccess: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		admin, err := storage.NewBucketIAMMember(ctx, "admin", &storage.BucketIAMMemberArgs{
			Bucket: reportBucket.Name,
			Role:   pulumi.String("roles/storage.admin"),
			Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-storageinsights.iam.gserviceaccount.com", project.Number),
		})
		if err != nil {
			return err
		}
		_, err = storage.NewInsightsReportConfig(ctx, "config", &storage.InsightsReportConfigArgs{
			DisplayName: pulumi.String("Test Report Config"),
			Location:    pulumi.String("us-central1"),
			FrequencyOptions: &storage.InsightsReportConfigFrequencyOptionsArgs{
				Frequency: pulumi.String("WEEKLY"),
				StartDate: &storage.InsightsReportConfigFrequencyOptionsStartDateArgs{
					Day:   pulumi.Int(15),
					Month: pulumi.Int(3),
					Year:  pulumi.Int(2050),
				},
				EndDate: &storage.InsightsReportConfigFrequencyOptionsEndDateArgs{
					Day:   pulumi.Int(15),
					Month: pulumi.Int(4),
					Year:  pulumi.Int(2050),
				},
			},
			CsvOptions: &storage.InsightsReportConfigCsvOptionsArgs{
				RecordSeparator: pulumi.String("\n"),
				Delimiter:       pulumi.String(","),
				HeaderRequired:  pulumi.Bool(false),
			},
			ObjectMetadataReportOptions: &storage.InsightsReportConfigObjectMetadataReportOptionsArgs{
				MetadataFields: pulumi.StringArray{
					pulumi.String("bucket"),
					pulumi.String("name"),
					pulumi.String("project"),
				},
				StorageFilters: &storage.InsightsReportConfigObjectMetadataReportOptionsStorageFiltersArgs{
					Bucket: reportBucket.Name,
				},
				StorageDestinationOptions: &storage.InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsArgs{
					Bucket:          reportBucket.Name,
					DestinationPath: pulumi.String("test-insights-reports"),
				},
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			admin,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var project = Gcp.Organizations.GetProject.Invoke();
    var reportBucket = new Gcp.Storage.Bucket("report_bucket", new()
    {
        Name = "my-bucket",
        Location = "us-central1",
        ForceDestroy = true,
        UniformBucketLevelAccess = true,
    });
    var admin = new Gcp.Storage.BucketIAMMember("admin", new()
    {
        Bucket = reportBucket.Name,
        Role = "roles/storage.admin",
        Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-storageinsights.iam.gserviceaccount.com",
    });
    var config = new Gcp.Storage.InsightsReportConfig("config", new()
    {
        DisplayName = "Test Report Config",
        Location = "us-central1",
        FrequencyOptions = new Gcp.Storage.Inputs.InsightsReportConfigFrequencyOptionsArgs
        {
            Frequency = "WEEKLY",
            StartDate = new Gcp.Storage.Inputs.InsightsReportConfigFrequencyOptionsStartDateArgs
            {
                Day = 15,
                Month = 3,
                Year = 2050,
            },
            EndDate = new Gcp.Storage.Inputs.InsightsReportConfigFrequencyOptionsEndDateArgs
            {
                Day = 15,
                Month = 4,
                Year = 2050,
            },
        },
        CsvOptions = new Gcp.Storage.Inputs.InsightsReportConfigCsvOptionsArgs
        {
            RecordSeparator = @"
",
            Delimiter = ",",
            HeaderRequired = false,
        },
        ObjectMetadataReportOptions = new Gcp.Storage.Inputs.InsightsReportConfigObjectMetadataReportOptionsArgs
        {
            MetadataFields = new[]
            {
                "bucket",
                "name",
                "project",
            },
            StorageFilters = new Gcp.Storage.Inputs.InsightsReportConfigObjectMetadataReportOptionsStorageFiltersArgs
            {
                Bucket = reportBucket.Name,
            },
            StorageDestinationOptions = new Gcp.Storage.Inputs.InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsArgs
            {
                Bucket = reportBucket.Name,
                DestinationPath = "test-insights-reports",
            },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            admin,
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.storage.BucketIAMMember;
import com.pulumi.gcp.storage.BucketIAMMemberArgs;
import com.pulumi.gcp.storage.InsightsReportConfig;
import com.pulumi.gcp.storage.InsightsReportConfigArgs;
import com.pulumi.gcp.storage.inputs.InsightsReportConfigFrequencyOptionsArgs;
import com.pulumi.gcp.storage.inputs.InsightsReportConfigFrequencyOptionsStartDateArgs;
import com.pulumi.gcp.storage.inputs.InsightsReportConfigFrequencyOptionsEndDateArgs;
import com.pulumi.gcp.storage.inputs.InsightsReportConfigCsvOptionsArgs;
import com.pulumi.gcp.storage.inputs.InsightsReportConfigObjectMetadataReportOptionsArgs;
import com.pulumi.gcp.storage.inputs.InsightsReportConfigObjectMetadataReportOptionsStorageFiltersArgs;
import com.pulumi.gcp.storage.inputs.InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var project = OrganizationsFunctions.getProject();
        var reportBucket = new Bucket("reportBucket", BucketArgs.builder()
            .name("my-bucket")
            .location("us-central1")
            .forceDestroy(true)
            .uniformBucketLevelAccess(true)
            .build());
        var admin = new BucketIAMMember("admin", BucketIAMMemberArgs.builder()
            .bucket(reportBucket.name())
            .role("roles/storage.admin")
            .member(String.format("serviceAccount:service-%s@gcp-sa-storageinsights.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
            .build());
        var config = new InsightsReportConfig("config", InsightsReportConfigArgs.builder()
            .displayName("Test Report Config")
            .location("us-central1")
            .frequencyOptions(InsightsReportConfigFrequencyOptionsArgs.builder()
                .frequency("WEEKLY")
                .startDate(InsightsReportConfigFrequencyOptionsStartDateArgs.builder()
                    .day(15)
                    .month(3)
                    .year(2050)
                    .build())
                .endDate(InsightsReportConfigFrequencyOptionsEndDateArgs.builder()
                    .day(15)
                    .month(4)
                    .year(2050)
                    .build())
                .build())
            .csvOptions(InsightsReportConfigCsvOptionsArgs.builder()
                .recordSeparator("""
                """)
                .delimiter(",")
                .headerRequired(false)
                .build())
            .objectMetadataReportOptions(InsightsReportConfigObjectMetadataReportOptionsArgs.builder()
                .metadataFields(                
                    "bucket",
                    "name",
                    "project")
                .storageFilters(InsightsReportConfigObjectMetadataReportOptionsStorageFiltersArgs.builder()
                    .bucket(reportBucket.name())
                    .build())
                .storageDestinationOptions(InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsArgs.builder()
                    .bucket(reportBucket.name())
                    .destinationPath("test-insights-reports")
                    .build())
                .build())
            .build(), CustomResourceOptions.builder()
                .dependsOn(admin)
                .build());
    }
}
resources:
  config:
    type: gcp:storage:InsightsReportConfig
    properties:
      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: |2+
        delimiter: ','
        headerRequired: false
      objectMetadataReportOptions:
        metadataFields:
          - bucket
          - name
          - project
        storageFilters:
          bucket: ${reportBucket.name}
        storageDestinationOptions:
          bucket: ${reportBucket.name}
          destinationPath: test-insights-reports
    options:
      dependsOn:
        - ${admin}
  reportBucket:
    type: gcp:storage:Bucket
    name: report_bucket
    properties:
      name: my-bucket
      location: us-central1
      forceDestroy: true
      uniformBucketLevelAccess: true
  admin:
    type: gcp:storage:BucketIAMMember
    properties:
      bucket: ${reportBucket.name}
      role: roles/storage.admin
      member: serviceAccount:service-${project.number}@gcp-sa-storageinsights.iam.gserviceaccount.com
variables:
  project:
    fn::invoke:
      function: gcp:organizations:getProject
      arguments: {}
Create InsightsReportConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new InsightsReportConfig(name: string, args: InsightsReportConfigArgs, opts?: CustomResourceOptions);@overload
def InsightsReportConfig(resource_name: str,
                         args: InsightsReportConfigArgs,
                         opts: Optional[ResourceOptions] = None)
@overload
def InsightsReportConfig(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         csv_options: Optional[InsightsReportConfigCsvOptionsArgs] = None,
                         location: Optional[str] = None,
                         display_name: Optional[str] = None,
                         frequency_options: Optional[InsightsReportConfigFrequencyOptionsArgs] = None,
                         object_metadata_report_options: Optional[InsightsReportConfigObjectMetadataReportOptionsArgs] = None,
                         project: Optional[str] = None)func NewInsightsReportConfig(ctx *Context, name string, args InsightsReportConfigArgs, opts ...ResourceOption) (*InsightsReportConfig, error)public InsightsReportConfig(string name, InsightsReportConfigArgs args, CustomResourceOptions? opts = null)
public InsightsReportConfig(String name, InsightsReportConfigArgs args)
public InsightsReportConfig(String name, InsightsReportConfigArgs args, CustomResourceOptions options)
type: gcp:storage:InsightsReportConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args InsightsReportConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args InsightsReportConfigArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args InsightsReportConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InsightsReportConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InsightsReportConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var insightsReportConfigResource = new Gcp.Storage.InsightsReportConfig("insightsReportConfigResource", new()
{
    CsvOptions = new Gcp.Storage.Inputs.InsightsReportConfigCsvOptionsArgs
    {
        Delimiter = "string",
        HeaderRequired = false,
        RecordSeparator = "string",
    },
    Location = "string",
    DisplayName = "string",
    FrequencyOptions = new Gcp.Storage.Inputs.InsightsReportConfigFrequencyOptionsArgs
    {
        EndDate = new Gcp.Storage.Inputs.InsightsReportConfigFrequencyOptionsEndDateArgs
        {
            Day = 0,
            Month = 0,
            Year = 0,
        },
        Frequency = "string",
        StartDate = new Gcp.Storage.Inputs.InsightsReportConfigFrequencyOptionsStartDateArgs
        {
            Day = 0,
            Month = 0,
            Year = 0,
        },
    },
    ObjectMetadataReportOptions = new Gcp.Storage.Inputs.InsightsReportConfigObjectMetadataReportOptionsArgs
    {
        MetadataFields = new[]
        {
            "string",
        },
        StorageDestinationOptions = new Gcp.Storage.Inputs.InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsArgs
        {
            Bucket = "string",
            DestinationPath = "string",
        },
        StorageFilters = new Gcp.Storage.Inputs.InsightsReportConfigObjectMetadataReportOptionsStorageFiltersArgs
        {
            Bucket = "string",
        },
    },
    Project = "string",
});
example, err := storage.NewInsightsReportConfig(ctx, "insightsReportConfigResource", &storage.InsightsReportConfigArgs{
	CsvOptions: &storage.InsightsReportConfigCsvOptionsArgs{
		Delimiter:       pulumi.String("string"),
		HeaderRequired:  pulumi.Bool(false),
		RecordSeparator: pulumi.String("string"),
	},
	Location:    pulumi.String("string"),
	DisplayName: pulumi.String("string"),
	FrequencyOptions: &storage.InsightsReportConfigFrequencyOptionsArgs{
		EndDate: &storage.InsightsReportConfigFrequencyOptionsEndDateArgs{
			Day:   pulumi.Int(0),
			Month: pulumi.Int(0),
			Year:  pulumi.Int(0),
		},
		Frequency: pulumi.String("string"),
		StartDate: &storage.InsightsReportConfigFrequencyOptionsStartDateArgs{
			Day:   pulumi.Int(0),
			Month: pulumi.Int(0),
			Year:  pulumi.Int(0),
		},
	},
	ObjectMetadataReportOptions: &storage.InsightsReportConfigObjectMetadataReportOptionsArgs{
		MetadataFields: pulumi.StringArray{
			pulumi.String("string"),
		},
		StorageDestinationOptions: &storage.InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsArgs{
			Bucket:          pulumi.String("string"),
			DestinationPath: pulumi.String("string"),
		},
		StorageFilters: &storage.InsightsReportConfigObjectMetadataReportOptionsStorageFiltersArgs{
			Bucket: pulumi.String("string"),
		},
	},
	Project: pulumi.String("string"),
})
var insightsReportConfigResource = new InsightsReportConfig("insightsReportConfigResource", InsightsReportConfigArgs.builder()
    .csvOptions(InsightsReportConfigCsvOptionsArgs.builder()
        .delimiter("string")
        .headerRequired(false)
        .recordSeparator("string")
        .build())
    .location("string")
    .displayName("string")
    .frequencyOptions(InsightsReportConfigFrequencyOptionsArgs.builder()
        .endDate(InsightsReportConfigFrequencyOptionsEndDateArgs.builder()
            .day(0)
            .month(0)
            .year(0)
            .build())
        .frequency("string")
        .startDate(InsightsReportConfigFrequencyOptionsStartDateArgs.builder()
            .day(0)
            .month(0)
            .year(0)
            .build())
        .build())
    .objectMetadataReportOptions(InsightsReportConfigObjectMetadataReportOptionsArgs.builder()
        .metadataFields("string")
        .storageDestinationOptions(InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsArgs.builder()
            .bucket("string")
            .destinationPath("string")
            .build())
        .storageFilters(InsightsReportConfigObjectMetadataReportOptionsStorageFiltersArgs.builder()
            .bucket("string")
            .build())
        .build())
    .project("string")
    .build());
insights_report_config_resource = gcp.storage.InsightsReportConfig("insightsReportConfigResource",
    csv_options={
        "delimiter": "string",
        "header_required": False,
        "record_separator": "string",
    },
    location="string",
    display_name="string",
    frequency_options={
        "end_date": {
            "day": 0,
            "month": 0,
            "year": 0,
        },
        "frequency": "string",
        "start_date": {
            "day": 0,
            "month": 0,
            "year": 0,
        },
    },
    object_metadata_report_options={
        "metadata_fields": ["string"],
        "storage_destination_options": {
            "bucket": "string",
            "destination_path": "string",
        },
        "storage_filters": {
            "bucket": "string",
        },
    },
    project="string")
const insightsReportConfigResource = new gcp.storage.InsightsReportConfig("insightsReportConfigResource", {
    csvOptions: {
        delimiter: "string",
        headerRequired: false,
        recordSeparator: "string",
    },
    location: "string",
    displayName: "string",
    frequencyOptions: {
        endDate: {
            day: 0,
            month: 0,
            year: 0,
        },
        frequency: "string",
        startDate: {
            day: 0,
            month: 0,
            year: 0,
        },
    },
    objectMetadataReportOptions: {
        metadataFields: ["string"],
        storageDestinationOptions: {
            bucket: "string",
            destinationPath: "string",
        },
        storageFilters: {
            bucket: "string",
        },
    },
    project: "string",
});
type: gcp:storage:InsightsReportConfig
properties:
    csvOptions:
        delimiter: string
        headerRequired: false
        recordSeparator: string
    displayName: string
    frequencyOptions:
        endDate:
            day: 0
            month: 0
            year: 0
        frequency: string
        startDate:
            day: 0
            month: 0
            year: 0
    location: string
    objectMetadataReportOptions:
        metadataFields:
            - string
        storageDestinationOptions:
            bucket: string
            destinationPath: string
        storageFilters:
            bucket: string
    project: string
InsightsReportConfig Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The InsightsReportConfig resource accepts the following input properties:
- CsvOptions InsightsReport Config Csv Options 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- Location string
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- DisplayName string
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- FrequencyOptions InsightsReport Config Frequency Options 
- Options for configuring how inventory reports are generated.
- ObjectMetadata InsightsReport Options Report Config Object Metadata Report Options 
- Options for including metadata in an inventory report.
- Project string
- CsvOptions InsightsReport Config Csv Options Args 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- Location string
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- DisplayName string
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- FrequencyOptions InsightsReport Config Frequency Options Args 
- Options for configuring how inventory reports are generated.
- ObjectMetadata InsightsReport Options Report Config Object Metadata Report Options Args 
- Options for including metadata in an inventory report.
- Project string
- csvOptions InsightsReport Config Csv Options 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- location String
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- displayName String
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- frequencyOptions InsightsReport Config Frequency Options 
- Options for configuring how inventory reports are generated.
- objectMetadata InsightsReport Options Report Config Object Metadata Report Options 
- Options for including metadata in an inventory report.
- project String
- csvOptions InsightsReport Config Csv Options 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- location string
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- displayName string
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- frequencyOptions InsightsReport Config Frequency Options 
- Options for configuring how inventory reports are generated.
- objectMetadata InsightsReport Options Report Config Object Metadata Report Options 
- Options for including metadata in an inventory report.
- project string
- csv_options InsightsReport Config Csv Options Args 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- location str
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- display_name str
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- frequency_options InsightsReport Config Frequency Options Args 
- Options for configuring how inventory reports are generated.
- object_metadata_ Insightsreport_ options Report Config Object Metadata Report Options Args 
- Options for including metadata in an inventory report.
- project str
- csvOptions Property Map
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- location String
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- displayName String
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- frequencyOptions Property Map
- Options for configuring how inventory reports are generated.
- objectMetadata Property MapReport Options 
- Options for including metadata in an inventory report.
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the InsightsReportConfig resource produces the following output properties:
Look up Existing InsightsReportConfig Resource
Get an existing InsightsReportConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: InsightsReportConfigState, opts?: CustomResourceOptions): InsightsReportConfig@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        csv_options: Optional[InsightsReportConfigCsvOptionsArgs] = None,
        display_name: Optional[str] = None,
        frequency_options: Optional[InsightsReportConfigFrequencyOptionsArgs] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        object_metadata_report_options: Optional[InsightsReportConfigObjectMetadataReportOptionsArgs] = None,
        project: Optional[str] = None) -> InsightsReportConfigfunc GetInsightsReportConfig(ctx *Context, name string, id IDInput, state *InsightsReportConfigState, opts ...ResourceOption) (*InsightsReportConfig, error)public static InsightsReportConfig Get(string name, Input<string> id, InsightsReportConfigState? state, CustomResourceOptions? opts = null)public static InsightsReportConfig get(String name, Output<String> id, InsightsReportConfigState state, CustomResourceOptions options)resources:  _:    type: gcp:storage:InsightsReportConfig    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- CsvOptions InsightsReport Config Csv Options 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- DisplayName string
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- FrequencyOptions InsightsReport Config Frequency Options 
- Options for configuring how inventory reports are generated.
- Location string
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- Name string
- The UUID of the inventory report configuration.
- ObjectMetadata InsightsReport Options Report Config Object Metadata Report Options 
- Options for including metadata in an inventory report.
- Project string
- CsvOptions InsightsReport Config Csv Options Args 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- DisplayName string
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- FrequencyOptions InsightsReport Config Frequency Options Args 
- Options for configuring how inventory reports are generated.
- Location string
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- Name string
- The UUID of the inventory report configuration.
- ObjectMetadata InsightsReport Options Report Config Object Metadata Report Options Args 
- Options for including metadata in an inventory report.
- Project string
- csvOptions InsightsReport Config Csv Options 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- displayName String
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- frequencyOptions InsightsReport Config Frequency Options 
- Options for configuring how inventory reports are generated.
- location String
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- name String
- The UUID of the inventory report configuration.
- objectMetadata InsightsReport Options Report Config Object Metadata Report Options 
- Options for including metadata in an inventory report.
- project String
- csvOptions InsightsReport Config Csv Options 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- displayName string
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- frequencyOptions InsightsReport Config Frequency Options 
- Options for configuring how inventory reports are generated.
- location string
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- name string
- The UUID of the inventory report configuration.
- objectMetadata InsightsReport Options Report Config Object Metadata Report Options 
- Options for including metadata in an inventory report.
- project string
- csv_options InsightsReport Config Csv Options Args 
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- display_name str
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- frequency_options InsightsReport Config Frequency Options Args 
- Options for configuring how inventory reports are generated.
- location str
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- name str
- The UUID of the inventory report configuration.
- object_metadata_ Insightsreport_ options Report Config Object Metadata Report Options Args 
- Options for including metadata in an inventory report.
- project str
- csvOptions Property Map
- Options for configuring the format of the inventory report CSV file. Structure is documented below.
- displayName String
- The editable display name of the inventory report configuration. Has a limit of 256 characters. Can be empty.
- frequencyOptions Property Map
- Options for configuring how inventory reports are generated.
- location String
- The location of the ReportConfig. The source and destination buckets specified in the ReportConfig must be in the same location.
- name String
- The UUID of the inventory report configuration.
- objectMetadata Property MapReport Options 
- Options for including metadata in an inventory report.
- project String
Supporting Types
InsightsReportConfigCsvOptions, InsightsReportConfigCsvOptionsArgs          
- Delimiter string
- The delimiter used to separate the fields in the inventory report CSV file.
- HeaderRequired bool
- The boolean that indicates whether or not headers are included in the inventory report CSV file.
- RecordSeparator string
- The character used to separate the records in the inventory report CSV file.
- Delimiter string
- The delimiter used to separate the fields in the inventory report CSV file.
- HeaderRequired bool
- The boolean that indicates whether or not headers are included in the inventory report CSV file.
- RecordSeparator string
- The character used to separate the records in the inventory report CSV file.
- delimiter String
- The delimiter used to separate the fields in the inventory report CSV file.
- headerRequired Boolean
- The boolean that indicates whether or not headers are included in the inventory report CSV file.
- recordSeparator String
- The character used to separate the records in the inventory report CSV file.
- delimiter string
- The delimiter used to separate the fields in the inventory report CSV file.
- headerRequired boolean
- The boolean that indicates whether or not headers are included in the inventory report CSV file.
- recordSeparator string
- The character used to separate the records in the inventory report CSV file.
- delimiter str
- The delimiter used to separate the fields in the inventory report CSV file.
- header_required bool
- The boolean that indicates whether or not headers are included in the inventory report CSV file.
- record_separator str
- The character used to separate the records in the inventory report CSV file.
- delimiter String
- The delimiter used to separate the fields in the inventory report CSV file.
- headerRequired Boolean
- The boolean that indicates whether or not headers are included in the inventory report CSV file.
- recordSeparator String
- The character used to separate the records in the inventory report CSV file.
InsightsReportConfigFrequencyOptions, InsightsReportConfigFrequencyOptionsArgs          
- EndDate InsightsReport Config Frequency Options End Date 
- The date to stop generating inventory reports. For example, {"day": 15, "month": 9, "year": 2022}. Structure is documented below.
- Frequency string
- The frequency in which inventory reports are generated. Values are DAILY or WEEKLY.
Possible values are: DAILY,WEEKLY.
- StartDate InsightsReport Config Frequency Options Start Date 
- The date to start generating inventory reports. For example, {"day": 15, "month": 8, "year": 2022}. Structure is documented below.
- EndDate InsightsReport Config Frequency Options End Date 
- The date to stop generating inventory reports. For example, {"day": 15, "month": 9, "year": 2022}. Structure is documented below.
- Frequency string
- The frequency in which inventory reports are generated. Values are DAILY or WEEKLY.
Possible values are: DAILY,WEEKLY.
- StartDate InsightsReport Config Frequency Options Start Date 
- The date to start generating inventory reports. For example, {"day": 15, "month": 8, "year": 2022}. Structure is documented below.
- endDate InsightsReport Config Frequency Options End Date 
- The date to stop generating inventory reports. For example, {"day": 15, "month": 9, "year": 2022}. Structure is documented below.
- frequency String
- The frequency in which inventory reports are generated. Values are DAILY or WEEKLY.
Possible values are: DAILY,WEEKLY.
- startDate InsightsReport Config Frequency Options Start Date 
- The date to start generating inventory reports. For example, {"day": 15, "month": 8, "year": 2022}. Structure is documented below.
- endDate InsightsReport Config Frequency Options End Date 
- The date to stop generating inventory reports. For example, {"day": 15, "month": 9, "year": 2022}. Structure is documented below.
- frequency string
- The frequency in which inventory reports are generated. Values are DAILY or WEEKLY.
Possible values are: DAILY,WEEKLY.
- startDate InsightsReport Config Frequency Options Start Date 
- The date to start generating inventory reports. For example, {"day": 15, "month": 8, "year": 2022}. Structure is documented below.
- end_date InsightsReport Config Frequency Options End Date 
- The date to stop generating inventory reports. For example, {"day": 15, "month": 9, "year": 2022}. Structure is documented below.
- frequency str
- The frequency in which inventory reports are generated. Values are DAILY or WEEKLY.
Possible values are: DAILY,WEEKLY.
- start_date InsightsReport Config Frequency Options Start Date 
- The date to start generating inventory reports. For example, {"day": 15, "month": 8, "year": 2022}. Structure is documented below.
- endDate Property Map
- The date to stop generating inventory reports. For example, {"day": 15, "month": 9, "year": 2022}. Structure is documented below.
- frequency String
- The frequency in which inventory reports are generated. Values are DAILY or WEEKLY.
Possible values are: DAILY,WEEKLY.
- startDate Property Map
- The date to start generating inventory reports. For example, {"day": 15, "month": 8, "year": 2022}. Structure is documented below.
InsightsReportConfigFrequencyOptionsEndDate, InsightsReportConfigFrequencyOptionsEndDateArgs              
InsightsReportConfigFrequencyOptionsStartDate, InsightsReportConfigFrequencyOptionsStartDateArgs              
InsightsReportConfigObjectMetadataReportOptions, InsightsReportConfigObjectMetadataReportOptionsArgs              
- MetadataFields List<string>
- The metadata fields included in an inventory report.
- StorageDestination InsightsOptions Report Config Object Metadata Report Options Storage Destination Options 
- Options for where the inventory reports are stored. Structure is documented below.
- StorageFilters InsightsReport Config Object Metadata Report Options Storage Filters 
- A nested object resource. Structure is documented below.
- MetadataFields []string
- The metadata fields included in an inventory report.
- StorageDestination InsightsOptions Report Config Object Metadata Report Options Storage Destination Options 
- Options for where the inventory reports are stored. Structure is documented below.
- StorageFilters InsightsReport Config Object Metadata Report Options Storage Filters 
- A nested object resource. Structure is documented below.
- metadataFields List<String>
- The metadata fields included in an inventory report.
- storageDestination InsightsOptions Report Config Object Metadata Report Options Storage Destination Options 
- Options for where the inventory reports are stored. Structure is documented below.
- storageFilters InsightsReport Config Object Metadata Report Options Storage Filters 
- A nested object resource. Structure is documented below.
- metadataFields string[]
- The metadata fields included in an inventory report.
- storageDestination InsightsOptions Report Config Object Metadata Report Options Storage Destination Options 
- Options for where the inventory reports are stored. Structure is documented below.
- storageFilters InsightsReport Config Object Metadata Report Options Storage Filters 
- A nested object resource. Structure is documented below.
- metadata_fields Sequence[str]
- The metadata fields included in an inventory report.
- storage_destination_ Insightsoptions Report Config Object Metadata Report Options Storage Destination Options 
- Options for where the inventory reports are stored. Structure is documented below.
- storage_filters InsightsReport Config Object Metadata Report Options Storage Filters 
- A nested object resource. Structure is documented below.
- metadataFields List<String>
- The metadata fields included in an inventory report.
- storageDestination Property MapOptions 
- Options for where the inventory reports are stored. Structure is documented below.
- storageFilters Property Map
- A nested object resource. Structure is documented below.
InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptions, InsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsArgs                    
- Bucket string
- The destination bucket that stores the generated inventory reports.
- DestinationPath string
- The path within the destination bucket to store generated inventory reports.
- Bucket string
- The destination bucket that stores the generated inventory reports.
- DestinationPath string
- The path within the destination bucket to store generated inventory reports.
- bucket String
- The destination bucket that stores the generated inventory reports.
- destinationPath String
- The path within the destination bucket to store generated inventory reports.
- bucket string
- The destination bucket that stores the generated inventory reports.
- destinationPath string
- The path within the destination bucket to store generated inventory reports.
- bucket str
- The destination bucket that stores the generated inventory reports.
- destination_path str
- The path within the destination bucket to store generated inventory reports.
- bucket String
- The destination bucket that stores the generated inventory reports.
- destinationPath String
- The path within the destination bucket to store generated inventory reports.
InsightsReportConfigObjectMetadataReportOptionsStorageFilters, InsightsReportConfigObjectMetadataReportOptionsStorageFiltersArgs                  
- Bucket string
- The filter to use when specifying which bucket to generate inventory reports for.
- Bucket string
- The filter to use when specifying which bucket to generate inventory reports for.
- bucket String
- The filter to use when specifying which bucket to generate inventory reports for.
- bucket string
- The filter to use when specifying which bucket to generate inventory reports for.
- bucket str
- The filter to use when specifying which bucket to generate inventory reports for.
- bucket String
- The filter to use when specifying which bucket to generate inventory reports for.
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:
$ 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}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.