connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | aws.networkmanager.connections |
Fields
The following fields are returned by SELECT queries:
- get_connections
| Name | Datatype | Description |
|---|---|---|
connected_device_id | string | The ID of the second device in the connection. (pattern: <code>[\s\S]*</code>) |
connected_link_id | string | The ID of the link for the second device in the connection. (pattern: <code>[\s\S]*</code>) |
connection_arn | string | The Amazon Resource Name (ARN) of the connection. (pattern: <code>[\s\S]*</code>) |
connection_id | string | The ID of the connection. (pattern: <code>[\s\S]*</code>) |
created_at | string (date-time) | The date and time that the connection was created. |
description | string | The description of the connection. (pattern: <code>[\s\S]*</code>) |
device_id | string | The ID of the first device in the connection. (pattern: <code>[\s\S]*</code>) |
global_network_id | string | The ID of the global network. (pattern: <code>[\s\S]*</code>) |
link_id | string | The ID of the link for the first device in the connection. (pattern: <code>[\s\S]*</code>) |
state | string | The state of the connection. (PENDING, AVAILABLE, DELETING, UPDATING) |
tags | array | The tags for the connection. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_connections | select | global_network_id, region | connectionIds, deviceId, maxResults, nextToken | Gets information about one or more of your connections in a global network. |
create_connection | insert | global_network_id, region, DeviceId, ConnectedDeviceId | 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. | |
update_connection | update | global_network_id, connection_id, region | Updates the information for an existing connection. To remove information for any of the parameters, specify an empty string. | |
delete_connection | delete | global_network_id, connection_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
connection_id | string | The ID of the connection. |
global_network_id | string | The ID of the global network. |
region | string | AWS region (default: us-east-1) |
connectionIds | array | One or more connection IDs. |
deviceId | string | The ID of the device. |
maxResults | integer | The maximum number of results to return. |
nextToken | string | The token for the next page of results. |
SELECT examples
- get_connections
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
- create_connection
- Manifest
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
;
# Description fields are for documentation purposes
- name: connections
props:
- name: global_network_id
value: "{{ global_network_id }}"
description: Required parameter for the connections resource.
- name: region
value: "{{ region }}"
description: Required parameter for the connections resource.
- name: DeviceId
value: "{{ DeviceId }}"
- name: ConnectedDeviceId
value: "{{ ConnectedDeviceId }}"
- name: LinkId
value: "{{ LinkId }}"
- name: ConnectedLinkId
value: "{{ ConnectedLinkId }}"
- name: Description
value: "{{ Description }}"
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_connection
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
- delete_connection
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
;