UNPKG

@pulumi/gcp

Version:

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

127 lines 5.53 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! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.WireGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## 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", * }, * 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}} * ``` * * ```sh * $ pulumi import gcp:compute/wireGroup:WireGroup default {{project}}/{{cross_site_network}}/{{name}} * ``` * * ```sh * $ 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, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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 ? state.adminEnabled : undefined; resourceInputs["creationTimestamp"] = state ? state.creationTimestamp : undefined; resourceInputs["crossSiteNetwork"] = state ? state.crossSiteNetwork : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["endpoints"] = state ? state.endpoints : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["topologies"] = state ? state.topologies : undefined; resourceInputs["wireGroupProperties"] = state ? state.wireGroupProperties : undefined; resourceInputs["wireProperties"] = state ? state.wireProperties : undefined; resourceInputs["wires"] = state ? state.wires : undefined; } else { const args = argsOrState; if ((!args || args.crossSiteNetwork === undefined) && !opts.urn) { throw new Error("Missing required property 'crossSiteNetwork'"); } resourceInputs["adminEnabled"] = args ? args.adminEnabled : undefined; resourceInputs["crossSiteNetwork"] = args ? args.crossSiteNetwork : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["endpoints"] = args ? args.endpoints : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["wireGroupProperties"] = args ? args.wireGroupProperties : undefined; resourceInputs["wireProperties"] = args ? args.wireProperties : undefined; 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; /** @internal */ WireGroup.__pulumiType = 'gcp:compute/wireGroup:WireGroup'; //# sourceMappingURL=wireGroup.js.map