CreateTransitGatewayRoute#

Description#

Request to create a route in a transit gateway route table.

Request Parameters#

Required parameters#

  • DestinationCidrBlock — The CIDR address block used for the destination match.

    • Type: String

    • Required: Yes

  • TransitGatewayRouteTableId — The ID of the transit gateway route table.

    • Type: String

    • Required: Yes

Optional parameters#

  • Blackhole — Route state in which traffic will be lost.

    • Type: Boolean

    • Required: No

    • Constraints: Cannot be used with the TransitGatewayAttachmentId option

  • TransitGatewayAttachmentId — The ID of the transit gateway attachment.

    • Type: String

    • Required: No

    • Constraints: Cannot be used with the Blackhole option

Response Elements#

  • requestId — The request ID

    • Type: String

  • route — Information about the route

Examples#

c2-ec2 CreateTransitGatewayRoute TransitGatewayRouteTableId tgw-rtb-12345678 DestinationCidrBlock 10.10.10.0/24 Blackhole True
c2-ec2 CreateTransitGatewayRoute TransitGatewayRouteTableId tgw-rtb-12345678 DestinationCidrBlock 10.10.10.0/24 TransitGatewayAttachmentId tgw-attach-12345678