UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

402 lines (401 loc) • 15.7 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Represents a Storage Insights DatasetConfig. * * To get more information about DatasetConfig, see: * * * [API documentation](https://cloud.google.com/storage/docs/insights/reference/rest/v1/projects.locations.datasetConfigs) * * How-to Guides * * [Official Documentation](https://cloud.google.com/storage/docs/insights/datasets) * * ## Example Usage * * ### Storage Insights Dataset Config Includes * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const configIncludes = new gcp.storage.InsightsDatasetConfig("config_includes", { * location: "us-central1", * datasetConfigId: "my_config_includes", * retentionPeriodDays: 1, * sourceProjects: { * projectNumbers: [ * "123", * "456", * "789", * ], * }, * identity: { * type: "IDENTITY_TYPE_PER_CONFIG", * }, * description: "Sample Description", * linkDataset: false, * includeNewlyCreatedBuckets: true, * includeCloudStorageLocations: { * locations: ["us-east1"], * }, * includeCloudStorageBuckets: { * cloudStorageBuckets: [ * { * bucketName: "sample-bucket", * }, * { * bucketName: "sample-regex", * }, * ], * }, * }); * ``` * ### Storage Insights Dataset Config Excludes * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const configExcludes = new gcp.storage.InsightsDatasetConfig("config_excludes", { * location: "us-central1", * datasetConfigId: "my_config_excludes", * retentionPeriodDays: 1, * organizationScope: true, * identity: { * type: "IDENTITY_TYPE_PER_PROJECT", * }, * excludeCloudStorageLocations: { * locations: ["us-east1"], * }, * excludeCloudStorageBuckets: { * cloudStorageBuckets: [ * { * bucketName: "sample-bucket", * }, * { * bucketName: "sample-regex", * }, * ], * }, * }); * ``` * * ## Import * * DatasetConfig can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/datasetConfigs/{{dataset_config_id}}` * * * `{{project}}/{{location}}/{{dataset_config_id}}` * * * `{{location}}/{{dataset_config_id}}` * * When using the `pulumi import` command, DatasetConfig can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:storage/insightsDatasetConfig:InsightsDatasetConfig default projects/{{project}}/locations/{{location}}/datasetConfigs/{{dataset_config_id}} * ``` * * ```sh * $ pulumi import gcp:storage/insightsDatasetConfig:InsightsDatasetConfig default {{project}}/{{location}}/{{dataset_config_id}} * ``` * * ```sh * $ pulumi import gcp:storage/insightsDatasetConfig:InsightsDatasetConfig default {{location}}/{{dataset_config_id}} * ``` */ export declare class InsightsDatasetConfig extends pulumi.CustomResource { /** * Get an existing InsightsDatasetConfig 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?: InsightsDatasetConfigState, opts?: pulumi.CustomResourceOptions): InsightsDatasetConfig; /** * Returns true if the given object is an instance of InsightsDatasetConfig. 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 InsightsDatasetConfig; /** * The UTC time at which the DatasetConfig was created. This is auto-populated. */ readonly createTime: pulumi.Output<string>; /** * The user-defined ID of the DatasetConfig */ readonly datasetConfigId: pulumi.Output<string>; /** * State of the DatasetConfig. */ readonly datasetConfigState: pulumi.Output<string>; /** * An optional user-provided description for the dataset configuration with a maximum length of 256 characters. */ readonly description: pulumi.Output<string | undefined>; /** * Defined the options for excluding cloud storage buckets for the DatasetConfig. * Structure is documented below. */ readonly excludeCloudStorageBuckets: pulumi.Output<outputs.storage.InsightsDatasetConfigExcludeCloudStorageBuckets | undefined>; /** * Defines the options for excluding cloud storage locations for the DatasetConfig. * Structure is documented below. */ readonly excludeCloudStorageLocations: pulumi.Output<outputs.storage.InsightsDatasetConfigExcludeCloudStorageLocations | undefined>; /** * Identity used by DatasetConfig. * Structure is documented below. */ readonly identity: pulumi.Output<outputs.storage.InsightsDatasetConfigIdentity>; /** * Defines the options for including cloud storage buckets for the DatasetConfig. * Structure is documented below. */ readonly includeCloudStorageBuckets: pulumi.Output<outputs.storage.InsightsDatasetConfigIncludeCloudStorageBuckets | undefined>; /** * Defines the options for including cloud storage locations for the DatasetConfig. * Structure is documented below. */ readonly includeCloudStorageLocations: pulumi.Output<outputs.storage.InsightsDatasetConfigIncludeCloudStorageLocations | undefined>; /** * If set to true, the request includes all the newly created buckets in the dataset that meet the inclusion and exclusion rules. */ readonly includeNewlyCreatedBuckets: pulumi.Output<boolean | undefined>; readonly linkDataset: pulumi.Output<boolean | undefined>; /** * Details of the linked DatasetConfig. * Structure is documented below. */ readonly links: pulumi.Output<outputs.storage.InsightsDatasetConfigLink[]>; /** * The location of the DatasetConfig. */ readonly location: pulumi.Output<string>; /** * The full canonical resource name of the DatasetConfig (e.g., projects/P/locations/L/datasetConfigs/ID). */ readonly name: pulumi.Output<string>; /** * Organization resource ID that the source projects should belong to. * Projects that do not belong to the provided organization are not considered when creating the dataset. */ readonly organizationNumber: pulumi.Output<string>; /** * Defines the options for providing a source organization for the DatasetConfig. */ readonly organizationScope: pulumi.Output<boolean | 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>; /** * Number of days of history that must be retained. */ readonly retentionPeriodDays: pulumi.Output<number>; /** * Defines the options for providing source folders for the DatasetConfig. * Structure is documented below. */ readonly sourceFolders: pulumi.Output<outputs.storage.InsightsDatasetConfigSourceFolders | undefined>; /** * Defines the options for providing source projects for the DatasetConfig. * Structure is documented below. */ readonly sourceProjects: pulumi.Output<outputs.storage.InsightsDatasetConfigSourceProjects | undefined>; /** * System generated unique identifier for the resource. */ readonly uid: pulumi.Output<string>; /** * The UTC time at which the DatasetConfig was updated. This is auto-populated. */ readonly updateTime: pulumi.Output<string>; /** * Create a InsightsDatasetConfig 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: InsightsDatasetConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering InsightsDatasetConfig resources. */ export interface InsightsDatasetConfigState { /** * The UTC time at which the DatasetConfig was created. This is auto-populated. */ createTime?: pulumi.Input<string>; /** * The user-defined ID of the DatasetConfig */ datasetConfigId?: pulumi.Input<string>; /** * State of the DatasetConfig. */ datasetConfigState?: pulumi.Input<string>; /** * An optional user-provided description for the dataset configuration with a maximum length of 256 characters. */ description?: pulumi.Input<string>; /** * Defined the options for excluding cloud storage buckets for the DatasetConfig. * Structure is documented below. */ excludeCloudStorageBuckets?: pulumi.Input<inputs.storage.InsightsDatasetConfigExcludeCloudStorageBuckets>; /** * Defines the options for excluding cloud storage locations for the DatasetConfig. * Structure is documented below. */ excludeCloudStorageLocations?: pulumi.Input<inputs.storage.InsightsDatasetConfigExcludeCloudStorageLocations>; /** * Identity used by DatasetConfig. * Structure is documented below. */ identity?: pulumi.Input<inputs.storage.InsightsDatasetConfigIdentity>; /** * Defines the options for including cloud storage buckets for the DatasetConfig. * Structure is documented below. */ includeCloudStorageBuckets?: pulumi.Input<inputs.storage.InsightsDatasetConfigIncludeCloudStorageBuckets>; /** * Defines the options for including cloud storage locations for the DatasetConfig. * Structure is documented below. */ includeCloudStorageLocations?: pulumi.Input<inputs.storage.InsightsDatasetConfigIncludeCloudStorageLocations>; /** * If set to true, the request includes all the newly created buckets in the dataset that meet the inclusion and exclusion rules. */ includeNewlyCreatedBuckets?: pulumi.Input<boolean>; linkDataset?: pulumi.Input<boolean>; /** * Details of the linked DatasetConfig. * Structure is documented below. */ links?: pulumi.Input<pulumi.Input<inputs.storage.InsightsDatasetConfigLink>[]>; /** * The location of the DatasetConfig. */ location?: pulumi.Input<string>; /** * The full canonical resource name of the DatasetConfig (e.g., projects/P/locations/L/datasetConfigs/ID). */ name?: pulumi.Input<string>; /** * Organization resource ID that the source projects should belong to. * Projects that do not belong to the provided organization are not considered when creating the dataset. */ organizationNumber?: pulumi.Input<string>; /** * Defines the options for providing a source organization for the DatasetConfig. */ organizationScope?: pulumi.Input<boolean>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * Number of days of history that must be retained. */ retentionPeriodDays?: pulumi.Input<number>; /** * Defines the options for providing source folders for the DatasetConfig. * Structure is documented below. */ sourceFolders?: pulumi.Input<inputs.storage.InsightsDatasetConfigSourceFolders>; /** * Defines the options for providing source projects for the DatasetConfig. * Structure is documented below. */ sourceProjects?: pulumi.Input<inputs.storage.InsightsDatasetConfigSourceProjects>; /** * System generated unique identifier for the resource. */ uid?: pulumi.Input<string>; /** * The UTC time at which the DatasetConfig was updated. This is auto-populated. */ updateTime?: pulumi.Input<string>; } /** * The set of arguments for constructing a InsightsDatasetConfig resource. */ export interface InsightsDatasetConfigArgs { /** * The user-defined ID of the DatasetConfig */ datasetConfigId: pulumi.Input<string>; /** * An optional user-provided description for the dataset configuration with a maximum length of 256 characters. */ description?: pulumi.Input<string>; /** * Defined the options for excluding cloud storage buckets for the DatasetConfig. * Structure is documented below. */ excludeCloudStorageBuckets?: pulumi.Input<inputs.storage.InsightsDatasetConfigExcludeCloudStorageBuckets>; /** * Defines the options for excluding cloud storage locations for the DatasetConfig. * Structure is documented below. */ excludeCloudStorageLocations?: pulumi.Input<inputs.storage.InsightsDatasetConfigExcludeCloudStorageLocations>; /** * Identity used by DatasetConfig. * Structure is documented below. */ identity: pulumi.Input<inputs.storage.InsightsDatasetConfigIdentity>; /** * Defines the options for including cloud storage buckets for the DatasetConfig. * Structure is documented below. */ includeCloudStorageBuckets?: pulumi.Input<inputs.storage.InsightsDatasetConfigIncludeCloudStorageBuckets>; /** * Defines the options for including cloud storage locations for the DatasetConfig. * Structure is documented below. */ includeCloudStorageLocations?: pulumi.Input<inputs.storage.InsightsDatasetConfigIncludeCloudStorageLocations>; /** * If set to true, the request includes all the newly created buckets in the dataset that meet the inclusion and exclusion rules. */ includeNewlyCreatedBuckets?: pulumi.Input<boolean>; linkDataset?: pulumi.Input<boolean>; /** * The location of the DatasetConfig. */ location: pulumi.Input<string>; /** * Organization resource ID that the source projects should belong to. * Projects that do not belong to the provided organization are not considered when creating the dataset. */ organizationNumber?: pulumi.Input<string>; /** * Defines the options for providing a source organization for the DatasetConfig. */ organizationScope?: pulumi.Input<boolean>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * Number of days of history that must be retained. */ retentionPeriodDays: pulumi.Input<number>; /** * Defines the options for providing source folders for the DatasetConfig. * Structure is documented below. */ sourceFolders?: pulumi.Input<inputs.storage.InsightsDatasetConfigSourceFolders>; /** * Defines the options for providing source projects for the DatasetConfig. * Structure is documented below. */ sourceProjects?: pulumi.Input<inputs.storage.InsightsDatasetConfigSourceProjects>; }