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.104.0 (build e79254c)",
date="2024-12-06T14:43:17.921Z")
@Stability(Stable)
public interface GatewayVpcEndpointOptions
extends software.amazon.jsii.JsiiSerializable
Options to add a gateway endpoint to a VPC.
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());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forGatewayVpcEndpointOptions
static final class
An implementation forGatewayVpcEndpointOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
The service to use for this gateway VPC endpoint.default List<SubnetSelection>
Where to add endpoint routing.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getService
The service to use for this gateway VPC endpoint. -
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
- Returns:
- a
GatewayVpcEndpointOptions.Builder
ofGatewayVpcEndpointOptions
-