Skip to main content

tunnels

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

Overview

Nametunnels
TypeResource
Idaws.iotsecuretunneling.tunnels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The time when the tunnel was created.
descriptionstringA description of the tunnel. (pattern: <code>[^\p{C}]{1,2048}</code>)
destination_configobjectThe destination configuration that specifies the thing name of the destination device and a service name that the local proxy uses to connect to the destination application.
destination_connection_stateobjectThe connection state of the destination application.
last_updated_atstring (date-time)The last time the tunnel was updated.
source_connection_stateobjectThe connection state of the source application.
statusstringThe status of a tunnel. Valid values are: Open and Closed. (OPEN, CLOSED)
tagsarrayA list of tag metadata associated with the secure tunnel.
timeout_configobjectTimeout configuration for the tunnel.
tunnel_arnstringThe Amazon Resource Name (ARN) of a tunnel.
tunnel_idstringA unique alpha-numeric ID that identifies a tunnel. (pattern: <code>[a-zA-Z0-9_-+=:]{1,128}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_tunnelselectregionGets information about a tunnel identified by the unique tunnel id. Requires permission to access the DescribeTunnel action.
list_tunnelsselectregionList all tunnels for an Amazon Web Services account. Tunnels are listed by creation time in descending order, newer tunnels will be listed before older tunnels. Requires permission to access the ListTunnels action.
close_tunnelexecregion, tunnelIdCloses a tunnel identified by the unique tunnel id. When a CloseTunnel request is received, we close the WebSocket connections between the client and proxy server so no data can be transmitted. Requires permission to access the CloseTunnel action.
rotate_tunnel_access_tokenexecregion, tunnelId, clientModeRevokes the current client access token (CAT) and returns new CAT for clients to use when reconnecting to secure tunneling to access the same tunnel. Requires permission to access the RotateTunnelAccessToken action. Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel duration is 12 hours and the tunnel has already been open for 4 hours. When you rotate the access tokens, the new tokens that are generated can only be used for the remaining 8 hours.

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

Gets information about a tunnel identified by the unique tunnel id. Requires permission to access the DescribeTunnel action.

SELECT
created_at,
description,
destination_config,
destination_connection_state,
last_updated_at,
source_connection_state,
status,
tags,
timeout_config,
tunnel_arn,
tunnel_id
FROM aws.iotsecuretunneling.tunnels
WHERE region = '{{ region }}' -- required
;

Lifecycle Methods

Closes a tunnel identified by the unique tunnel id. When a CloseTunnel request is received, we close the WebSocket connections between the client and proxy server so no data can be transmitted. Requires permission to access the CloseTunnel action.

EXEC aws.iotsecuretunneling.tunnels.close_tunnel
@region='{{ region }}' --required
@@json=
'{
"tunnelId": "{{ tunnelId }}",
"delete": {{ delete }}
}'
;