RouteTargetProps

class aws_cdk.aws_ec2_alpha.RouteTargetProps(*, endpoint=None, gateway=None)

Bases: object

(experimental) The type of endpoint or gateway being targeted by the route.

Parameters:
  • endpoint (Optional[IVpcEndpoint]) – (experimental) The endpoint route target. This is used for targets such as VPC endpoints. Default: - target is not set to an endpoint, in this case a gateway is needed.

  • gateway (Optional[IRouteTarget]) – (experimental) The gateway route target. This is used for targets such as egress-only internet gateway or VPC peering connection. Default: - target is not set to a gateway, in this case an endpoint is needed.

Stability:

experimental

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2_alpha as ec2_alpha
from aws_cdk import aws_ec2 as ec2

# route_target: ec2_alpha.IRouteTarget
# vpc_endpoint: ec2.VpcEndpoint

route_target_props = ec2_alpha.RouteTargetProps(
    endpoint=vpc_endpoint,
    gateway=route_target
)

Attributes

endpoint

(experimental) The endpoint route target.

This is used for targets such as VPC endpoints.

Default:
  • target is not set to an endpoint, in this case a gateway is needed.

Stability:

experimental

gateway

(experimental) The gateway route target.

This is used for targets such as egress-only internet gateway or VPC peering connection.

Default:
  • target is not set to a gateway, in this case an endpoint is needed.

Stability:

experimental