@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
108 lines • 5.41 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.PreventionDiscoveryConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Configuration for discovery to scan resources for profile generation. Only one discovery configuration may exist per organization, folder, or project.
*
* To get more information about DiscoveryConfig, see:
*
* * [API documentation](https://cloud.google.com/dlp/docs/reference/rest/v2/projects.locations.discoveryConfigs)
* * How-to Guides
* * [Schedule inspection scan](https://cloud.google.com/dlp/docs/schedule-inspection-scan)
*
* ## Example Usage
*
* ## Import
*
* DiscoveryConfig can be imported using any of these accepted formats:
*
* * `{{parent}}/discoveryConfigs/{{name}}`
*
* * `{{parent}}/{{name}}`
*
* When using the `pulumi import` command, DiscoveryConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:dataloss/preventionDiscoveryConfig:PreventionDiscoveryConfig default {{parent}}/discoveryConfigs/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:dataloss/preventionDiscoveryConfig:PreventionDiscoveryConfig default {{parent}}/{{name}}
* ```
*/
class PreventionDiscoveryConfig extends pulumi.CustomResource {
/**
* Get an existing PreventionDiscoveryConfig 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, id, state, opts) {
return new PreventionDiscoveryConfig(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of PreventionDiscoveryConfig. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === PreventionDiscoveryConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["actions"] = state ? state.actions : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["errors"] = state ? state.errors : undefined;
resourceInputs["inspectTemplates"] = state ? state.inspectTemplates : undefined;
resourceInputs["lastRunTime"] = state ? state.lastRunTime : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["orgConfig"] = state ? state.orgConfig : undefined;
resourceInputs["parent"] = state ? state.parent : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["targets"] = state ? state.targets : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
}
else {
const args = argsOrState;
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.parent === undefined) && !opts.urn) {
throw new Error("Missing required property 'parent'");
}
resourceInputs["actions"] = args ? args.actions : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["inspectTemplates"] = args ? args.inspectTemplates : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["orgConfig"] = args ? args.orgConfig : undefined;
resourceInputs["parent"] = args ? args.parent : undefined;
resourceInputs["status"] = args ? args.status : undefined;
resourceInputs["targets"] = args ? args.targets : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["errors"] = undefined /*out*/;
resourceInputs["lastRunTime"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PreventionDiscoveryConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.PreventionDiscoveryConfig = PreventionDiscoveryConfig;
/** @internal */
PreventionDiscoveryConfig.__pulumiType = 'gcp:dataloss/preventionDiscoveryConfig:PreventionDiscoveryConfig';
//# sourceMappingURL=preventionDiscoveryConfig.js.map