Skip to main content

connections

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

Overview

Nameconnections
TypeResource
Idaws.directconnect.connections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
connectionsarrayThe connections.
next_tokenstringThe token to use to retrieve the next page of results. This value is null when there are no more results to return.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_connectionsselectregionDisplays the specified connection or all connections in this Region.
create_connectioninsertregion, location, bandwidth, connectionNameCreates a connection between a customer network and a specific Direct Connect location. A connection links your internal network to an Direct Connect location over a standard Ethernet fiber-optic cable. One end of the cable is connected to your router, the other to an Direct Connect router. To find the locations for your Region, use DescribeLocations. You can automatically add the new connection to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new connection is allocated on the same Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no connection is created.
disassociate_mac_sec_keyupdateregion, connectionId, secretARNRemoves the association between a MAC Security (MACsec) security key and a Direct Connect connection.
update_connectionupdateregion, connectionIdUpdates the Direct Connect connection configuration. You can update the following parameters for a connection: The connection name The connection's MAC Security (MACsec) encryption mode.
delete_connectiondeleteregionDeletes the specified connection. Deleting a connection only stops the Direct Connect port hour and data transfer charges. If you are partnering with any third parties to connect with the Direct Connect location, you must cancel your service with them separately.
associate_mac_sec_keyexecregion, connectionIdAssociates a MAC Security (MACsec) Connection Key Name (CKN)/ Connectivity Association Key (CAK) pair with a Direct Connect connection. You must supply either the secretARN, or the CKN/CAK (ckn and cak) pair in the request. For information about MAC Security (MACsec) key considerations, see MACsec pre-shared CKN/CAK key considerations in the Direct Connect User Guide.
confirm_connectionexecregion, connectionIdConfirms the creation of the specified hosted connection on an interconnect. Upon creation, the hosted connection is initially in the Ordering state, and remains in this state until the owner confirms creation of the hosted connection.

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

Displays the specified connection or all connections in this Region.

SELECT
connections,
next_token
FROM aws.directconnect.connections
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a connection between a customer network and a specific Direct Connect location. A connection links your internal network to an Direct Connect location over a standard Ethernet fiber-optic cable. One end of the cable is connected to your router, the other to an Direct Connect router. To find the locations for your Region, use DescribeLocations. You can automatically add the new connection to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new connection is allocated on the same Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no connection is created.

INSERT INTO aws.directconnect.connections (
location,
bandwidth,
connectionName,
lagId,
tags,
providerName,
requestMACSec,
region
)
SELECT
'{{ location }}' /* required */,
'{{ bandwidth }}' /* required */,
'{{ connectionName }}' /* required */,
'{{ lagId }}',
'{{ tags }}',
'{{ providerName }}',
{{ requestMACSec }},
'{{ region }}'
RETURNING
aws_device,
aws_device_v2,
aws_logical_device_id,
bandwidth,
connection_id,
connection_name,
connection_state,
encryption_mode,
has_logical_redundancy,
jumbo_frame_capable,
lag_id,
loa_issue_time,
location,
mac_sec_capable,
mac_sec_keys,
owner_account,
partner_interconnect_mac_sec_capable,
partner_name,
port_encryption_status,
provider_name,
rate_limiter_status,
region,
tags,
vlan
;

UPDATE examples

Removes the association between a MAC Security (MACsec) security key and a Direct Connect connection.

UPDATE aws.directconnect.connections
SET
connectionId = '{{ connectionId }}',
secretARN = '{{ secretARN }}'
WHERE
region = '{{ region }}' --required
AND connectionId = '{{ connectionId }}' --required
AND secretARN = '{{ secretARN }}' --required
RETURNING
connection_id,
mac_sec_keys;

DELETE examples

Deletes the specified connection. Deleting a connection only stops the Direct Connect port hour and data transfer charges. If you are partnering with any third parties to connect with the Direct Connect location, you must cancel your service with them separately.

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

Lifecycle Methods

Associates a MAC Security (MACsec) Connection Key Name (CKN)/ Connectivity Association Key (CAK) pair with a Direct Connect connection. You must supply either the secretARN, or the CKN/CAK (ckn and cak) pair in the request. For information about MAC Security (MACsec) key considerations, see MACsec pre-shared CKN/CAK key considerations in the Direct Connect User Guide.

EXEC aws.directconnect.connections.associate_mac_sec_key
@region='{{ region }}' --required
@@json=
'{
"connectionId": "{{ connectionId }}",
"secretARN": "{{ secretARN }}",
"ckn": "{{ ckn }}",
"cak": "{{ cak }}"
}'
;