Skip to main content

direct_connect_gateways

Creates, updates, deletes, gets or lists a direct_connect_gateways resource.

Overview

Namedirect_connect_gateways
TypeResource
Idaws.directconnect.direct_connect_gateways

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
amazon_side_asninteger (int64)The autonomous system number (AS) for the Amazon side of the connection.
direct_connect_gateway_idstringThe ID of the Direct Connect gateway.
direct_connect_gateway_namestringThe name of the Direct Connect gateway.
direct_connect_gateway_statestringThe 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. (pending, available, deleting, deleted)
owner_accountstringThe ID of the Amazon Web Services account that owns the Direct Connect gateway.
state_change_errorstringThe error message if the state of an object failed to advance.
tagsarrayInformation about a tag.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_direct_connect_gatewaysselectregionLists all your Direct Connect gateways or only the specified Direct Connect gateway. Deleted Direct Connect gateways are not returned.
create_direct_connect_gatewayinsertregion, directConnectGatewayNameCreates 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.
update_direct_connect_gatewayupdateregion, directConnectGatewayId, newDirectConnectGatewayNameUpdates the name of a current Direct Connect gateway.
delete_direct_connect_gatewaydeleteregionDeletes 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.
confirm_transit_virtual_interfaceexecregion, virtualInterfaceId, directConnectGatewayIdAccepts ownership of a transit virtual interface created by another Amazon Web Services account. After the owner of the transit virtual interface makes this call, the specified transit virtual interface is created and made available to handle traffic.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

SELECT
amazon_side_asn,
direct_connect_gateway_id,
direct_connect_gateway_name,
direct_connect_gateway_state,
owner_account,
state_change_error,
tags
FROM aws.directconnect.direct_connect_gateways
WHERE region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.directconnect.direct_connect_gateways (
directConnectGatewayName,
tags,
amazonSideAsn,
region
)
SELECT
'{{ directConnectGatewayName }}' /* required */,
'{{ tags }}',
{{ amazonSideAsn }},
'{{ region }}'
RETURNING
direct_connect_gateway
;

UPDATE examples

Updates the name of a current Direct Connect gateway.

UPDATE aws.directconnect.direct_connect_gateways
SET
directConnectGatewayId = '{{ directConnectGatewayId }}',
newDirectConnectGatewayName = '{{ newDirectConnectGatewayName }}'
WHERE
region = '{{ region }}' --required
AND directConnectGatewayId = '{{ directConnectGatewayId }}' --required
AND newDirectConnectGatewayName = '{{ newDirectConnectGatewayName }}' --required
RETURNING
direct_connect_gateway;

DELETE examples

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.

DELETE FROM aws.directconnect.direct_connect_gateways
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Accepts ownership of a transit virtual interface created by another Amazon Web Services account. After the owner of the transit virtual interface makes this call, the specified transit virtual interface is created and made available to handle traffic.

EXEC aws.directconnect.direct_connect_gateways.confirm_transit_virtual_interface
@region='{{ region }}' --required
@@json=
'{
"virtualInterfaceId": "{{ virtualInterfaceId }}",
"directConnectGatewayId": "{{ directConnectGatewayId }}"
}'
;