direct_connect_gateways
Creates, updates, deletes, gets or lists a direct_connect_gateways resource.
Overview
| Name | direct_connect_gateways |
| Type | Resource |
| Id | aws.directconnect.direct_connect_gateways |
Fields
The following fields are returned by SELECT queries:
- describe_direct_connect_gateways
| Name | Datatype | Description |
|---|---|---|
amazon_side_asn | integer (int64) | The autonomous system number (AS) for the Amazon side of the connection. |
direct_connect_gateway_id | string | The ID of the Direct Connect gateway. |
direct_connect_gateway_name | string | The name of the Direct Connect gateway. |
direct_connect_gateway_state | 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. (pending, available, deleting, deleted) |
owner_account | string | The ID of the Amazon Web Services account that owns the Direct Connect gateway. |
state_change_error | string | The error message if the state of an object failed to advance. |
tags | array | Information about a tag. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_direct_connect_gateways | select | region | Lists all your Direct Connect gateways or only the specified Direct Connect gateway. Deleted Direct Connect gateways are not returned. | |
create_direct_connect_gateway | insert | region, directConnectGatewayName | 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. | |
update_direct_connect_gateway | update | region, directConnectGatewayId, newDirectConnectGatewayName | Updates the name of a current Direct Connect gateway. | |
delete_direct_connect_gateway | delete | region | 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. | |
confirm_transit_virtual_interface | exec | region, virtualInterfaceId, directConnectGatewayId | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_direct_connect_gateways
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
- create_direct_connect_gateway
- Manifest
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
;
# Description fields are for documentation purposes
- name: direct_connect_gateways
props:
- name: region
value: "{{ region }}"
description: Required parameter for the direct_connect_gateways resource.
- name: directConnectGatewayName
value: "{{ directConnectGatewayName }}"
description: |
The name of the Direct Connect gateway.
- name: tags
description: |
The key-value pair tags associated with the request.
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: amazonSideAsn
value: {{ amazonSideAsn }}
description: |
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.
UPDATE examples
- update_direct_connect_gateway
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
- delete_direct_connect_gateway
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
- confirm_transit_virtual_interface
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 }}"
}'
;