"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.FolderNotificationConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * A Cloud Security Command Center (Cloud SCC) notification configs. A
 * notification config is a Cloud SCC resource that contains the
 * configuration to send notifications for create/update events of
 * findings, assets and etc.
 * > **Note:** In order to use Cloud SCC resources, your organization must be enrolled
 * in [SCC Standard/Premium](https://cloud.google.com/security-command-center/docs/quickstart-security-command-center).
 * Without doing so, you may run into errors during resource creation.
 *
 * To get more information about FolderNotificationConfig, see:
 *
 * * [API documentation](https://cloud.google.com/security-command-center/docs/reference/rest/v1/folders.notificationConfigs)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/security-command-center/docs)
 *
 * ## Example Usage
 *
 * ### Scc Folder Notification Config Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const folder = new gcp.organizations.Folder("folder", {
 *     parent: "organizations/123456789",
 *     displayName: "folder-name",
 * });
 * const sccFolderNotificationConfig = new gcp.pubsub.Topic("scc_folder_notification_config", {name: "my-topic"});
 * const customNotificationConfig = new gcp.securitycenter.FolderNotificationConfig("custom_notification_config", {
 *     configId: "my-config",
 *     folder: folder.folderId,
 *     location: "global",
 *     description: "My custom Cloud Security Command Center Finding Notification Configuration",
 *     pubsubTopic: sccFolderNotificationConfig.id,
 *     streamingConfig: {
 *         filter: "category = \"OPEN_FIREWALL\" AND state = \"ACTIVE\"",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * FolderNotificationConfig can be imported using any of these accepted formats:
 *
 * * `folders/{{folder}}/notificationConfigs/{{config_id}}`
 *
 * * `{{folder}}/{{config_id}}`
 *
 * When using the `pulumi import` command, FolderNotificationConfig can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/folderNotificationConfig:FolderNotificationConfig default folders/{{folder}}/notificationConfigs/{{config_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:securitycenter/folderNotificationConfig:FolderNotificationConfig default {{folder}}/{{config_id}}
 * ```
 */
class FolderNotificationConfig extends pulumi.CustomResource {
    /**
     * Get an existing FolderNotificationConfig 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 FolderNotificationConfig(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of FolderNotificationConfig.  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'] === FolderNotificationConfig.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["configId"] = state?.configId;
            resourceInputs["description"] = state?.description;
            resourceInputs["folder"] = state?.folder;
            resourceInputs["name"] = state?.name;
            resourceInputs["pubsubTopic"] = state?.pubsubTopic;
            resourceInputs["serviceAccount"] = state?.serviceAccount;
            resourceInputs["streamingConfig"] = state?.streamingConfig;
        }
        else {
            const args = argsOrState;
            if (args?.configId === undefined && !opts.urn) {
                throw new Error("Missing required property 'configId'");
            }
            if (args?.folder === undefined && !opts.urn) {
                throw new Error("Missing required property 'folder'");
            }
            if (args?.pubsubTopic === undefined && !opts.urn) {
                throw new Error("Missing required property 'pubsubTopic'");
            }
            if (args?.streamingConfig === undefined && !opts.urn) {
                throw new Error("Missing required property 'streamingConfig'");
            }
            resourceInputs["configId"] = args?.configId;
            resourceInputs["description"] = args?.description;
            resourceInputs["folder"] = args?.folder;
            resourceInputs["pubsubTopic"] = args?.pubsubTopic;
            resourceInputs["streamingConfig"] = args?.streamingConfig;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["serviceAccount"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(FolderNotificationConfig.__pulumiType, name, resourceInputs, opts);
    }
}
exports.FolderNotificationConfig = FolderNotificationConfig;
/** @internal */
FolderNotificationConfig.__pulumiType = 'gcp:securitycenter/folderNotificationConfig:FolderNotificationConfig';
//# sourceMappingURL=folderNotificationConfig.js.map