Skip to content
v2.274.0

InterfaceVpcEndpointService Class ​

A custom-hosted service for an interface VPC endpoint.

Example ​

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),
  // Choose which availability zones to place the VPC endpoint in, based on
  // available AZs
  subnets: {
    availabilityZones: ['us-east-1a', 'us-east-1c']
  }
});
python
# vpc: ec2.Vpc


ec2.InterfaceVpcEndpoint(self, "VPC Endpoint",
    vpc=vpc,
    service=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=ec2.SubnetSelection(
        availability_zones=["us-east-1a", "us-east-1c"]
    )
)
java
Vpc vpc;


InterfaceVpcEndpoint.Builder.create(this, "VPC Endpoint")
        .vpc(vpc)
        .service(new 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(SubnetSelection.builder()
                .availabilityZones(List.of("us-east-1a", "us-east-1c"))
                .build())
        .build();
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),
    // Choose which availability zones to place the VPC endpoint in, based on
    // available AZs
    Subnets = new SubnetSelection {
        AvailabilityZones = new [] { "us-east-1a", "us-east-1c" }
    }
});
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)),
	// Choose which availability zones to place the VPC endpoint in, based on
	// available AZs
	Subnets: &SubnetSelection{
		AvailabilityZones: []*string{
			jsii.String("us-east-1a"),
			jsii.String("us-east-1c"),
		},
	},
})

Initializer ​

ts
new InterfaceVpcEndpointService(name: string, port?: number)
python
InterfaceVpcEndpointService(name: str, port: typing.Optional[int | float] = None)
java
new InterfaceVpcEndpointService(String name, Number port)
csharp
new InterfaceVpcEndpointService(string name, double? port = null)
go
NewInterfaceVpcEndpointService(Name *string, Port *float64)

Properties ​

namestringnamestrnameStringNamestringName*stringrequired#
The name of the service.
portnumberportint | floatportNumberPortdoublePort*float64required#
The port of the service.
privateDnsDefaultbooleanprivate_dns_defaultboolprivateDnsDefaultBooleanPrivateDnsDefaultboolPrivateDnsDefault*bool#
Whether Private DNS is supported by default.