GatewayVpcEndpointOptions

class aws_cdk.aws_ec2.GatewayVpcEndpointOptions(*, service, subnets=None)

Bases: object

__init__(*, service, subnets=None)

Options to add a gateway endpoint to a VPC.

Parameters
  • service (IGatewayVpcEndpointService) – The service to use for this gateway VPC endpoint.

  • subnets (Optional[List[SubnetSelection]]) – 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

Return type

None

Attributes

service

The service to use for this gateway VPC endpoint.

Return type

IGatewayVpcEndpointService

subnets

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 :default: - All subnets in the VPC

Example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
vpc.add_gateway_endpoint("DynamoDbEndpoint",
    service=ec2.GatewayVpcEndpointAwsService.DYNAMODB,
    # Add only to ISOLATED subnets
    subnets=[{"subnet_type": ec2.SubnetType.ISOLATED}
    ]
)
Return type

Optional[List[SubnetSelection]]