UNPKG

@pulumi/aws

Version:

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

180 lines 7.66 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, { ...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?.applicationDomain; resourceInputs["attachmentType"] = state?.attachmentType; resourceInputs["cidrOptions"] = state?.cidrOptions; resourceInputs["description"] = state?.description; resourceInputs["deviceValidationDomain"] = state?.deviceValidationDomain; resourceInputs["domainCertificateArn"] = state?.domainCertificateArn; resourceInputs["endpointDomain"] = state?.endpointDomain; resourceInputs["endpointDomainPrefix"] = state?.endpointDomainPrefix; resourceInputs["endpointType"] = state?.endpointType; resourceInputs["loadBalancerOptions"] = state?.loadBalancerOptions; resourceInputs["networkInterfaceOptions"] = state?.networkInterfaceOptions; resourceInputs["policyDocument"] = state?.policyDocument; resourceInputs["rdsOptions"] = state?.rdsOptions; resourceInputs["region"] = state?.region; resourceInputs["securityGroupIds"] = state?.securityGroupIds; resourceInputs["sseSpecification"] = state?.sseSpecification; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["verifiedAccessGroupId"] = state?.verifiedAccessGroupId; resourceInputs["verifiedAccessInstanceId"] = state?.verifiedAccessInstanceId; } else { const args = argsOrState; if (args?.attachmentType === undefined && !opts.urn) { throw new Error("Missing required property 'attachmentType'"); } if (args?.endpointType === undefined && !opts.urn) { throw new Error("Missing required property 'endpointType'"); } if (args?.verifiedAccessGroupId === undefined && !opts.urn) { throw new Error("Missing required property 'verifiedAccessGroupId'"); } resourceInputs["applicationDomain"] = args?.applicationDomain; resourceInputs["attachmentType"] = args?.attachmentType; resourceInputs["cidrOptions"] = args?.cidrOptions; resourceInputs["description"] = args?.description; resourceInputs["domainCertificateArn"] = args?.domainCertificateArn; resourceInputs["endpointDomainPrefix"] = args?.endpointDomainPrefix; resourceInputs["endpointType"] = args?.endpointType; resourceInputs["loadBalancerOptions"] = args?.loadBalancerOptions; resourceInputs["networkInterfaceOptions"] = args?.networkInterfaceOptions; resourceInputs["policyDocument"] = args?.policyDocument; resourceInputs["rdsOptions"] = args?.rdsOptions; resourceInputs["region"] = args?.region; resourceInputs["securityGroupIds"] = args?.securityGroupIds; resourceInputs["sseSpecification"] = args?.sseSpecification; resourceInputs["tags"] = args?.tags; resourceInputs["verifiedAccessGroupId"] = args?.verifiedAccessGroupId; 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