UNPKG

@pulumi/aws

Version:

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

130 lines 6.14 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.VpcEndpointService = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a VPC Endpoint Service resource. * Service consumers can create an _Interface_ VPC Endpoint to connect to the service. * * > **NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals:** This provider provides * both a standalone VPC Endpoint Service Allowed Principal resource * and a VPC Endpoint Service resource with an `allowedPrincipals` attribute. Do not use the same principal ARN in both * a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict * and will overwrite the association. * * ## Example Usage * * ### Network Load Balancers * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2.VpcEndpointService("example", { * acceptanceRequired: false, * networkLoadBalancerArns: [exampleAwsLb.arn], * }); * ``` * * ### Gateway Load Balancers * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ec2.VpcEndpointService("example", { * acceptanceRequired: false, * gatewayLoadBalancerArns: [exampleAwsLb.arn], * }); * ``` * * ## Import * * Using `pulumi import`, import VPC Endpoint Services using the VPC endpoint service `id`. For example: * * ```sh * $ pulumi import aws:ec2/vpcEndpointService:VpcEndpointService foo vpce-svc-0f97a19d3fa8220bc * ``` */ class VpcEndpointService extends pulumi.CustomResource { /** * Get an existing VpcEndpointService 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 VpcEndpointService(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of VpcEndpointService. 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'] === VpcEndpointService.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["acceptanceRequired"] = state?.acceptanceRequired; resourceInputs["allowedPrincipals"] = state?.allowedPrincipals; resourceInputs["arn"] = state?.arn; resourceInputs["availabilityZones"] = state?.availabilityZones; resourceInputs["baseEndpointDnsNames"] = state?.baseEndpointDnsNames; resourceInputs["gatewayLoadBalancerArns"] = state?.gatewayLoadBalancerArns; resourceInputs["managesVpcEndpoints"] = state?.managesVpcEndpoints; resourceInputs["networkLoadBalancerArns"] = state?.networkLoadBalancerArns; resourceInputs["privateDnsName"] = state?.privateDnsName; resourceInputs["privateDnsNameConfigurations"] = state?.privateDnsNameConfigurations; resourceInputs["region"] = state?.region; resourceInputs["serviceName"] = state?.serviceName; resourceInputs["serviceType"] = state?.serviceType; resourceInputs["state"] = state?.state; resourceInputs["supportedIpAddressTypes"] = state?.supportedIpAddressTypes; resourceInputs["supportedRegions"] = state?.supportedRegions; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } else { const args = argsOrState; if (args?.acceptanceRequired === undefined && !opts.urn) { throw new Error("Missing required property 'acceptanceRequired'"); } resourceInputs["acceptanceRequired"] = args?.acceptanceRequired; resourceInputs["allowedPrincipals"] = args?.allowedPrincipals; resourceInputs["gatewayLoadBalancerArns"] = args?.gatewayLoadBalancerArns; resourceInputs["networkLoadBalancerArns"] = args?.networkLoadBalancerArns; resourceInputs["privateDnsName"] = args?.privateDnsName; resourceInputs["region"] = args?.region; resourceInputs["supportedIpAddressTypes"] = args?.supportedIpAddressTypes; resourceInputs["supportedRegions"] = args?.supportedRegions; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["availabilityZones"] = undefined /*out*/; resourceInputs["baseEndpointDnsNames"] = undefined /*out*/; resourceInputs["managesVpcEndpoints"] = undefined /*out*/; resourceInputs["privateDnsNameConfigurations"] = undefined /*out*/; resourceInputs["serviceName"] = undefined /*out*/; resourceInputs["serviceType"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(VpcEndpointService.__pulumiType, name, resourceInputs, opts); } } exports.VpcEndpointService = VpcEndpointService; /** @internal */ VpcEndpointService.__pulumiType = 'aws:ec2/vpcEndpointService:VpcEndpointService'; //# sourceMappingURL=vpcEndpointService.js.map