@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
97 lines • 4.28 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.VpcEndpointConnectionAccepter = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to accept a pending VPC Endpoint Connection accept request to VPC Endpoint Service.
*
* ## Example Usage
*
* ### Accept cross-account request
*
* ```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],
* });
* const exampleVpcEndpoint = new aws.ec2.VpcEndpoint("example", {
* vpcId: testAlternate.id,
* serviceName: testAwsVpcEndpointService.serviceName,
* vpcEndpointType: "Interface",
* privateDnsEnabled: false,
* securityGroupIds: [test.id],
* });
* const exampleVpcEndpointConnectionAccepter = new aws.ec2.VpcEndpointConnectionAccepter("example", {
* vpcEndpointServiceId: example.id,
* vpcEndpointId: exampleVpcEndpoint.id,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import VPC Endpoint Services using ID of the connection, which is the `VPC Endpoint Service ID` and `VPC Endpoint ID` separated by underscore (`_`).. For example:
*
* ```sh
* $ pulumi import aws:ec2/vpcEndpointConnectionAccepter:VpcEndpointConnectionAccepter foo vpce-svc-0f97a19d3fa8220bc_vpce-010601a6db371e263
* ```
*/
class VpcEndpointConnectionAccepter extends pulumi.CustomResource {
/**
* Get an existing VpcEndpointConnectionAccepter 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 VpcEndpointConnectionAccepter(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of VpcEndpointConnectionAccepter. 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'] === VpcEndpointConnectionAccepter.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["region"] = state?.region;
resourceInputs["vpcEndpointId"] = state?.vpcEndpointId;
resourceInputs["vpcEndpointServiceId"] = state?.vpcEndpointServiceId;
resourceInputs["vpcEndpointState"] = state?.vpcEndpointState;
}
else {
const args = argsOrState;
if (args?.vpcEndpointId === undefined && !opts.urn) {
throw new Error("Missing required property 'vpcEndpointId'");
}
if (args?.vpcEndpointServiceId === undefined && !opts.urn) {
throw new Error("Missing required property 'vpcEndpointServiceId'");
}
resourceInputs["region"] = args?.region;
resourceInputs["vpcEndpointId"] = args?.vpcEndpointId;
resourceInputs["vpcEndpointServiceId"] = args?.vpcEndpointServiceId;
resourceInputs["vpcEndpointState"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(VpcEndpointConnectionAccepter.__pulumiType, name, resourceInputs, opts);
}
}
exports.VpcEndpointConnectionAccepter = VpcEndpointConnectionAccepter;
/** @internal */
VpcEndpointConnectionAccepter.__pulumiType = 'aws:ec2/vpcEndpointConnectionAccepter:VpcEndpointConnectionAccepter';
//# sourceMappingURL=vpcEndpointConnectionAccepter.js.map