@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
139 lines • 7.76 kB
JavaScript
;
// *** 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.Endpoint = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an AWS Client VPN endpoint for OpenVPN clients. 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.Endpoint("example", {
* description: "clientvpn-example",
* serverCertificateArn: cert.arn,
* clientCidrBlock: "10.0.0.0/16",
* authenticationOptions: [{
* type: "certificate-authentication",
* rootCertificateChainArn: rootCert.arn,
* }],
* connectionLogOptions: {
* enabled: true,
* cloudwatchLogGroup: lg.name,
* cloudwatchLogStream: ls.name,
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import AWS Client VPN endpoints using the `id` value found via `aws ec2 describe-client-vpn-endpoints`. For example:
*
* ```sh
* $ pulumi import aws:ec2clientvpn/endpoint:Endpoint example cvpn-endpoint-0ac3a1abbccddd666
* ```
*/
class Endpoint extends pulumi.CustomResource {
/**
* Get an existing Endpoint 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 Endpoint(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Endpoint. 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'] === Endpoint.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["authenticationOptions"] = state ? state.authenticationOptions : undefined;
resourceInputs["clientCidrBlock"] = state ? state.clientCidrBlock : undefined;
resourceInputs["clientConnectOptions"] = state ? state.clientConnectOptions : undefined;
resourceInputs["clientLoginBannerOptions"] = state ? state.clientLoginBannerOptions : undefined;
resourceInputs["clientRouteEnforcementOptions"] = state ? state.clientRouteEnforcementOptions : undefined;
resourceInputs["connectionLogOptions"] = state ? state.connectionLogOptions : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["disconnectOnSessionTimeout"] = state ? state.disconnectOnSessionTimeout : undefined;
resourceInputs["dnsName"] = state ? state.dnsName : undefined;
resourceInputs["dnsServers"] = state ? state.dnsServers : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined;
resourceInputs["selfServicePortal"] = state ? state.selfServicePortal : undefined;
resourceInputs["selfServicePortalUrl"] = state ? state.selfServicePortalUrl : undefined;
resourceInputs["serverCertificateArn"] = state ? state.serverCertificateArn : undefined;
resourceInputs["sessionTimeoutHours"] = state ? state.sessionTimeoutHours : undefined;
resourceInputs["splitTunnel"] = state ? state.splitTunnel : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["transportProtocol"] = state ? state.transportProtocol : undefined;
resourceInputs["vpcId"] = state ? state.vpcId : undefined;
resourceInputs["vpnPort"] = state ? state.vpnPort : undefined;
}
else {
const args = argsOrState;
if ((!args || args.authenticationOptions === undefined) && !opts.urn) {
throw new Error("Missing required property 'authenticationOptions'");
}
if ((!args || args.clientCidrBlock === undefined) && !opts.urn) {
throw new Error("Missing required property 'clientCidrBlock'");
}
if ((!args || args.connectionLogOptions === undefined) && !opts.urn) {
throw new Error("Missing required property 'connectionLogOptions'");
}
if ((!args || args.serverCertificateArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'serverCertificateArn'");
}
resourceInputs["authenticationOptions"] = args ? args.authenticationOptions : undefined;
resourceInputs["clientCidrBlock"] = args ? args.clientCidrBlock : undefined;
resourceInputs["clientConnectOptions"] = args ? args.clientConnectOptions : undefined;
resourceInputs["clientLoginBannerOptions"] = args ? args.clientLoginBannerOptions : undefined;
resourceInputs["clientRouteEnforcementOptions"] = args ? args.clientRouteEnforcementOptions : undefined;
resourceInputs["connectionLogOptions"] = args ? args.connectionLogOptions : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["disconnectOnSessionTimeout"] = args ? args.disconnectOnSessionTimeout : undefined;
resourceInputs["dnsServers"] = args ? args.dnsServers : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined;
resourceInputs["selfServicePortal"] = args ? args.selfServicePortal : undefined;
resourceInputs["serverCertificateArn"] = args ? args.serverCertificateArn : undefined;
resourceInputs["sessionTimeoutHours"] = args ? args.sessionTimeoutHours : undefined;
resourceInputs["splitTunnel"] = args ? args.splitTunnel : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["transportProtocol"] = args ? args.transportProtocol : undefined;
resourceInputs["vpcId"] = args ? args.vpcId : undefined;
resourceInputs["vpnPort"] = args ? args.vpnPort : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["dnsName"] = undefined /*out*/;
resourceInputs["selfServicePortalUrl"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Endpoint.__pulumiType, name, resourceInputs, opts);
}
}
exports.Endpoint = Endpoint;
/** @internal */
Endpoint.__pulumiType = 'aws:ec2clientvpn/endpoint:Endpoint';
//# sourceMappingURL=endpoint.js.map