AWS Direct Connect

2026/08/03 - AWS Direct Connect - 1 new api methods

Changes  Added route visibility support for AWS Direct Connect, allowing customers to call ListVirtualInterfaceRoutes to view the BGP routes including AS path and BGP communities advertised over their virtual interfaces.

ListVirtualInterfaceRoutes (new) Link ΒΆ

Lists the routes for the specified virtual interface.

Use the routeDirection filter to control which routes are returned:

  • accepted: routes received from the customer network over the virtual interface.

  • advertised: routes advertised to the customer network over the virtual interface.

See also: AWS API Documentation

Request Syntax

client.list_virtual_interface_routes(
    virtualInterfaceId='string',
    filters={
        'routeDirection': 'accepted'|'advertised',
        'addressFamily': 'ipv4'|'ipv6',
        'cidrs': [
            'string',
        ],
        'asPath': [
            123,
        ],
        'communities': [
            'string',
        ]
    },
    maxResults=123,
    nextToken='string'
)
type virtualInterfaceId:

string

param virtualInterfaceId:

The ID of the virtual interface.

type filters:

dict

param filters:

The filters to apply to the routes returned.

  • routeDirection (string) --

    The direction of the routes to return.

    The valid values are accepted (routes received from the customer network) and advertised (routes advertised to the customer network).

  • addressFamily (string) --

    The address family of the routes to return.

    The valid values are ipv4 and ipv6.

  • cidrs (list) --

    The CIDRs (prefixes) used to filter the routes. You can specify up to 10 CIDRs.

    • (string) --

  • asPath (list) --

    The autonomous system (AS) numbers used to filter the routes by their AS path.

    • (integer) --

  • communities (list) --

    The BGP communities used to filter the routes.

    • (string) --

type maxResults:

integer

param maxResults:

The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

If MaxResults is given a value larger than 100, only 100 results are returned.

type nextToken:

string

param nextToken:

The token for the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'virtualInterfaceId': 'string',
    'routes': [
        {
            'cidr': 'string',
            'routeDirection': 'accepted'|'advertised',
            'addressFamily': 'ipv4'|'ipv6',
            'asPath': [
                {
                    'pathType': 'seq'|'set',
                    'path': [
                        123,
                    ]
                },
            ],
            'communities': [
                'string',
            ],
            'awsLogicalDeviceId': 'string',
            'routeInstalledAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • virtualInterfaceId (string) --

      The ID of the virtual interface.

    • routes (list) --

      The routes for the virtual interface.

      • (dict) --

        Information about a route for a virtual interface.

        • cidr (string) --

          The CIDR (prefix) of the route.

        • routeDirection (string) --

          The direction of the route.

          The valid values are accepted (received from the customer network) and advertised (advertised to the customer network).

        • addressFamily (string) --

          The address family of the route.

          The valid values are ipv4 and ipv6.

        • asPath (list) --

          The autonomous system (AS) path of the route.

          • (dict) --

            A segment of an autonomous system (AS) path.

            • pathType (string) --

              The type of the AS path segment.

              The valid values are seq (an ordered AS_SEQUENCE) and set (an unordered AS_SET).

            • path (list) --

              The autonomous system (AS) numbers in the segment.

              • (integer) --

        • communities (list) --

          The BGP communities associated with the route.

          • (string) --

        • awsLogicalDeviceId (string) --

          The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.

        • routeInstalledAt (datetime) --

          The time when the route was installed. The value is displayed in UTC format.

    • nextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.