EC2 / Client / delete_transit_gateway_route



Deletes the specified route from the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_route(
  • TransitGatewayRouteTableId (string) –


    The ID of the transit gateway route table.

  • DestinationCidrBlock (string) –


    The CIDR range for the route. This must match the CIDR for the route exactly.

  • 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:



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.