connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | aws.directconnect.connections |
Fields
The following fields are returned by SELECT queries:
- describe_connections
| Name | Datatype | Description |
|---|---|---|
connections | array | The connections. |
next_token | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_connections | select | region | Displays the specified connection or all connections in this Region. | |
create_connection | insert | region, location, bandwidth, connectionName | 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. | |
disassociate_mac_sec_key | update | region, connectionId, secretARN | Removes the association between a MAC Security (MACsec) security key and a Direct Connect connection. | |
update_connection | update | region, connectionId | Updates 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_connection | delete | region | 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. | |
associate_mac_sec_key | exec | region, connectionId | 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. | |
confirm_connection | exec | region, connectionId | Confirms 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_connections
Displays the specified connection or all connections in this Region.
SELECT
connections,
next_token
FROM aws.directconnect.connections
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_connection
- Manifest
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
;
# Description fields are for documentation purposes
- name: connections
props:
- name: region
value: "{{ region }}"
description: Required parameter for the connections resource.
- name: location
value: "{{ location }}"
description: |
The location of the connection.
- name: bandwidth
value: "{{ bandwidth }}"
description: |
The bandwidth of the connection.
- name: connectionName
value: "{{ connectionName }}"
description: |
The name of the connection.
- name: lagId
value: "{{ lagId }}"
description: |
The ID of the LAG.
- name: tags
description: |
The tags to associate with the lag.
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: providerName
value: "{{ providerName }}"
description: |
The name of the service provider associated with the requested connection.
- name: requestMACSec
value: {{ requestMACSec }}
description: |
Indicates whether you want the connection to support MAC Security (MACsec). MAC Security (MACsec) is unavailable on hosted connections. For information about MAC Security (MACsec) prerequisites, see MAC Security in Direct Connect in the Direct Connect User Guide.
UPDATE examples
- disassociate_mac_sec_key
- update_connection
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;
Updates 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.
UPDATE aws.directconnect.connections
SET
connectionId = '{{ connectionId }}',
connectionName = '{{ connectionName }}',
encryptionMode = '{{ encryptionMode }}'
WHERE
region = '{{ region }}' --required
AND connectionId = '{{ connectionId }}' --required
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;
DELETE examples
- delete_connection
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
- associate_mac_sec_key
- confirm_connection
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 }}"
}'
;
Confirms 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.
EXEC aws.directconnect.connections.confirm_connection
@region='{{ region }}' --required
@@json=
'{
"connectionId": "{{ connectionId }}"
}'
;