Class GatewayVpcEndpointAwsService

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ec2.GatewayVpcEndpointAwsService
All Implemented Interfaces:
IGatewayVpcEndpointService, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.322Z") @Stability(Stable) public class GatewayVpcEndpointAwsService extends software.amazon.jsii.JsiiObject implements IGatewayVpcEndpointService
An AWS service for 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());
 
  • Field Details

  • Constructor Details

    • GatewayVpcEndpointAwsService

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

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

      @Stability(Stable) public GatewayVpcEndpointAwsService(@NotNull String name, @Nullable String prefix)
      Parameters:
      name - This parameter is required.
      prefix -
    • GatewayVpcEndpointAwsService

      @Stability(Stable) public GatewayVpcEndpointAwsService(@NotNull String name)
      Parameters:
      name - This parameter is required.
  • Method Details