GatewayVpcEndpointProps
- class aws_cdk.aws_ec2.GatewayVpcEndpointProps(*, service, subnets=None, vpc)
Bases:
GatewayVpcEndpointOptions
Construction properties for a GatewayVpcEndpoint.
- Parameters:
service (
IGatewayVpcEndpointService
) – The service to use for this gateway VPC endpoint.subnets (
Optional
[Sequence
[Union
[SubnetSelection
,Dict
[str
,Any
]]]]) – 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 VPCvpc (
IVpc
) – The VPC network in which the gateway endpoint will be used.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_ec2 as ec2 # gateway_vpc_endpoint_service: ec2.IGatewayVpcEndpointService # subnet: ec2.Subnet # subnet_filter: ec2.SubnetFilter # vpc: ec2.Vpc gateway_vpc_endpoint_props = ec2.GatewayVpcEndpointProps( service=gateway_vpc_endpoint_service, vpc=vpc, # the properties below are optional subnets=[ec2.SubnetSelection( availability_zones=["availabilityZones"], one_per_az=False, subnet_filters=[subnet_filter], subnet_group_name="subnetGroupName", subnets=[subnet], subnet_type=ec2.SubnetType.PRIVATE_ISOLATED )] )
Attributes
- service
The service to use for this gateway VPC endpoint.
- 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:
All subnets in the VPC
Example:
# vpc: ec2.Vpc vpc.add_gateway_endpoint("DynamoDbEndpoint", service=ec2.GatewayVpcEndpointAwsService.DYNAMODB, # Add only to ISOLATED subnets subnets=[ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE_ISOLATED) ] )
- vpc
The VPC network in which the gateway endpoint will be used.