@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
108 lines • 4.95 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** 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, { ...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?.actions;
resourceInputs["createTime"] = state?.createTime;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["errors"] = state?.errors;
resourceInputs["inspectTemplates"] = state?.inspectTemplates;
resourceInputs["lastRunTime"] = state?.lastRunTime;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["orgConfig"] = state?.orgConfig;
resourceInputs["parent"] = state?.parent;
resourceInputs["status"] = state?.status;
resourceInputs["targets"] = state?.targets;
resourceInputs["updateTime"] = state?.updateTime;
}
else {
const args = argsOrState;
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if (args?.parent === undefined && !opts.urn) {
throw new Error("Missing required property 'parent'");
}
resourceInputs["actions"] = args?.actions;
resourceInputs["displayName"] = args?.displayName;
resourceInputs["inspectTemplates"] = args?.inspectTemplates;
resourceInputs["location"] = args?.location;
resourceInputs["orgConfig"] = args?.orgConfig;
resourceInputs["parent"] = args?.parent;
resourceInputs["status"] = args?.status;
resourceInputs["targets"] = args?.targets;
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
;