Skip to content

AWS::EC2::Route

Specifies a route in a route table.

Generated by cfn-typegen --out cfn_types AWS::EC2::Route into cfn_types/ec2.py:

# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::EC2 resources."""

from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr


CONSTRAINTS:dict[str,Any]={
}


ATTRIBUTES:dict[str,Any]={"AWS::EC2::Route":["CidrBlock","RouteTableId"]}


RULES:dict[str,Any]={}
Nested types (3)

These are defined above the properties in the generated module.

class RouteProps(TypedDict, closed=True):
    'Specifies a route in a route table.'
    CarrierGatewayId: NotRequired[Expr[str]]
    'The ID of the carrier gateway.'
    CoreNetworkArn: NotRequired[Expr[str]]
    'The Amazon Resource Name (ARN) of the core network.'
    DestinationCidrBlock: NotRequired[Expr[str]]
    'The IPv4 CIDR address block used for the destination match.'
    DestinationIpv6CidrBlock: NotRequired[Expr[str]]
    'The IPv6 CIDR block used for the destination match.'
    DestinationPrefixListId: NotRequired[Expr[str]]
    'The ID of a prefix list used for the destination match.'
    EgressOnlyInternetGatewayId: NotRequired[Expr[str]]
    '[IPv6 traffic only] The ID of an egress-only internet gateway.'
    GatewayId: NotRequired[Expr[str]]
    'The ID of an internet gateway or virtual private gateway attached to your VPC.'
    InstanceId: NotRequired[Expr[str]]
    'The ID of a NAT instance in your VPC.'
    LocalGatewayId: NotRequired[Expr[str]]
    'The ID of the local gateway.'
    NatGatewayId: NotRequired[Expr[str]]
    '[IPv4 traffic only] The ID of a NAT gateway.'
    NetworkInterfaceId: NotRequired[Expr[str]]
    'The ID of a network interface.'
    RouteTableId: Expr[str]
    'The ID of the route table for the route.'
    TransitGatewayId: NotRequired[Expr[str]]
    'The ID of a transit gateway.'
    VpcEndpointId: NotRequired[Expr[str]]
    'The ID of a VPC endpoint.'
    VpcPeeringConnectionId: NotRequired[Expr[str]]
    'The ID of a VPC peering connection.'
    OdbNetworkArn: NotRequired[Expr[str]]
    'The Amazon Resource Name (ARN) of the ODB network.'


class Route(ResourceAttrs):
    'Specifies a route in a route table.'
    Type: Literal['AWS::EC2::Route']
    Properties: RouteProps


def route(
    *,
    depends_on: DependsOn | None = None,
    deletion_policy: DeletionPolicy | None = None,
    update_replace_policy: UpdateReplacePolicy | None = None,
    condition: str | None = None,
    metadata: dict[str, Any] | None = None,
    **props: Unpack[RouteProps],
) -> Route:
    return build('AWS::EC2::Route', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)

Attributes

Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.

  • CidrBlock