aws-cdk-lib.aws_ec2.InterfaceVpcEndpointProps

interface InterfaceVpcEndpointProps

LanguageType name
.NETAmazon.CDK.AWS.EC2.InterfaceVpcEndpointProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#InterfaceVpcEndpointProps
Javasoftware.amazon.awscdk.services.ec2.InterfaceVpcEndpointProps
Pythonaws_cdk.aws_ec2.InterfaceVpcEndpointProps
TypeScript (source)aws-cdk-lib » aws_ec2 » InterfaceVpcEndpointProps

Construction properties for an InterfaceVpcEndpoint.

Example

declare const vpc: ec2.Vpc;

new ec2.InterfaceVpcEndpoint(this, 'VPC Endpoint', {
  vpc,
  service: new ec2.InterfaceVpcEndpointService('com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc', 443),
  // Choose which availability zones to place the VPC endpoint in, based on
  // available AZs
  subnets: {
    availabilityZones: ['us-east-1a', 'us-east-1c']
  }
});

Properties

NameTypeDescription
serviceIInterfaceVpcEndpointServiceThe service to use for this interface VPC endpoint.
vpcIVpcThe VPC network in which the interface endpoint will be used.
lookupSupportedAzs?booleanLimit to only those availability zones where the endpoint service can be created.
open?booleanWhether to automatically allow VPC traffic to the endpoint.
privateDnsEnabled?booleanWhether to associate a private hosted zone with the specified VPC.
securityGroups?ISecurityGroup[]The security groups to associate with this interface VPC endpoint.
subnets?SubnetSelectionThe subnets in which to create an endpoint network interface.

service

Type: IInterfaceVpcEndpointService

The service to use for this interface VPC endpoint.


vpc

Type: IVpc

The VPC network in which the interface endpoint will be used.


lookupSupportedAzs?

Type: boolean (optional, default: false)

Limit to only those availability zones where the endpoint service can be created.

Setting this to 'true' requires a lookup to be performed at synthesis time. Account and region must be set on the containing stack for this to work.


open?

Type: boolean (optional, default: true)

Whether to automatically allow VPC traffic to the endpoint.

If enabled, all traffic to the endpoint from within the VPC will be automatically allowed. This is done based on the VPC's CIDR range.


privateDnsEnabled?

Type: boolean (optional, default: set by the instance of IInterfaceVpcEndpointService, or true if not defined by the instance of IInterfaceVpcEndpointService)

Whether to associate a private hosted zone with the specified VPC.

This allows you to make requests to the service using its default DNS hostname.


securityGroups?

Type: ISecurityGroup[] (optional, default: a new security group is created)

The security groups to associate with this interface VPC endpoint.


subnets?

Type: SubnetSelection (optional, default: private subnets)

The subnets in which to create an endpoint network interface.

At most one per availability zone.