DirectConnect / Client / create_transit_virtual_interface

create_transit_virtual_interface#

DirectConnect.Client.create_transit_virtual_interface(**kwargs)#

Creates a transit virtual interface. A transit virtual interface should be used to access one or more transit gateways associated with Direct Connect gateways. A transit virtual interface enables the connection of multiple VPCs attached to a transit gateway to a Direct Connect gateway.

Warning

If you associate your transit gateway with one or more Direct Connect gateways, the Autonomous System Number (ASN) used by the transit gateway and the Direct Connect gateway must be different. For example, if you use the default ASN 64512 for both your the transit gateway and Direct Connect gateway, the association request fails.

A jumbo MTU value must be either 1500 or 8500. No other values will be accepted. Setting the MTU of a virtual interface to 8500 (jumbo frames) can cause an update to the underlying physical connection if it wasn’t updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call DescribeConnections. To check whether your virtual interface supports jumbo frames, call DescribeVirtualInterfaces.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_virtual_interface(
    connectionId='string',
    newTransitVirtualInterface={
        'virtualInterfaceName': 'string',
        'vlan': 123,
        'asn': 123,
        'mtu': 123,
        'authKey': 'string',
        'amazonAddress': 'string',
        'customerAddress': 'string',
        'addressFamily': 'ipv4'|'ipv6',
        'directConnectGatewayId': 'string',
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'enableSiteLink': True|False
    }
)
Parameters:
  • connectionId (string) –

    [REQUIRED]

    The ID of the connection.

  • newTransitVirtualInterface (dict) –

    [REQUIRED]

    Information about the transit virtual interface.

    • virtualInterfaceName (string) –

      The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).

    • vlan (integer) –

      The ID of the VLAN.

    • asn (integer) –

      The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

      The valid values are 1-2147483647.

    • mtu (integer) –

      The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 8500. The default value is 1500.

    • authKey (string) –

      The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.

    • amazonAddress (string) –

      The IP address assigned to the Amazon interface.

    • customerAddress (string) –

      The IP address assigned to the customer interface.

    • addressFamily (string) –

      The address family for the BGP peer.

    • directConnectGatewayId (string) –

      The ID of the Direct Connect gateway.

    • tags (list) –

      The tags associated with the transitive virtual interface.

      • (dict) –

        Information about a tag.

        • key (string) – [REQUIRED]

          The key.

        • value (string) –

          The value.

    • enableSiteLink (boolean) –

      Indicates whether to enable or disable SiteLink.

Return type:

dict

Returns:

Response Syntax

{
    'virtualInterface': {
        'ownerAccount': 'string',
        'virtualInterfaceId': 'string',
        'location': 'string',
        'connectionId': 'string',
        'virtualInterfaceType': 'string',
        'virtualInterfaceName': 'string',
        'vlan': 123,
        'asn': 123,
        'amazonSideAsn': 123,
        'authKey': 'string',
        'amazonAddress': 'string',
        'customerAddress': 'string',
        'addressFamily': 'ipv4'|'ipv6',
        'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'down'|'deleting'|'deleted'|'rejected'|'unknown',
        'customerRouterConfig': 'string',
        'mtu': 123,
        'jumboFrameCapable': True|False,
        'virtualGatewayId': 'string',
        'directConnectGatewayId': 'string',
        'routeFilterPrefixes': [
            {
                'cidr': 'string'
            },
        ],
        'bgpPeers': [
            {
                'bgpPeerId': 'string',
                'asn': 123,
                'authKey': 'string',
                'addressFamily': 'ipv4'|'ipv6',
                'amazonAddress': 'string',
                'customerAddress': 'string',
                'bgpPeerState': 'verifying'|'pending'|'available'|'deleting'|'deleted',
                'bgpStatus': 'up'|'down'|'unknown',
                'awsDeviceV2': 'string',
                'awsLogicalDeviceId': 'string'
            },
        ],
        'region': 'string',
        'awsDeviceV2': 'string',
        'awsLogicalDeviceId': 'string',
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'siteLinkEnabled': True|False
    }
}

