replace_transit_gateway_route

EC2.Client.replace_transit_gateway_route(**kwargs)

Replaces the specified route in the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

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

  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

  • TransitGatewayAttachmentId (string) -- The ID of the attachment.
  • Blackhole (boolean) -- Indicates whether traffic matching this route is to be dropped.
  • 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 modified 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.