DirectConnect / Client / create_direct_connect_gateway

create_direct_connect_gateway#

DirectConnect.Client.create_direct_connect_gateway(**kwargs)#

Creates a Direct Connect gateway, which is an intermediate object that enables you to connect a set of virtual interfaces and virtual private gateways. A Direct Connect gateway is global and visible in any Amazon Web Services Region after it is created. The virtual interfaces and virtual private gateways that are connected through a Direct Connect gateway can be in different Amazon Web Services Regions. This enables you to connect to a VPC in any Region, regardless of the Region in which the virtual interfaces are located, and pass traffic between them.

See also: AWS API Documentation

Request Syntax

response = client.create_direct_connect_gateway(
    directConnectGatewayName='string',
    amazonSideAsn=123
)
Parameters:
  • directConnectGatewayName (string) –

    [REQUIRED]

    The name of the Direct Connect gateway.

  • amazonSideAsn (integer) – The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294. The default is 64512.

Return type:

dict

Returns:

Response Syntax

{
    'directConnectGateway': {
        'directConnectGatewayId': 'string',
        'directConnectGatewayName': 'string',
        'amazonSideAsn': 123,
        'ownerAccount': 'string',
        'directConnectGatewayState': 'pending'|'available'|'deleting'|'deleted',
        'stateChangeError': 'string'
    }
}

Response Structure

  • (dict) –

    • directConnectGateway (dict) –

      The Direct Connect gateway.

      • directConnectGatewayId (string) –

        The ID of the Direct Connect gateway.

      • directConnectGatewayName (string) –

        The name of the Direct Connect gateway.

      • amazonSideAsn (integer) –

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

      • ownerAccount (string) –

        The ID of the Amazon Web Services account that owns the Direct Connect gateway.

      • directConnectGatewayState (string) –

        The state of the Direct Connect gateway. The following are the possible values:

        • pending: The initial state after calling CreateDirectConnectGateway.

        • available: The Direct Connect gateway is ready for use.

        • deleting: The initial state after calling DeleteDirectConnectGateway.

        • deleted: The Direct Connect gateway is deleted and cannot pass traffic.

      • stateChangeError (string) –

        The error message if the state of an object failed to advance.

Exceptions

  • DirectConnect.Client.exceptions.DirectConnectServerException

  • DirectConnect.Client.exceptions.DirectConnectClientException