@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.417Z") @Stability(value=Stable) public interface GatewayVpcEndpointOptions extends software.amazon.jsii.JsiiSerializable
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());
| Modifier and Type | Interface and Description |
|---|---|
static class |
GatewayVpcEndpointOptions.Builder
A builder for
GatewayVpcEndpointOptions |
static class |
GatewayVpcEndpointOptions.Jsii$Proxy
An implementation for
GatewayVpcEndpointOptions |
| Modifier and Type | Method and Description |
|---|---|
static GatewayVpcEndpointOptions.Builder |
builder() |
IGatewayVpcEndpointService |
getService()
The service to use for this gateway VPC endpoint.
|
default List<SubnetSelection> |
getSubnets()
Where to add endpoint routing.
|
@Stability(value=Stable) @NotNull IGatewayVpcEndpointService getService()
@Stability(value=Stable) @Nullable default List<SubnetSelection> getSubnets()
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:
// Example automatically generated from non-compiling source. May contain errors.
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());
@Stability(value=Stable) static GatewayVpcEndpointOptions.Builder builder()
GatewayVpcEndpointOptions.Builder of GatewayVpcEndpointOptionsCopyright © 2022. All rights reserved.