UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

87 lines 3.81 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.NetworkAssociation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides network associations for AWS Client VPN endpoints. For more information on usage, please see the * [AWS Client VPN Administrator's Guide](https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/what-is.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2clientvpn.NetworkAssociation("example", { * clientVpnEndpointId: exampleAwsEc2ClientVpnEndpoint.id, * subnetId: exampleAwsSubnet.id, * }); * ``` * * ## Import * * Using `pulumi import`, import AWS Client VPN network associations using the endpoint ID and the association ID. Values are separated by a `,`. For example: * * ```sh * $ pulumi import aws:ec2clientvpn/networkAssociation:NetworkAssociation example cvpn-endpoint-0ac3a1abbccddd666,cvpn-assoc-0b8db902465d069ad * ``` */ class NetworkAssociation extends pulumi.CustomResource { /** * Get an existing NetworkAssociation 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 NetworkAssociation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of NetworkAssociation. 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'] === NetworkAssociation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["associationId"] = state?.associationId; resourceInputs["clientVpnEndpointId"] = state?.clientVpnEndpointId; resourceInputs["region"] = state?.region; resourceInputs["subnetId"] = state?.subnetId; resourceInputs["vpcId"] = state?.vpcId; } else { const args = argsOrState; if (args?.clientVpnEndpointId === undefined && !opts.urn) { throw new Error("Missing required property 'clientVpnEndpointId'"); } if (args?.subnetId === undefined && !opts.urn) { throw new Error("Missing required property 'subnetId'"); } resourceInputs["clientVpnEndpointId"] = args?.clientVpnEndpointId; resourceInputs["region"] = args?.region; resourceInputs["subnetId"] = args?.subnetId; resourceInputs["associationId"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NetworkAssociation.__pulumiType, name, resourceInputs, opts); } } exports.NetworkAssociation = NetworkAssociation; /** @internal */ NetworkAssociation.__pulumiType = 'aws:ec2clientvpn/networkAssociation:NetworkAssociation'; //# sourceMappingURL=networkAssociation.js.map