# InterfaceVpcEndpointProps

Construction properties for an InterfaceVpcEndpoint.

Extends: [InterfaceVpcEndpointOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InterfaceVpcEndpointOptions.html)
Used as props by: [InterfaceVpcEndpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint.html)

- Source: [`aws-ec2/lib/vpc-endpoint.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts#L1043)

## Example

TypeScript:

```ts
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),
  subnets: {
    subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
    availabilityZones: ['us-east-1a', 'us-east-1c']
  }
});
```

Python:

```python
# vpc: ec2.Vpc

ec2.InterfaceVpcEndpoint(self, "VPC Endpoint",
    vpc=vpc,
    service=ec2.InterfaceVpcEndpointService("com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc", 443),
    subnets=ec2.SubnetSelection(
        subnet_type=ec2.SubnetType.PRIVATE_ISOLATED,
        availability_zones=["us-east-1a", "us-east-1c"]
    )
)
```

Java:

```java
Vpc vpc;

InterfaceVpcEndpoint.Builder.create(this, "VPC Endpoint")
        .vpc(vpc)
        .service(new InterfaceVpcEndpointService("com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc", 443))
        .subnets(SubnetSelection.builder()
                .subnetType(SubnetType.PRIVATE_ISOLATED)
                .availabilityZones(List.of("us-east-1a", "us-east-1c"))
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;

new InterfaceVpcEndpoint(this, "VPC Endpoint", new InterfaceVpcEndpointProps {
    Vpc = vpc,
    Service = new InterfaceVpcEndpointService("com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc", 443),
    Subnets = new SubnetSelection {
        SubnetType = SubnetType.PRIVATE_ISOLATED,
        AvailabilityZones = new [] { "us-east-1a", "us-east-1c" }
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc

ec2.NewInterfaceVpcEndpoint(this, jsii.String("VPC Endpoint"), &InterfaceVpcEndpointProps{
	Vpc: Vpc,
	Service: ec2.NewInterfaceVpcEndpointService(jsii.String("com.amazonaws.vpce.us-east-1.vpce-svc-uuddlrlrbastrtsvc"), jsii.Number(443)),
	Subnets: &SubnetSelection{
		SubnetType: ec2.SubnetType_PRIVATE_ISOLATED,
		AvailabilityZones: []*string{
			jsii.String("us-east-1a"),
			jsii.String("us-east-1c"),
		},
	},
})
```

## Properties

- `dnsRecordIpType`: [VpcEndpointDnsRecordIpType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcEndpointDnsRecordIpType.html) — Type of DNS records created for the VPC endpoint.

  **Default:** not specified

- `ipAddressType`: [VpcEndpointIpAddressType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcEndpointIpAddressType.html) — The IP address type for the endpoint.

  **Default:** not specified

- `lookupSupportedAzs`: boolean = 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`: boolean = 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`: boolean — Whether to associate a private hosted zone with the specified VPC.

  **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.

- `privateDnsOnlyForInboundResolverEndpoint`: [VpcEndpointPrivateDnsOnlyForInboundResolverEndpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcEndpointPrivateDnsOnlyForInboundResolverEndpoint.html) — Whether to enable private DNS only for inbound endpoints.

  **Default:** not specified

- `securityGroups`: [ISecurityGroup](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.ISecurityGroup.html)[] — The security groups to associate with this interface VPC endpoint.

  **Default:** a new security group is created

- `service`: [IInterfaceVpcEndpointService](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IInterfaceVpcEndpointService.html) (required) — The service to use for this interface VPC endpoint.

- `serviceRegion`: string — The region where the VPC endpoint service is located.

  **Default:** Same region as the interface VPC endpoint

  Only needs to be specified for cross-region VPC endpoints.

- `subnets`: [SubnetSelection](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) — The subnets in which to create an endpoint network interface.

  **Default:** private subnets

  At most one
  per availability zone.

- `vpc`: [IVpc](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) (required) — The VPC network in which the interface endpoint will be used.
