UNPKG

@pulumi/gcp

Version:

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

178 lines • 7.79 kB
"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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.WireGroup = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("../utilities")); /** * The WireGroup resource represents a group of redundant wires between interconnects in two different metros. Each WireGroup belongs to a CrossSiteNetwork. A wire group defines endpoints and the wires which exist between them. * * To get more information about WireGroup, see: * * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/wireGroups) * * How-to Guides * * [Create a WireGroup](https://cloud.google.com/network-connectivity/docs/interconnect/how-to/cross-site/modify-network#add-wire-group) * * ## Example Usage * * ### Compute Wire Group Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = gcp.organizations.getProject({}); * const example_cross_site_network = new gcp.compute.CrossSiteNetwork("example-cross-site-network", { * name: "test-cross-site-network", * description: "Example cross site network", * }); * const example_test_wire_group = new gcp.compute.WireGroup("example-test-wire-group", { * name: "test-wire-group", * description: "Example Wire Group", * crossSiteNetwork: "test-cross-site-network", * wireProperties: { * bandwidthUnmetered: 10, * faultResponse: "NONE", * bandwidthAllocation: "ALLOCATE_PER_WIRE", * }, * adminEnabled: true, * }, { * dependsOn: [example_cross_site_network], * }); * ``` * ### Compute Wire Group Basic Beta * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = gcp.organizations.getProject({}); * const example_cross_site_network = new gcp.compute.CrossSiteNetwork("example-cross-site-network", { * name: "test-cross-site-network-beta", * description: "Example cross site network", * }); * const example_test_wire_group_beta = new gcp.compute.WireGroup("example-test-wire-group-beta", { * name: "test-wire-group-beta", * description: "Example Wire Group Beta", * crossSiteNetwork: "test-cross-site-network-beta", * wireProperties: { * bandwidthUnmetered: 10, * faultResponse: "NONE", * bandwidthAllocation: "ALLOCATE_PER_WIRE", * }, * wireGroupProperties: { * type: "WIRE", * }, * adminEnabled: true, * }, { * dependsOn: [example_cross_site_network], * }); * ``` * * ## Import * * WireGroup can be imported using any of these accepted formats: * * * `projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}}` * * `{{project}}/{{cross_site_network}}/{{name}}` * * `{{cross_site_network}}/{{name}}` * * When using the `pulumi import` command, WireGroup can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:compute/wireGroup:WireGroup default projects/{{project}}/global/crossSiteNetworks/{{cross_site_network}}/wireGroups/{{name}} * $ pulumi import gcp:compute/wireGroup:WireGroup default {{project}}/{{cross_site_network}}/{{name}} * $ pulumi import gcp:compute/wireGroup:WireGroup default {{cross_site_network}}/{{name}} * ``` */ class WireGroup extends pulumi.CustomResource { /** * Get an existing WireGroup 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 WireGroup(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'gcp:compute/wireGroup:WireGroup'; /** * Returns true if the given object is an instance of WireGroup. 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'] === WireGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["adminEnabled"] = state?.adminEnabled; resourceInputs["creationTimestamp"] = state?.creationTimestamp; resourceInputs["crossSiteNetwork"] = state?.crossSiteNetwork; resourceInputs["deletionPolicy"] = state?.deletionPolicy; resourceInputs["description"] = state?.description; resourceInputs["endpoints"] = state?.endpoints; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["topologies"] = state?.topologies; resourceInputs["wireGroupProperties"] = state?.wireGroupProperties; resourceInputs["wireProperties"] = state?.wireProperties; resourceInputs["wires"] = state?.wires; } else { const args = argsOrState; if (args?.crossSiteNetwork === undefined && !opts.urn) { throw new Error("Missing required property 'crossSiteNetwork'"); } resourceInputs["adminEnabled"] = args?.adminEnabled; resourceInputs["crossSiteNetwork"] = args?.crossSiteNetwork; resourceInputs["deletionPolicy"] = args?.deletionPolicy; resourceInputs["description"] = args?.description; resourceInputs["endpoints"] = args?.endpoints; resourceInputs["name"] = args?.name; resourceInputs["project"] = args?.project; resourceInputs["wireGroupProperties"] = args?.wireGroupProperties; resourceInputs["wireProperties"] = args?.wireProperties; resourceInputs["creationTimestamp"] = undefined /*out*/; resourceInputs["topologies"] = undefined /*out*/; resourceInputs["wires"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(WireGroup.__pulumiType, name, resourceInputs, opts); } } exports.WireGroup = WireGroup; //# sourceMappingURL=wireGroup.js.map