UNPKG

@upcloud/pulumi-upcloud

Version:

A Pulumi package for creating and managing UpCloud resources.

78 lines 4.09 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.GatewayConnectionTunnel = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage */ class GatewayConnectionTunnel extends pulumi.CustomResource { /** * Get an existing GatewayConnectionTunnel 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 GatewayConnectionTunnel(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of GatewayConnectionTunnel. 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'] === GatewayConnectionTunnel.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["connectionId"] = state ? state.connectionId : undefined; resourceInputs["ipsecAuthPsk"] = state ? state.ipsecAuthPsk : undefined; resourceInputs["ipsecProperties"] = state ? state.ipsecProperties : undefined; resourceInputs["localAddressName"] = state ? state.localAddressName : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["operationalState"] = state ? state.operationalState : undefined; resourceInputs["remoteAddress"] = state ? state.remoteAddress : undefined; resourceInputs["uuid"] = state ? state.uuid : undefined; } else { const args = argsOrState; if ((!args || args.connectionId === undefined) && !opts.urn) { throw new Error("Missing required property 'connectionId'"); } if ((!args || args.ipsecAuthPsk === undefined) && !opts.urn) { throw new Error("Missing required property 'ipsecAuthPsk'"); } if ((!args || args.localAddressName === undefined) && !opts.urn) { throw new Error("Missing required property 'localAddressName'"); } if ((!args || args.remoteAddress === undefined) && !opts.urn) { throw new Error("Missing required property 'remoteAddress'"); } resourceInputs["connectionId"] = args ? args.connectionId : undefined; resourceInputs["ipsecAuthPsk"] = args ? args.ipsecAuthPsk : undefined; resourceInputs["ipsecProperties"] = args ? args.ipsecProperties : undefined; resourceInputs["localAddressName"] = args ? args.localAddressName : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["remoteAddress"] = args ? args.remoteAddress : undefined; resourceInputs["operationalState"] = undefined /*out*/; resourceInputs["uuid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GatewayConnectionTunnel.__pulumiType, name, resourceInputs, opts); } } exports.GatewayConnectionTunnel = GatewayConnectionTunnel; /** @internal */ GatewayConnectionTunnel.__pulumiType = 'upcloud:index/gatewayConnectionTunnel:GatewayConnectionTunnel'; //# sourceMappingURL=gatewayConnectionTunnel.js.map