Skip to main content

connections

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

Overview

Nameconnections
TypeResource
Idaws.networkmanager.connections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
connected_device_idstringThe ID of the second device in the connection. (pattern: <code>[\s\S]*</code>)
connected_link_idstringThe ID of the link for the second device in the connection. (pattern: <code>[\s\S]*</code>)
connection_arnstringThe Amazon Resource Name (ARN) of the connection. (pattern: <code>[\s\S]*</code>)
connection_idstringThe ID of the connection. (pattern: <code>[\s\S]*</code>)
created_atstring (date-time)The date and time that the connection was created.
descriptionstringThe description of the connection. (pattern: <code>[\s\S]*</code>)
device_idstringThe ID of the first device in the connection. (pattern: <code>[\s\S]*</code>)
global_network_idstringThe ID of the global network. (pattern: <code>[\s\S]*</code>)
link_idstringThe ID of the link for the first device in the connection. (pattern: <code>[\s\S]*</code>)
statestringThe state of the connection. (PENDING, AVAILABLE, DELETING, UPDATING)
tagsarrayThe tags for the connection.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_connectionsselectglobal_network_id, regionconnectionIds, deviceId, maxResults, nextTokenGets information about one or more of your connections in a global network.
create_connectioninsertglobal_network_id, region, DeviceId, ConnectedDeviceIdCreates a connection between two devices. The devices can be a physical or virtual appliance that connects to a third-party appliance in a VPC, or a physical appliance that connects to another physical appliance in an on-premises network.
update_connectionupdateglobal_network_id, connection_id, regionUpdates the information for an existing connection. To remove information for any of the parameters, specify an empty string.
delete_connectiondeleteglobal_network_id, connection_id, regionDeletes the specified connection in your global network.

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
connection_idstringThe ID of the connection.
global_network_idstringThe ID of the global network.
regionstringAWS region (default: us-east-1)
connectionIdsarrayOne or more connection IDs.
deviceIdstringThe ID of the device.
maxResultsintegerThe maximum number of results to return.
nextTokenstringThe token for the next page of results.

SELECT examples

Gets information about one or more of your connections in a global network.

SELECT
connected_device_id,
connected_link_id,
connection_arn,
connection_id,
created_at,
description,
device_id,
global_network_id,
link_id,
state,
tags
FROM aws.networkmanager.connections
WHERE global_network_id = '{{ global_network_id }}' -- required
AND region = '{{ region }}' -- required
AND connectionIds = '{{ connectionIds }}'
AND deviceId = '{{ deviceId }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;

INSERT examples

Creates a connection between two devices. The devices can be a physical or virtual appliance that connects to a third-party appliance in a VPC, or a physical appliance that connects to another physical appliance in an on-premises network.

INSERT INTO aws.networkmanager.connections (
DeviceId,
ConnectedDeviceId,
LinkId,
ConnectedLinkId,
Description,
Tags,
global_network_id,
region
)
SELECT
'{{ DeviceId }}' /* required */,
'{{ ConnectedDeviceId }}' /* required */,
'{{ LinkId }}',
'{{ ConnectedLinkId }}',
'{{ Description }}',
'{{ Tags }}',
'{{ global_network_id }}',
'{{ region }}'
RETURNING
connection
;

UPDATE examples

Updates the information for an existing connection. To remove information for any of the parameters, specify an empty string.

UPDATE aws.networkmanager.connections
SET
LinkId = '{{ LinkId }}',
ConnectedLinkId = '{{ ConnectedLinkId }}',
Description = '{{ Description }}'
WHERE
global_network_id = '{{ global_network_id }}' --required
AND connection_id = '{{ connection_id }}' --required
AND region = '{{ region }}' --required
RETURNING
connection;

DELETE examples

Deletes the specified connection in your global network.

DELETE FROM aws.networkmanager.connections
WHERE global_network_id = '{{ global_network_id }}' --required
AND connection_id = '{{ connection_id }}' --required
AND region = '{{ region }}' --required
;