UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

97 lines 6.07 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.VpnConnection = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Specifies a VPN connection between a virtual private gateway and a VPN customer gateway or a transit gateway and a VPN customer gateway. * To specify a VPN connection between a transit gateway and customer gateway, use the ``TransitGatewayId`` and ``CustomerGatewayId`` properties. * To specify a VPN connection between a virtual private gateway and customer gateway, use the ``VpnGatewayId`` and ``CustomerGatewayId`` properties. * For more information, see [](https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in the *User Guide*. */ class VpnConnection extends pulumi.CustomResource { /** * Get an existing VpnConnection 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new VpnConnection(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of VpnConnection. 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'] === VpnConnection.__pulumiType; } /** * Create a VpnConnection resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if ((!args || args.customerGatewayId === undefined) && !opts.urn) { throw new Error("Missing required property 'customerGatewayId'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["customerGatewayId"] = args ? args.customerGatewayId : undefined; resourceInputs["enableAcceleration"] = args ? args.enableAcceleration : undefined; resourceInputs["localIpv4NetworkCidr"] = args ? args.localIpv4NetworkCidr : undefined; resourceInputs["localIpv6NetworkCidr"] = args ? args.localIpv6NetworkCidr : undefined; resourceInputs["outsideIpAddressType"] = args ? args.outsideIpAddressType : undefined; resourceInputs["remoteIpv4NetworkCidr"] = args ? args.remoteIpv4NetworkCidr : undefined; resourceInputs["remoteIpv6NetworkCidr"] = args ? args.remoteIpv6NetworkCidr : undefined; resourceInputs["staticRoutesOnly"] = args ? args.staticRoutesOnly : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["transitGatewayId"] = args ? args.transitGatewayId : undefined; resourceInputs["transportTransitGatewayAttachmentId"] = args ? args.transportTransitGatewayAttachmentId : undefined; resourceInputs["tunnelInsideIpVersion"] = args ? args.tunnelInsideIpVersion : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["vpnGatewayId"] = args ? args.vpnGatewayId : undefined; resourceInputs["vpnTunnelOptionsSpecifications"] = args ? args.vpnTunnelOptionsSpecifications : undefined; resourceInputs["vpnConnectionId"] = undefined /*out*/; } else { resourceInputs["customerGatewayId"] = undefined /*out*/; resourceInputs["enableAcceleration"] = undefined /*out*/; resourceInputs["localIpv4NetworkCidr"] = undefined /*out*/; resourceInputs["localIpv6NetworkCidr"] = undefined /*out*/; resourceInputs["outsideIpAddressType"] = undefined /*out*/; resourceInputs["remoteIpv4NetworkCidr"] = undefined /*out*/; resourceInputs["remoteIpv6NetworkCidr"] = undefined /*out*/; resourceInputs["staticRoutesOnly"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["transitGatewayId"] = undefined /*out*/; resourceInputs["transportTransitGatewayAttachmentId"] = undefined /*out*/; resourceInputs["tunnelInsideIpVersion"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; resourceInputs["vpnConnectionId"] = undefined /*out*/; resourceInputs["vpnGatewayId"] = undefined /*out*/; resourceInputs["vpnTunnelOptionsSpecifications"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["customerGatewayId", "enableAcceleration", "localIpv4NetworkCidr", "localIpv6NetworkCidr", "outsideIpAddressType", "remoteIpv4NetworkCidr", "remoteIpv6NetworkCidr", "staticRoutesOnly", "transitGatewayId", "transportTransitGatewayAttachmentId", "tunnelInsideIpVersion", "type", "vpnGatewayId", "vpnTunnelOptionsSpecifications[*]"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(VpnConnection.__pulumiType, name, resourceInputs, opts); } } exports.VpnConnection = VpnConnection; /** @internal */ VpnConnection.__pulumiType = 'aws-native:ec2:VpnConnection'; //# sourceMappingURL=vpnConnection.js.map