tunnels
Creates, updates, deletes, gets or lists a tunnels resource.
Overview
| Name | tunnels |
| Type | Resource |
| Id | aws.iotsecuretunneling.tunnels |
Fields
The following fields are returned by SELECT queries:
- describe_tunnel
- list_tunnels
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The time when the tunnel was created. |
description | string | A description of the tunnel. (pattern: <code>[^\p{C}]{1,2048}</code>) |
destination_config | object | The 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_state | object | The connection state of the destination application. |
last_updated_at | string (date-time) | The last time the tunnel was updated. |
source_connection_state | object | The connection state of the source application. |
status | string | The status of a tunnel. Valid values are: Open and Closed. (OPEN, CLOSED) |
tags | array | A list of tag metadata associated with the secure tunnel. |
timeout_config | object | Timeout configuration for the tunnel. |
tunnel_arn | string | The Amazon Resource Name (ARN) of a tunnel. |
tunnel_id | string | A unique alpha-numeric ID that identifies a tunnel. (pattern: <code>[a-zA-Z0-9_-+=:]{1,128}</code>) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | The token to use to get the next set of results, or null if there are no additional results. (pattern: <code>[a-zA-Z0-9_=-]{1,4096}</code>) |
tunnel_summaries | array | A short description of the tunnels in an Amazon Web Services account. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_tunnel | select | region | Gets information about a tunnel identified by the unique tunnel id. Requires permission to access the DescribeTunnel action. | |
list_tunnels | select | region | List 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_tunnel | exec | region, tunnelId | 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. | |
rotate_tunnel_access_token | exec | region, tunnelId, clientMode | Revokes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_tunnel
- list_tunnels
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
;
List 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.
SELECT
next_token,
tunnel_summaries
FROM aws.iotsecuretunneling.tunnels
WHERE region = '{{ region }}' -- required
;
Lifecycle Methods
- close_tunnel
- rotate_tunnel_access_token
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 }}
}'
;
Revokes 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.
EXEC aws.iotsecuretunneling.tunnels.rotate_tunnel_access_token
@region='{{ region }}' --required
@@json=
'{
"tunnelId": "{{ tunnelId }}",
"clientMode": "{{ clientMode }}",
"destinationConfig": "{{ destinationConfig }}"
}'
;