create_transit_gateway_route

create_transit_gateway_route(**kwargs)

Creates a static route for the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_route(
    DestinationCidrBlock='string',
    TransitGatewayRouteTableId='string',
    TransitGatewayAttachmentId='string',
    Blackhole=True|False,
    DryRun=True|False
)
Parameters
  • DestinationCidrBlock (string) --

    [REQUIRED]

    The CIDR range used for destination matches. Routing decisions are based on the most specific match.

  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • TransitGatewayAttachmentId (string) -- The ID of the attachment.
  • Blackhole (boolean) -- Indicates whether to drop traffic that matches this route.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Route': {
        'DestinationCidrBlock': 'string',
        'PrefixListId': 'string',
        'TransitGatewayRouteTableAnnouncementId': 'string',
        'TransitGatewayAttachments': [
            {
                'ResourceId': 'string',
                'TransitGatewayAttachmentId': 'string',
                'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering'
            },
        ],
        'Type': 'static'|'propagated',
        'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted'
    }
}

Response Structure

  • (dict) --

    • Route (dict) --

      Information about the route.

      • DestinationCidrBlock (string) --

        The CIDR block used for destination matches.

      • PrefixListId (string) --

        The ID of the prefix list used for destination matches.

      • TransitGatewayRouteTableAnnouncementId (string) --

        The ID of the transit gateway route table announcement.

      • TransitGatewayAttachments (list) --

        The attachments.

        • (dict) --

          Describes a route attachment.

          • ResourceId (string) --

            The ID of the resource.

          • TransitGatewayAttachmentId (string) --

            The ID of the attachment.

          • ResourceType (string) --

            The resource type. Note that the tgw-peering resource type has been deprecated.

      • Type (string) --

        The route type.

      • State (string) --

        The state of the route.