@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
140 lines • 7.08 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, { ...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?.arn;
resourceInputs["authenticationOptions"] = state?.authenticationOptions;
resourceInputs["clientCidrBlock"] = state?.clientCidrBlock;
resourceInputs["clientConnectOptions"] = state?.clientConnectOptions;
resourceInputs["clientLoginBannerOptions"] = state?.clientLoginBannerOptions;
resourceInputs["clientRouteEnforcementOptions"] = state?.clientRouteEnforcementOptions;
resourceInputs["connectionLogOptions"] = state?.connectionLogOptions;
resourceInputs["description"] = state?.description;
resourceInputs["disconnectOnSessionTimeout"] = state?.disconnectOnSessionTimeout;
resourceInputs["dnsName"] = state?.dnsName;
resourceInputs["dnsServers"] = state?.dnsServers;
resourceInputs["endpointIpAddressType"] = state?.endpointIpAddressType;
resourceInputs["region"] = state?.region;
resourceInputs["securityGroupIds"] = state?.securityGroupIds;
resourceInputs["selfServicePortal"] = state?.selfServicePortal;
resourceInputs["selfServicePortalUrl"] = state?.selfServicePortalUrl;
resourceInputs["serverCertificateArn"] = state?.serverCertificateArn;
resourceInputs["sessionTimeoutHours"] = state?.sessionTimeoutHours;
resourceInputs["splitTunnel"] = state?.splitTunnel;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["trafficIpAddressType"] = state?.trafficIpAddressType;
resourceInputs["transportProtocol"] = state?.transportProtocol;
resourceInputs["vpcId"] = state?.vpcId;
resourceInputs["vpnPort"] = state?.vpnPort;
}
else {
const args = argsOrState;
if (args?.authenticationOptions === undefined && !opts.urn) {
throw new Error("Missing required property 'authenticationOptions'");
}
if (args?.connectionLogOptions === undefined && !opts.urn) {
throw new Error("Missing required property 'connectionLogOptions'");
}
if (args?.serverCertificateArn === undefined && !opts.urn) {
throw new Error("Missing required property 'serverCertificateArn'");
}
resourceInputs["authenticationOptions"] = args?.authenticationOptions;
resourceInputs["clientCidrBlock"] = args?.clientCidrBlock;
resourceInputs["clientConnectOptions"] = args?.clientConnectOptions;
resourceInputs["clientLoginBannerOptions"] = args?.clientLoginBannerOptions;
resourceInputs["clientRouteEnforcementOptions"] = args?.clientRouteEnforcementOptions;
resourceInputs["connectionLogOptions"] = args?.connectionLogOptions;
resourceInputs["description"] = args?.description;
resourceInputs["disconnectOnSessionTimeout"] = args?.disconnectOnSessionTimeout;
resourceInputs["dnsServers"] = args?.dnsServers;
resourceInputs["endpointIpAddressType"] = args?.endpointIpAddressType;
resourceInputs["region"] = args?.region;
resourceInputs["securityGroupIds"] = args?.securityGroupIds;
resourceInputs["selfServicePortal"] = args?.selfServicePortal;
resourceInputs["serverCertificateArn"] = args?.serverCertificateArn;
resourceInputs["sessionTimeoutHours"] = args?.sessionTimeoutHours;
resourceInputs["splitTunnel"] = args?.splitTunnel;
resourceInputs["tags"] = args?.tags;
resourceInputs["trafficIpAddressType"] = args?.trafficIpAddressType;
resourceInputs["transportProtocol"] = args?.transportProtocol;
resourceInputs["vpcId"] = args?.vpcId;
resourceInputs["vpnPort"] = args?.vpnPort;
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
;