Class GatewayVpcEndpoint

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IResource, IGatewayVpcEndpoint, IVpcEndpoint, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.319Z") @Stability(Stable) public class GatewayVpcEndpoint extends VpcEndpoint implements IGatewayVpcEndpoint
A gateway VPC endpoint.

Example:

 // Add gateway endpoints when creating the VPC
 Vpc vpc = Vpc.Builder.create(this, "MyVpc")
         .gatewayEndpoints(Map.of(
                 "S3", GatewayVpcEndpointOptions.builder()
                         .service(GatewayVpcEndpointAwsService.S3)
                         .build()))
         .build();
 // Alternatively gateway endpoints can be added on the VPC
 GatewayVpcEndpoint dynamoDbEndpoint = vpc.addGatewayEndpoint("DynamoDbEndpoint", GatewayVpcEndpointOptions.builder()
         .service(GatewayVpcEndpointAwsService.DYNAMODB)
         .build());
 // This allows to customize the endpoint policy
 dynamoDbEndpoint.addToPolicy(
 PolicyStatement.Builder.create() // Restrict to listing and describing tables
         .principals(List.of(new AnyPrincipal()))
         .actions(List.of("dynamodb:DescribeTable", "dynamodb:ListTables"))
         .resources(List.of("*")).build());
 // Add an interface endpoint
 vpc.addInterfaceEndpoint("EcrDockerEndpoint", InterfaceVpcEndpointOptions.builder()
         .service(InterfaceVpcEndpointAwsService.ECR_DOCKER)
         .build());
 
  • Constructor Details

    • GatewayVpcEndpoint

      protected GatewayVpcEndpoint(software.amazon.jsii.JsiiObjectRef objRef)
    • GatewayVpcEndpoint

      protected GatewayVpcEndpoint(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • GatewayVpcEndpoint

      @Stability(Stable) public GatewayVpcEndpoint(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull GatewayVpcEndpointProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromGatewayVpcEndpointId

      @Stability(Stable) @NotNull public static IGatewayVpcEndpoint fromGatewayVpcEndpointId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String gatewayVpcEndpointId)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      gatewayVpcEndpointId - This parameter is required.
    • getVpcEndpointCreationTimestamp

      @Stability(Stable) @NotNull public String getVpcEndpointCreationTimestamp()
      The date and time the gateway VPC endpoint was created.
    • getVpcEndpointDnsEntries

      @Stability(Stable) @NotNull public List<String> getVpcEndpointDnsEntries()
    • getVpcEndpointId

      @Stability(Stable) @NotNull public String getVpcEndpointId()
      The gateway VPC endpoint identifier.
      Specified by:
      getVpcEndpointId in interface IVpcEndpoint
      Specified by:
      getVpcEndpointId in class VpcEndpoint
    • getVpcEndpointNetworkInterfaceIds

      @Stability(Stable) @NotNull public List<String> getVpcEndpointNetworkInterfaceIds()