Skip to main content

sessions

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

Overview

Namesessions
TypeResource
Idaws.workspaces_web.sessions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
client_ip_addressesarrayThe IP address of the client.
end_timestring (date-time)The end time of the session.
portal_arnstringThe ARN of the web portal. (pattern: <code>arn:[\w+=/,.@-]+:[a-zA-Z0-9-]+:[a-zA-Z0-9-]*:[a-zA-Z0-9]{1,12}:[a-zA-Z]+(/[a-fA-F0-9-]{36})+</code>)
session_idstringThe ID of the session. (pattern: <code>[\s\S]*</code>)
start_timestring (date-time)The start time of the session.
statusstringThe status of the session. (Active, Terminated)
usernamestringThe username of the session. (pattern: <code>[\s\S]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_sessionselectportal_id, session_id, regionGets information for a secure browser session.
list_sessionsselectportal_id, regionusername, sessionId, sortBy, status, maxResults, nextTokenLists information for multiple secure browser sessions from a specific portal.
expire_sessionexecportal_id, session_id, regionExpires an active secure browser session.

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
portal_idstringThe ID of the web portal for the session.
regionstringAWS region (default: us-east-1)
session_idstringThe ID of the session to expire.
maxResultsintegerThe maximum number of results to be included in the next page.
nextTokenstringThe pagination token used to retrieve the next page of results for this operation.
sessionIdstringThe ID of the session.
sortBystringThe method in which the returned sessions should be sorted.
statusstringThe status of the session.
usernamestringThe username of the session.

SELECT examples

Gets information for a secure browser session.

SELECT
client_ip_addresses,
end_time,
portal_arn,
session_id,
start_time,
status,
username
FROM aws.workspaces_web.sessions
WHERE portal_id = '{{ portal_id }}' -- required
AND session_id = '{{ session_id }}' -- required
AND region = '{{ region }}' -- required
;

Lifecycle Methods

Expires an active secure browser session.

EXEC aws.workspaces_web.sessions.expire_session
@portal_id='{{ portal_id }}' --required,
@session_id='{{ session_id }}' --required,
@region='{{ region }}' --required
;