Response Structure

  • (dict) –

    • virtualInterface (dict) –

      Information about a virtual interface.

      • ownerAccount (string) –

        The ID of the Amazon Web Services account that owns the virtual interface.

      • virtualInterfaceId (string) –

        The ID of the virtual interface.

      • location (string) –

        The location of the connection.

      • connectionId (string) –

        The ID of the connection.

      • virtualInterfaceType (string) –

        The type of virtual interface. The possible values are private and public.

      • virtualInterfaceName (string) –

        The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).

      • vlan (integer) –

        The ID of the VLAN.

      • asn (integer) –

        The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

        The valid values are 1-2147483647.

      • amazonSideAsn (integer) –

        The autonomous system number (ASN) for the Amazon side of the connection.

      • authKey (string) –

        The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.

      • amazonAddress (string) –

        The IP address assigned to the Amazon interface.

      • customerAddress (string) –

        The IP address assigned to the customer interface.

      • addressFamily (string) –

        The address family for the BGP peer.

      • virtualInterfaceState (string) –

        The state of the virtual interface. The following are the possible values:

        • confirming: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.

        • verifying: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.

        • pending: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.

        • available: A virtual interface that is able to forward traffic.

        • down: A virtual interface that is BGP down.

        • deleting: A virtual interface is in this state immediately after calling DeleteVirtualInterface until it can no longer forward traffic.

        • deleted: A virtual interface that cannot forward traffic.

        • rejected: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the Confirming state is deleted by the virtual interface owner, the virtual interface enters the Rejected state.

        • unknown: The state of the virtual interface is not available.

      • customerRouterConfig (string) –

        The customer router configuration.

      • mtu (integer) –

        The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500.

      • jumboFrameCapable (boolean) –

        Indicates whether jumbo frames (9001 MTU) are supported.

      • virtualGatewayId (string) –

        The ID of the virtual private gateway. Applies only to private virtual interfaces.

      • directConnectGatewayId (string) –

        The ID of the Direct Connect gateway.

      • routeFilterPrefixes (list) –

        The routes to be advertised to the Amazon Web Services network in this Region. Applies to public virtual interfaces.

        • (dict) –

          Information about a route filter prefix that a customer can advertise through Border Gateway Protocol (BGP) over a public virtual interface.

          • cidr (string) –

            The CIDR block for the advertised route. Separate multiple routes using commas. An IPv6 CIDR must use /64 or shorter.

      • bgpPeers (list) –

        The BGP peers configured on this virtual interface.

        • (dict) –

          Information about a BGP peer.

          • bgpPeerId (string) –

            The ID of the BGP peer.

          • asn (integer) –

            The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.

          • authKey (string) –

            The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.

          • addressFamily (string) –

            The address family for the BGP peer.

          • amazonAddress (string) –

            The IP address assigned to the Amazon interface.

          • customerAddress (string) –

            The IP address assigned to the customer interface.

          • bgpPeerState (string) –

            The state of the BGP peer. The following are the possible values:

            • verifying: The BGP peering addresses or ASN require validation before the BGP peer can be created. This state applies only to public virtual interfaces.

            • pending: The BGP peer is created, and remains in this state until it is ready to be established.

            • available: The BGP peer is ready to be established.

            • deleting: The BGP peer is being deleted.

            • deleted: The BGP peer is deleted and cannot be established.

          • bgpStatus (string) –

            The status of the BGP peer. The following are the possible values:

            • up: The BGP peer is established. This state does not indicate the state of the routing function. Ensure that you are receiving routes over the BGP session.

            • down: The BGP peer is down.

            • unknown: The BGP peer status is not available.

          • awsDeviceV2 (string) –

            The Direct Connect endpoint that terminates the BGP peer.

          • awsLogicalDeviceId (string) –

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

      • region (string) –

        The Amazon Web Services Region where the virtual interface is located.

      • awsDeviceV2 (string) –

        The Direct Connect endpoint that terminates the physical connection.

      • awsLogicalDeviceId (string) –

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

      • tags (list) –

        The tags associated with the virtual interface.

        • (dict) –

          Information about a tag.

          • key (string) –

            The key.

          • value (string) –

            The value.

      • siteLinkEnabled (boolean) –

        Indicates whether SiteLink is enabled.

Exceptions

  • DirectConnect.Client.exceptions.DuplicateTagKeysException

  • DirectConnect.Client.exceptions.TooManyTagsException

  • DirectConnect.Client.exceptions.DirectConnectServerException

  • DirectConnect.Client.exceptions.DirectConnectClientException