"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.MirroringEndpointGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An endpoint group is a consumer frontend for a deployment group (backend).
 * In order to configure mirroring for a network, consumers must create:
 * - An association between their network and the endpoint group.
 * - A security profile that points to the endpoint group.
 * - A mirroring rule that references the security profile (group).
 *
 * To get more information about MirroringEndpointGroup, see:
 *
 * * [API documentation](https://cloud.google.com/network-security-integration/docs/reference/rest/v1/projects.locations.mirroringEndpointGroups)
 * * How-to Guides
 *     * [Mirroring endpoint group overview](https://cloud.google.com/network-security-integration/docs/out-of-band/endpoint-groups-overview)
 *
 * ## Example Usage
 *
 * ### Network Security Mirroring Endpoint Group Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const network = new gcp.compute.Network("network", {
 *     name: "example-network",
 *     autoCreateSubnetworks: false,
 * });
 * const deploymentGroup = new gcp.networksecurity.MirroringDeploymentGroup("deployment_group", {
 *     mirroringDeploymentGroupId: "example-dg",
 *     location: "global",
 *     network: network.id,
 * });
 * const _default = new gcp.networksecurity.MirroringEndpointGroup("default", {
 *     mirroringEndpointGroupId: "example-eg",
 *     location: "global",
 *     mirroringDeploymentGroup: deploymentGroup.id,
 *     description: "some description",
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ### Network Security Mirroring Endpoint Group Broker Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const network = new gcp.compute.Network("network", {
 *     name: "example-network",
 *     autoCreateSubnetworks: false,
 * });
 * const deploymentGroup = new gcp.networksecurity.MirroringDeploymentGroup("deployment_group", {
 *     mirroringDeploymentGroupId: "example-dg",
 *     location: "global",
 *     network: network.id,
 * });
 * const _default = new gcp.networksecurity.MirroringEndpointGroup("default", {
 *     mirroringEndpointGroupId: "example-eg",
 *     location: "global",
 *     type: "BROKER",
 *     mirroringDeploymentGroups: [deploymentGroup.id],
 *     description: "some description",
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 *
 * ## Import
 *
 * MirroringEndpointGroup can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/mirroringEndpointGroups/{{mirroring_endpoint_group_id}}`
 *
 * * `{{project}}/{{location}}/{{mirroring_endpoint_group_id}}`
 *
 * * `{{location}}/{{mirroring_endpoint_group_id}}`
 *
 * When using the `pulumi import` command, MirroringEndpointGroup can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringEndpointGroup:MirroringEndpointGroup default projects/{{project}}/locations/{{location}}/mirroringEndpointGroups/{{mirroring_endpoint_group_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringEndpointGroup:MirroringEndpointGroup default {{project}}/{{location}}/{{mirroring_endpoint_group_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringEndpointGroup:MirroringEndpointGroup default {{location}}/{{mirroring_endpoint_group_id}}
 * ```
 */
class MirroringEndpointGroup extends pulumi.CustomResource {
    /**
     * Get an existing MirroringEndpointGroup 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 MirroringEndpointGroup(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of MirroringEndpointGroup.  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'] === MirroringEndpointGroup.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["associations"] = state?.associations;
            resourceInputs["connectedDeploymentGroups"] = state?.connectedDeploymentGroups;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["description"] = state?.description;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["mirroringDeploymentGroup"] = state?.mirroringDeploymentGroup;
            resourceInputs["mirroringDeploymentGroups"] = state?.mirroringDeploymentGroups;
            resourceInputs["mirroringEndpointGroupId"] = state?.mirroringEndpointGroupId;
            resourceInputs["name"] = state?.name;
            resourceInputs["project"] = state?.project;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
            resourceInputs["reconciling"] = state?.reconciling;
            resourceInputs["state"] = state?.state;
            resourceInputs["type"] = state?.type;
            resourceInputs["updateTime"] = state?.updateTime;
        }
        else {
            const args = argsOrState;
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.mirroringEndpointGroupId === undefined && !opts.urn) {
                throw new Error("Missing required property 'mirroringEndpointGroupId'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["mirroringDeploymentGroup"] = args?.mirroringDeploymentGroup;
            resourceInputs["mirroringDeploymentGroups"] = args?.mirroringDeploymentGroups;
            resourceInputs["mirroringEndpointGroupId"] = args?.mirroringEndpointGroupId;
            resourceInputs["project"] = args?.project;
            resourceInputs["type"] = args?.type;
            resourceInputs["associations"] = undefined /*out*/;
            resourceInputs["connectedDeploymentGroups"] = undefined /*out*/;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
            resourceInputs["reconciling"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["updateTime"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(MirroringEndpointGroup.__pulumiType, name, resourceInputs, opts);
    }
}
exports.MirroringEndpointGroup = MirroringEndpointGroup;
/** @internal */
MirroringEndpointGroup.__pulumiType = 'gcp:networksecurity/mirroringEndpointGroup:MirroringEndpointGroup';
//# sourceMappingURL=mirroringEndpointGroup.js.map