AWS Direct Connect

2025/03/26 - AWS Direct Connect - 4 updated api methods

Changes  With this release, AWS Direct Connect allows you to tag your Direct Connect gateways. Tags are metadata that you can create and use to manage your Direct Connect gateways. For more information about tagging, see AWS Tagging Strategies.

CreateDirectConnectGateway (updated) Link ¶
Changes (request, response)
Request
{'tags': [{'key': 'string', 'value': 'string'}]}
Response
{'directConnectGateway': {'tags': [{'key': 'string', 'value': 'string'}]}}

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

client.create_direct_connect_gateway(
    directConnectGatewayName='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    amazonSideAsn=123
)
type directConnectGatewayName:

string

param directConnectGatewayName:

[REQUIRED]

The name of the Direct Connect gateway.

type tags:

list

param tags:

The key-value pair tags associated with the request.

  • (dict) --

    Information about a tag.

    • key (string) -- [REQUIRED]

      The key.

    • value (string) --

      The value.

type amazonSideAsn:

integer

param amazonSideAsn:

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.

rtype:

dict

returns:

Response Syntax

{
    'directConnectGateway': {
        'directConnectGatewayId': 'string',
        'directConnectGatewayName': 'string',
        'amazonSideAsn': 123,
        'ownerAccount': 'string',
        'directConnectGatewayState': 'pending'|'available'|'deleting'|'deleted',
        'stateChangeError': 'string',
        'tags': [
            {
                'key': 'string',
                'value': '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.

      • tags (list) --

        Information about a tag.

        • (dict) --

          Information about a tag.

          • key (string) --

            The key.

          • value (string) --

            The value.

DeleteDirectConnectGateway (updated) Link ¶
Changes (response)
{'directConnectGateway': {'tags': [{'key': 'string', 'value': 'string'}]}}

Deletes the specified Direct Connect gateway. You must first delete all virtual interfaces that are attached to the Direct Connect gateway and disassociate all virtual private gateways associated with the Direct Connect gateway.

See also: AWS API Documentation

Request Syntax

client.delete_direct_connect_gateway(
    directConnectGatewayId='string'
)
type directConnectGatewayId:

string

param directConnectGatewayId:

[REQUIRED]

The ID of the Direct Connect gateway.

rtype:

dict

returns:

Response Syntax

{
    'directConnectGateway': {
        'directConnectGatewayId': 'string',
        'directConnectGatewayName': 'string',
        'amazonSideAsn': 123,
        'ownerAccount': 'string',
        'directConnectGatewayState': 'pending'|'available'|'deleting'|'deleted',
        'stateChangeError': 'string',
        'tags': [
            {
                'key': 'string',
                'value': '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.

      • tags (list) --

        Information about a tag.

        • (dict) --

          Information about a tag.

          • key (string) --

            The key.

          • value (string) --

            The value.

DescribeDirectConnectGateways (updated) Link ¶
Changes (response)
{'directConnectGateways': {'tags': [{'key': 'string', 'value': 'string'}]}}

Lists all your Direct Connect gateways or only the specified Direct Connect gateway. Deleted Direct Connect gateways are not returned.

See also: AWS API Documentation

Request Syntax

client.describe_direct_connect_gateways(
    directConnectGatewayId='string',
    maxResults=123,
    nextToken='string'
)
type directConnectGatewayId:

string

param directConnectGatewayId:

The ID of the Direct Connect gateway.

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 provided in the previous call to retrieve the next page.

rtype:

dict

returns:

Response Syntax

{
    'directConnectGateways': [
        {
            'directConnectGatewayId': 'string',
            'directConnectGatewayName': 'string',
            'amazonSideAsn': 123,
            'ownerAccount': 'string',
            'directConnectGatewayState': 'pending'|'available'|'deleting'|'deleted',
            'stateChangeError': 'string',
            'tags': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • directConnectGateways (list) --

      The Direct Connect gateways.

      • (dict) --

        Information about a Direct Connect gateway, which enables you to connect virtual interfaces and virtual private gateway or transit gateways.

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

        • tags (list) --

          Information about a tag.

          • (dict) --

            Information about a tag.

            • key (string) --

              The key.

            • value (string) --

              The value.

    • nextToken (string) --

      The token to retrieve the next page.

UpdateDirectConnectGateway (updated) Link ¶
Changes (response)
{'directConnectGateway': {'tags': [{'key': 'string', 'value': 'string'}]}}

Updates the name of a current Direct Connect gateway.

See also: AWS API Documentation

Request Syntax

client.update_direct_connect_gateway(
    directConnectGatewayId='string',
    newDirectConnectGatewayName='string'
)
type directConnectGatewayId:

string

param directConnectGatewayId:

[REQUIRED]

The ID of the Direct Connect gateway to update.

type newDirectConnectGatewayName:

string

param newDirectConnectGatewayName:

[REQUIRED]

The new name for the Direct Connect gateway.

rtype:

dict

returns:

Response Syntax

{
    'directConnectGateway': {
        'directConnectGatewayId': 'string',
        'directConnectGatewayName': 'string',
        'amazonSideAsn': 123,
        'ownerAccount': 'string',
        'directConnectGatewayState': 'pending'|'available'|'deleting'|'deleted',
        'stateChangeError': 'string',
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • directConnectGateway (dict) --

      Informaiton about a Direct Connect gateway, which enables you to connect virtual interfaces and virtual private gateways or transit gateways.

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

      • tags (list) --

        Information about a tag.

        • (dict) --

          Information about a tag.

          • key (string) --

            The key.

          • value (string) --

            The value.