InterfaceVpcEndpointOptions Struct
Options to add an interface endpoint to a VPC.
Example
// Add gateway endpoints when creating the VPC
const vpc = new ec2.Vpc(this, 'MyVpc', {
gatewayEndpoints: {
S3: {
service: ec2.GatewayVpcEndpointAwsService.S3,
},
},
});
// Alternatively gateway endpoints can be added on the VPC
const dynamoDbEndpoint = vpc.addGatewayEndpoint('DynamoDbEndpoint', {
service: ec2.GatewayVpcEndpointAwsService.DYNAMODB,
});
// This allows to customize the endpoint policy
dynamoDbEndpoint.addToPolicy(
new iam.PolicyStatement({ // Restrict to listing and describing tables
principals: [new iam.AnyPrincipal()],
actions: ['dynamodb:DescribeTable', 'dynamodb:ListTables'],
resources: ['*'],
}));
// Add an interface endpoint
vpc.addInterfaceEndpoint('EcrDockerEndpoint', {
service: ec2.InterfaceVpcEndpointAwsService.ECR_DOCKER,
// Uncomment the following to allow more fine-grained control over
// who can access the endpoint via the '.connections' object.
// open: false
});
Properties
dnsRecordIpTypeVpcEndpointDnsRecordIpTypedns_record_ip_typeVpcEndpointDnsRecordIpTypednsRecordIpTypeVpcEndpointDnsRecordIpTypeDnsRecordIpTypeVpcEndpointDnsRecordIpTypeDnsRecordIpTypeVpcEndpointDnsRecordIpType#Default: not specified
ipAddressTypeVpcEndpointIpAddressTypeip_address_typeVpcEndpointIpAddressTypeipAddressTypeVpcEndpointIpAddressTypeIpAddressTypeVpcEndpointIpAddressTypeIpAddressTypeVpcEndpointIpAddressType#Default: not specified
lookupSupportedAzsbooleanlookup_supported_azsboollookupSupportedAzsBooleanLookupSupportedAzsboolLookupSupportedAzs*bool= false#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.
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.
privateDnsEnabledbooleanprivate_dns_enabledboolprivateDnsEnabledBooleanPrivateDnsEnabledboolPrivateDnsEnabled*bool#Default: set by the instance of IInterfaceVpcEndpointService, or true if not defined by the instance of IInterfaceVpcEndpointService
This allows you to make requests to the service using its default DNS hostname.
privateDnsOnlyForInboundResolverEndpointVpcEndpointPrivateDnsOnlyForInboundResolverEndpointprivate_dns_only_for_inbound_resolver_endpointVpcEndpointPrivateDnsOnlyForInboundResolverEndpointprivateDnsOnlyForInboundResolverEndpointVpcEndpointPrivateDnsOnlyForInboundResolverEndpointPrivateDnsOnlyForInboundResolverEndpointVpcEndpointPrivateDnsOnlyForInboundResolverEndpointPrivateDnsOnlyForInboundResolverEndpointVpcEndpointPrivateDnsOnlyForInboundResolverEndpoint#Default: not specified
securityGroupsISecurityGroup[]security_groupstyping.List[ISecurityGroup]securityGroupsList<ISecurityGroup>SecurityGroupsISecurityGroup[]SecurityGroups*[]ISecurityGroup#Default: a new security group is created
serviceIInterfaceVpcEndpointServiceserviceIInterfaceVpcEndpointServiceserviceIInterfaceVpcEndpointServiceServiceIInterfaceVpcEndpointServiceServiceIInterfaceVpcEndpointServicerequired#Default: Same region as the interface VPC endpoint
Only needs to be specified for cross-region VPC endpoints.
subnetsSubnetSelectionsubnetsSubnetSelectionsubnetsSubnetSelectionSubnetsSubnetSelectionSubnetsSubnetSelection#Default: private subnets
At most one per availability zone.