"use strict";
// *** 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.EventThreatDetectionCustomModule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * Represents an instance of an Event Threat Detection custom module, including
 * its full module name, display name, enablement state, andlast updated time.
 * You can create a custom module at the organization level only.
 *
 * To get more information about EventThreatDetectionCustomModule, see:
 *
 * * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v1/organizations.eventThreatDetectionSettings.customModules)
 * * How-to Guides
 *     * [Overview of custom modules for Event Threat Detection](https://cloud.google.com/security-command-center/docs/custom-modules-etd-overview)
 *
 * ## Example Usage
 *
 * ### Scc Event Threat Detection Custom Module
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const example = new gcp.securitycenter.EventThreatDetectionCustomModule("example", {
 *     organization: "123456789",
 *     displayName: "basic_custom_module",
 *     enablementState: "ENABLED",
 *     type: "CONFIGURABLE_BAD_IP",
 *     description: "My Event Threat Detection Custom Module",
 *     config: JSON.stringify({
 *         metadata: {
 *             severity: "LOW",
 *             description: "Flagged by Forcepoint as malicious",
 *             recommendation: "Contact the owner of the relevant project.",
 *         },
 *         ips: [
 *             "192.0.2.1",
 *             "192.0.2.0/24",
 *         ],
 *     }),
 * });
 * ```
 *
 * ## Import
 *
 * EventThreatDetectionCustomModule can be imported using any of these accepted formats:
 *
 * * `organizations/{{organization}}/eventThreatDetectionSettings/customModules/{{name}}`
 *
 * * `{{organization}}/{{name}}`
 *
 * When using the `pulumi import` command, EventThreatDetectionCustomModule can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/eventThreatDetectionCustomModule:EventThreatDetectionCustomModule default organizations/{{organization}}/eventThreatDetectionSettings/customModules/{{name}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/eventThreatDetectionCustomModule:EventThreatDetectionCustomModule default {{organization}}/{{name}}
 * ```
 */
class EventThreatDetectionCustomModule extends pulumi.CustomResource {
    /**
     * Get an existing EventThreatDetectionCustomModule 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 EventThreatDetectionCustomModule(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of EventThreatDetectionCustomModule.  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'] === EventThreatDetectionCustomModule.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["config"] = state?.config;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["enablementState"] = state?.enablementState;
            resourceInputs["lastEditor"] = state?.lastEditor;
            resourceInputs["name"] = state?.name;
            resourceInputs["organization"] = state?.organization;
            resourceInputs["type"] = state?.type;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.config === undefined && !opts.urn) {
                throw new Error("Missing required property 'config'");
            }
            if (args?.enablementState === undefined && !opts.urn) {
                throw new Error("Missing required property 'enablementState'");
            }
            if (args?.organization === undefined && !opts.urn) {
                throw new Error("Missing required property 'organization'");
            }
            if (args?.type === undefined && !opts.urn) {
                throw new Error("Missing required property 'type'");
            }
            resourceInputs["config"] = args?.config;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["enablementState"] = args?.enablementState;
            resourceInputs["organization"] = args?.organization;
            resourceInputs["type"] = args?.type;
            resourceInputs["lastEditor"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(EventThreatDetectionCustomModule.__pulumiType, name, resourceInputs, opts);
    }
}
exports.EventThreatDetectionCustomModule = EventThreatDetectionCustomModule;
/** @internal */
EventThreatDetectionCustomModule.__pulumiType = 'gcp:securitycenter/eventThreatDetectionCustomModule:EventThreatDetectionCustomModule';
//# sourceMappingURL=eventThreatDetectionCustomModule.js.map