Interface GatewayVpcEndpointOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
GatewayVpcEndpointProps
All Known Implementing Classes:
GatewayVpcEndpointOptions.Jsii$Proxy, GatewayVpcEndpointProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-08-13T16:20:04.917Z") @Stability(Stable) public interface GatewayVpcEndpointOptions extends software.amazon.jsii.JsiiSerializable
Options to add a gateway endpoint to a VPC.

Example:

 // Interface endpoint with IPv6
 vpc.addInterfaceEndpoint("ExampleEndpoint", InterfaceVpcEndpointOptions.builder()
         .service(InterfaceVpcEndpointAwsService.ECR)
         .ipAddressType(VpcEndpointIpAddressType.IPV6)
         .dnsRecordIpType(VpcEndpointDnsRecordIpType.IPV6)
         .build());
 // Gateway endpoint with dualstack
 vpc.addGatewayEndpoint("S3DualstackEndpoint", GatewayVpcEndpointOptions.builder()
         .service(GatewayVpcEndpointAwsService.S3)
         .ipAddressType(VpcEndpointIpAddressType.DUALSTACK)
         .dnsRecordIpType(VpcEndpointDnsRecordIpType.DUALSTACK)
         .build());
 
  • Method Details

    • getService

      @Stability(Stable) @NotNull IGatewayVpcEndpointService getService()
      The service to use for this gateway VPC endpoint.
    • getDnsRecordIpType

      @Stability(Stable) @Nullable default VpcEndpointDnsRecordIpType getDnsRecordIpType()
      Type of DNS records created for the VPC endpoint.

      Default: not specified

    • getIpAddressType

      @Stability(Stable) @Nullable default VpcEndpointIpAddressType getIpAddressType()
      The IP address type for the endpoint.

      Default: not specified

    • getSubnets

      @Stability(Stable) @Nullable default List<SubnetSelection> getSubnets()
      Where to add endpoint routing.

      By default, this endpoint will be routable from all subnets in the VPC. Specify a list of subnet selection objects here to be more specific.

      Default: - All subnets in the VPC

      Example:

       Vpc vpc;
       vpc.addGatewayEndpoint("DynamoDbEndpoint", GatewayVpcEndpointOptions.builder()
               .service(GatewayVpcEndpointAwsService.DYNAMODB)
               // Add only to ISOLATED subnets
               .subnets(List.of(SubnetSelection.builder().subnetType(SubnetType.PRIVATE_ISOLATED).build()))
               .build());
       
    • builder

      @Stability(Stable) static GatewayVpcEndpointOptions.Builder builder()
      Returns:
      a GatewayVpcEndpointOptions.Builder of GatewayVpcEndpointOptions