UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

146 lines 7.28 kB
"use strict"; // *** 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.MirroringDeploymentGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * A deployment group aggregates many zonal mirroring backends (deployments) * into a single global mirroring service. Consumers can connect this service * using an endpoint group. * * To get more information about MirroringDeploymentGroup, see: * * * [API documentation](https://cloud.google.com/network-security-integration/docs/reference/rest/v1/projects.locations.mirroringDeploymentGroups) * * How-to Guides * * [Mirroring deployment group overview](https://cloud.google.com/network-security-integration/docs/out-of-band/deployment-groups-overview) * * ## Example Usage * * ### Network Security Mirroring Deployment 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 _default = new gcp.networksecurity.MirroringDeploymentGroup("default", { * mirroringDeploymentGroupId: "example-dg", * location: "global", * network: network.id, * description: "some description", * labels: { * foo: "bar", * }, * }); * ``` * * ## Import * * MirroringDeploymentGroup can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/mirroringDeploymentGroups/{{mirroring_deployment_group_id}}` * * * `{{project}}/{{location}}/{{mirroring_deployment_group_id}}` * * * `{{location}}/{{mirroring_deployment_group_id}}` * * When using the `pulumi import` command, MirroringDeploymentGroup can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:networksecurity/mirroringDeploymentGroup:MirroringDeploymentGroup default projects/{{project}}/locations/{{location}}/mirroringDeploymentGroups/{{mirroring_deployment_group_id}} * ``` * * ```sh * $ pulumi import gcp:networksecurity/mirroringDeploymentGroup:MirroringDeploymentGroup default {{project}}/{{location}}/{{mirroring_deployment_group_id}} * ``` * * ```sh * $ pulumi import gcp:networksecurity/mirroringDeploymentGroup:MirroringDeploymentGroup default {{location}}/{{mirroring_deployment_group_id}} * ``` */ class MirroringDeploymentGroup extends pulumi.CustomResource { /** * Get an existing MirroringDeploymentGroup 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 MirroringDeploymentGroup(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MirroringDeploymentGroup. 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'] === MirroringDeploymentGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["connectedEndpointGroups"] = state ? state.connectedEndpointGroups : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["locations"] = state ? state.locations : undefined; resourceInputs["mirroringDeploymentGroupId"] = state ? state.mirroringDeploymentGroupId : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["network"] = state ? state.network : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined; resourceInputs["reconciling"] = state ? state.reconciling : undefined; resourceInputs["state"] = state ? state.state : 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.mirroringDeploymentGroupId === undefined) && !opts.urn) { throw new Error("Missing required property 'mirroringDeploymentGroupId'"); } if ((!args || args.network === undefined) && !opts.urn) { throw new Error("Missing required property 'network'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["mirroringDeploymentGroupId"] = args ? args.mirroringDeploymentGroupId : undefined; resourceInputs["network"] = args ? args.network : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["connectedEndpointGroups"] = undefined /*out*/; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["effectiveLabels"] = undefined /*out*/; resourceInputs["locations"] = 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(MirroringDeploymentGroup.__pulumiType, name, resourceInputs, opts); } } exports.MirroringDeploymentGroup = MirroringDeploymentGroup; /** @internal */ MirroringDeploymentGroup.__pulumiType = 'gcp:networksecurity/mirroringDeploymentGroup:MirroringDeploymentGroup'; //# sourceMappingURL=mirroringDeploymentGroup.js.map