UNPKG

@pulumi/aws

Version:

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

180 lines • 8.39 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.Endpoint = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS EC2 (Elastic Compute Cloud) Verified Access Endpoint. * * ## Example Usage * * ### ALB Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.verifiedaccess.Endpoint("example", { * applicationDomain: "example.com", * attachmentType: "vpc", * description: "example", * domainCertificateArn: exampleAwsAcmCertificate.arn, * endpointDomainPrefix: "example", * endpointType: "load-balancer", * loadBalancerOptions: { * loadBalancerArn: exampleAwsLb.arn, * port: 443, * protocol: "https", * subnetIds: .map(subnet => (subnet.id)), * }, * securityGroupIds: [exampleAwsSecurityGroup.id], * verifiedAccessGroupId: exampleAwsVerifiedaccessGroup.id, * }); * ``` * * ### Network Interface Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.verifiedaccess.Endpoint("example", { * applicationDomain: "example.com", * attachmentType: "vpc", * description: "example", * domainCertificateArn: exampleAwsAcmCertificate.arn, * endpointDomainPrefix: "example", * endpointType: "network-interface", * networkInterfaceOptions: { * networkInterfaceId: exampleAwsNetworkInterface.id, * port: 443, * protocol: "https", * }, * securityGroupIds: [exampleAwsSecurityGroup.id], * verifiedAccessGroupId: exampleAwsVerifiedaccessGroup.id, * }); * ``` * * ### Cidr Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.verifiedaccess.Endpoint("example", { * attachmentType: "vpc", * description: "example", * endpointType: "cidr", * cidrOptions: { * cidr: test[0].cidrBlock, * portRanges: [{ * fromPort: 443, * toPort: 443, * }], * protocol: "tcp", * subnetIds: .map(subnet => (subnet.id)), * }, * securityGroupIds: [testAwsSecurityGroup.id], * verifiedAccessGroupId: testAwsVerifiedaccessGroup.id, * }); * ``` * * ## Import * * Using `pulumi import`, import Verified Access Instances using the `id`. For example: * * ```sh * $ pulumi import aws:verifiedaccess/endpoint:Endpoint example vae-8012925589 * ``` */ 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["applicationDomain"] = state ? state.applicationDomain : undefined; resourceInputs["attachmentType"] = state ? state.attachmentType : undefined; resourceInputs["cidrOptions"] = state ? state.cidrOptions : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["deviceValidationDomain"] = state ? state.deviceValidationDomain : undefined; resourceInputs["domainCertificateArn"] = state ? state.domainCertificateArn : undefined; resourceInputs["endpointDomain"] = state ? state.endpointDomain : undefined; resourceInputs["endpointDomainPrefix"] = state ? state.endpointDomainPrefix : undefined; resourceInputs["endpointType"] = state ? state.endpointType : undefined; resourceInputs["loadBalancerOptions"] = state ? state.loadBalancerOptions : undefined; resourceInputs["networkInterfaceOptions"] = state ? state.networkInterfaceOptions : undefined; resourceInputs["policyDocument"] = state ? state.policyDocument : undefined; resourceInputs["rdsOptions"] = state ? state.rdsOptions : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined; resourceInputs["sseSpecification"] = state ? state.sseSpecification : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["verifiedAccessGroupId"] = state ? state.verifiedAccessGroupId : undefined; resourceInputs["verifiedAccessInstanceId"] = state ? state.verifiedAccessInstanceId : undefined; } else { const args = argsOrState; if ((!args || args.attachmentType === undefined) && !opts.urn) { throw new Error("Missing required property 'attachmentType'"); } if ((!args || args.endpointType === undefined) && !opts.urn) { throw new Error("Missing required property 'endpointType'"); } if ((!args || args.verifiedAccessGroupId === undefined) && !opts.urn) { throw new Error("Missing required property 'verifiedAccessGroupId'"); } resourceInputs["applicationDomain"] = args ? args.applicationDomain : undefined; resourceInputs["attachmentType"] = args ? args.attachmentType : undefined; resourceInputs["cidrOptions"] = args ? args.cidrOptions : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["domainCertificateArn"] = args ? args.domainCertificateArn : undefined; resourceInputs["endpointDomainPrefix"] = args ? args.endpointDomainPrefix : undefined; resourceInputs["endpointType"] = args ? args.endpointType : undefined; resourceInputs["loadBalancerOptions"] = args ? args.loadBalancerOptions : undefined; resourceInputs["networkInterfaceOptions"] = args ? args.networkInterfaceOptions : undefined; resourceInputs["policyDocument"] = args ? args.policyDocument : undefined; resourceInputs["rdsOptions"] = args ? args.rdsOptions : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined; resourceInputs["sseSpecification"] = args ? args.sseSpecification : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["verifiedAccessGroupId"] = args ? args.verifiedAccessGroupId : undefined; resourceInputs["deviceValidationDomain"] = undefined /*out*/; resourceInputs["endpointDomain"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["verifiedAccessInstanceId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Endpoint.__pulumiType, name, resourceInputs, opts); } } exports.Endpoint = Endpoint; /** @internal */ Endpoint.__pulumiType = 'aws:verifiedaccess/endpoint:Endpoint'; //# sourceMappingURL=endpoint.js.map