1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2
  5. VpcEndpointConnectionAccepter

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

aws.ec2.VpcEndpointConnectionAccepter

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

    Provides a resource to accept a pending VPC Endpoint Connection accept request to VPC Endpoint Service.

    Example Usage

    Accept cross-account request

    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 pulumi
    import pulumi_aws as aws
    
    example = aws.ec2.VpcEndpointService("example",
        acceptance_required=False,
        network_load_balancer_arns=[example_aws_lb["arn"]])
    example_vpc_endpoint = aws.ec2.VpcEndpoint("example",
        vpc_id=test_alternate["id"],
        service_name=test_aws_vpc_endpoint_service["serviceName"],
        vpc_endpoint_type="Interface",
        private_dns_enabled=False,
        security_group_ids=[test["id"]])
    example_vpc_endpoint_connection_accepter = aws.ec2.VpcEndpointConnectionAccepter("example",
        vpc_endpoint_service_id=example.id,
        vpc_endpoint_id=example_vpc_endpoint.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
    			AcceptanceRequired: pulumi.Bool(false),
    			NetworkLoadBalancerArns: pulumi.StringArray{
    				exampleAwsLb.Arn,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleVpcEndpoint, err := ec2.NewVpcEndpoint(ctx, "example", &ec2.VpcEndpointArgs{
    			VpcId:             pulumi.Any(testAlternate.Id),
    			ServiceName:       pulumi.Any(testAwsVpcEndpointService.ServiceName),
    			VpcEndpointType:   pulumi.String("Interface"),
    			PrivateDnsEnabled: pulumi.Bool(false),
    			SecurityGroupIds: pulumi.StringArray{
    				test.Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewVpcEndpointConnectionAccepter(ctx, "example", &ec2.VpcEndpointConnectionAccepterArgs{
    			VpcEndpointServiceId: example.ID(),
    			VpcEndpointId:        exampleVpcEndpoint.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ec2.VpcEndpointService("example", new()
        {
            AcceptanceRequired = false,
            NetworkLoadBalancerArns = new[]
            {
                exampleAwsLb.Arn,
            },
        });
    
        var exampleVpcEndpoint = new Aws.Ec2.VpcEndpoint("example", new()
        {
            VpcId = testAlternate.Id,
            ServiceName = testAwsVpcEndpointService.ServiceName,
            VpcEndpointType = "Interface",
            PrivateDnsEnabled = false,
            SecurityGroupIds = new[]
            {
                test.Id,
            },
        });
    
        var exampleVpcEndpointConnectionAccepter = new Aws.Ec2.VpcEndpointConnectionAccepter("example", new()
        {
            VpcEndpointServiceId = example.Id,
            VpcEndpointId = exampleVpcEndpoint.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.VpcEndpointService;
    import com.pulumi.aws.ec2.VpcEndpointServiceArgs;
    import com.pulumi.aws.ec2.VpcEndpoint;
    import com.pulumi.aws.ec2.VpcEndpointArgs;
    import com.pulumi.aws.ec2.VpcEndpointConnectionAccepter;
    import com.pulumi.aws.ec2.VpcEndpointConnectionAccepterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new VpcEndpointService("example", VpcEndpointServiceArgs.builder()
                .acceptanceRequired(false)
                .networkLoadBalancerArns(exampleAwsLb.arn())
                .build());
    
            var exampleVpcEndpoint = new VpcEndpoint("exampleVpcEndpoint", VpcEndpointArgs.builder()
                .vpcId(testAlternate.id())
                .serviceName(testAwsVpcEndpointService.serviceName())
                .vpcEndpointType("Interface")
                .privateDnsEnabled(false)
                .securityGroupIds(test.id())
                .build());
    
            var exampleVpcEndpointConnectionAccepter = new VpcEndpointConnectionAccepter("exampleVpcEndpointConnectionAccepter", VpcEndpointConnectionAccepterArgs.builder()
                .vpcEndpointServiceId(example.id())
                .vpcEndpointId(exampleVpcEndpoint.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:VpcEndpointService
        properties:
          acceptanceRequired: false
          networkLoadBalancerArns:
            - ${exampleAwsLb.arn}
      exampleVpcEndpoint:
        type: aws:ec2:VpcEndpoint
        name: example
        properties:
          vpcId: ${testAlternate.id}
          serviceName: ${testAwsVpcEndpointService.serviceName}
          vpcEndpointType: Interface
          privateDnsEnabled: false
          securityGroupIds:
            - ${test.id}
      exampleVpcEndpointConnectionAccepter:
        type: aws:ec2:VpcEndpointConnectionAccepter
        name: example
        properties:
          vpcEndpointServiceId: ${example.id}
          vpcEndpointId: ${exampleVpcEndpoint.id}
    

    Create VpcEndpointConnectionAccepter Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VpcEndpointConnectionAccepter(name: string, args: VpcEndpointConnectionAccepterArgs, opts?: CustomResourceOptions);
    @overload
    def VpcEndpointConnectionAccepter(resource_name: str,
                                      args: VpcEndpointConnectionAccepterArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcEndpointConnectionAccepter(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      vpc_endpoint_id: Optional[str] = None,
                                      vpc_endpoint_service_id: Optional[str] = None)
    func NewVpcEndpointConnectionAccepter(ctx *Context, name string, args VpcEndpointConnectionAccepterArgs, opts ...ResourceOption) (*VpcEndpointConnectionAccepter, error)
    public VpcEndpointConnectionAccepter(string name, VpcEndpointConnectionAccepterArgs args, CustomResourceOptions? opts = null)
    public VpcEndpointConnectionAccepter(String name, VpcEndpointConnectionAccepterArgs args)
    public VpcEndpointConnectionAccepter(String name, VpcEndpointConnectionAccepterArgs args, CustomResourceOptions options)
    
    type: aws:ec2:VpcEndpointConnectionAccepter
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VpcEndpointConnectionAccepterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VpcEndpointConnectionAccepterArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VpcEndpointConnectionAccepterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcEndpointConnectionAccepterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcEndpointConnectionAccepterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var vpcEndpointConnectionAccepterResource = new Aws.Ec2.VpcEndpointConnectionAccepter("vpcEndpointConnectionAccepterResource", new()
    {
        VpcEndpointId = "string",
        VpcEndpointServiceId = "string",
    });
    
    example, err := ec2.NewVpcEndpointConnectionAccepter(ctx, "vpcEndpointConnectionAccepterResource", &ec2.VpcEndpointConnectionAccepterArgs{
    	VpcEndpointId:        pulumi.String("string"),
    	VpcEndpointServiceId: pulumi.String("string"),
    })
    
    var vpcEndpointConnectionAccepterResource = new VpcEndpointConnectionAccepter("vpcEndpointConnectionAccepterResource", VpcEndpointConnectionAccepterArgs.builder()
        .vpcEndpointId("string")
        .vpcEndpointServiceId("string")
        .build());
    
    vpc_endpoint_connection_accepter_resource = aws.ec2.VpcEndpointConnectionAccepter("vpcEndpointConnectionAccepterResource",
        vpc_endpoint_id="string",
        vpc_endpoint_service_id="string")
    
    const vpcEndpointConnectionAccepterResource = new aws.ec2.VpcEndpointConnectionAccepter("vpcEndpointConnectionAccepterResource", {
        vpcEndpointId: "string",
        vpcEndpointServiceId: "string",
    });
    
    type: aws:ec2:VpcEndpointConnectionAccepter
    properties:
        vpcEndpointId: string
        vpcEndpointServiceId: string
    

    VpcEndpointConnectionAccepter Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The VpcEndpointConnectionAccepter resource accepts the following input properties:

    VpcEndpointId string
    AWS VPC Endpoint ID.
    VpcEndpointServiceId string
    AWS VPC Endpoint Service ID.
    VpcEndpointId string
    AWS VPC Endpoint ID.
    VpcEndpointServiceId string
    AWS VPC Endpoint Service ID.
    vpcEndpointId String
    AWS VPC Endpoint ID.
    vpcEndpointServiceId String
    AWS VPC Endpoint Service ID.
    vpcEndpointId string
    AWS VPC Endpoint ID.
    vpcEndpointServiceId string
    AWS VPC Endpoint Service ID.
    vpc_endpoint_id str
    AWS VPC Endpoint ID.
    vpc_endpoint_service_id str
    AWS VPC Endpoint Service ID.
    vpcEndpointId String
    AWS VPC Endpoint ID.
    vpcEndpointServiceId String
    AWS VPC Endpoint Service ID.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VpcEndpointConnectionAccepter resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    VpcEndpointState string
    State of the VPC Endpoint.
    Id string
    The provider-assigned unique ID for this managed resource.
    VpcEndpointState string
    State of the VPC Endpoint.
    id String
    The provider-assigned unique ID for this managed resource.
    vpcEndpointState String
    State of the VPC Endpoint.
    id string
    The provider-assigned unique ID for this managed resource.
    vpcEndpointState string
    State of the VPC Endpoint.
    id str
    The provider-assigned unique ID for this managed resource.
    vpc_endpoint_state str
    State of the VPC Endpoint.
    id String
    The provider-assigned unique ID for this managed resource.
    vpcEndpointState String
    State of the VPC Endpoint.

    Look up Existing VpcEndpointConnectionAccepter Resource

    Get an existing VpcEndpointConnectionAccepter resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VpcEndpointConnectionAccepterState, opts?: CustomResourceOptions): VpcEndpointConnectionAccepter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            vpc_endpoint_id: Optional[str] = None,
            vpc_endpoint_service_id: Optional[str] = None,
            vpc_endpoint_state: Optional[str] = None) -> VpcEndpointConnectionAccepter
    func GetVpcEndpointConnectionAccepter(ctx *Context, name string, id IDInput, state *VpcEndpointConnectionAccepterState, opts ...ResourceOption) (*VpcEndpointConnectionAccepter, error)
    public static VpcEndpointConnectionAccepter Get(string name, Input<string> id, VpcEndpointConnectionAccepterState? state, CustomResourceOptions? opts = null)
    public static VpcEndpointConnectionAccepter get(String name, Output<String> id, VpcEndpointConnectionAccepterState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    VpcEndpointId string
    AWS VPC Endpoint ID.
    VpcEndpointServiceId string
    AWS VPC Endpoint Service ID.
    VpcEndpointState string
    State of the VPC Endpoint.
    VpcEndpointId string
    AWS VPC Endpoint ID.
    VpcEndpointServiceId string
    AWS VPC Endpoint Service ID.
    VpcEndpointState string
    State of the VPC Endpoint.
    vpcEndpointId String
    AWS VPC Endpoint ID.
    vpcEndpointServiceId String
    AWS VPC Endpoint Service ID.
    vpcEndpointState String
    State of the VPC Endpoint.
    vpcEndpointId string
    AWS VPC Endpoint ID.
    vpcEndpointServiceId string
    AWS VPC Endpoint Service ID.
    vpcEndpointState string
    State of the VPC Endpoint.
    vpc_endpoint_id str
    AWS VPC Endpoint ID.
    vpc_endpoint_service_id str
    AWS VPC Endpoint Service ID.
    vpc_endpoint_state str
    State of the VPC Endpoint.
    vpcEndpointId String
    AWS VPC Endpoint ID.
    vpcEndpointServiceId String
    AWS VPC Endpoint Service ID.
    vpcEndpointState String
    State of the VPC Endpoint.

    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:

    $ pulumi import aws:ec2/vpcEndpointConnectionAccepter:VpcEndpointConnectionAccepter foo vpce-svc-0f97a19d3fa8220bc_vpce-010601a6db371e263
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi