sessions
Creates, updates, deletes, gets or lists a sessions resource.
Overview
| Name | sessions |
| Type | Resource |
| Id | aws.workspaces_web.sessions |
Fields
The following fields are returned by SELECT queries:
- get_session
- list_sessions
| Name | Datatype | Description |
|---|---|---|
client_ip_addresses | array | The IP address of the client. |
end_time | string (date-time) | The end time of the session. |
portal_arn | string | The 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_id | string | The ID of the session. (pattern: <code>[\s\S]*</code>) |
start_time | string (date-time) | The start time of the session. |
status | string | The status of the session. (Active, Terminated) |
username | string | The username of the session. (pattern: <code>[\s\S]*</code>) |
| Name | Datatype | Description |
|---|---|---|
end_time | string (date-time) | The end time of the session. |
portal_arn | string | The 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_id | string | The ID of the session. (pattern: <code>[\s\S]*</code>) |
start_time | string (date-time) | The start time of the session. |
status | string | The status of the session. (Active, Terminated) |
username | string | The username of the session. (pattern: <code>[\s\S]*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_session | select | portal_id, session_id, region | Gets information for a secure browser session. | |
list_sessions | select | portal_id, region | username, sessionId, sortBy, status, maxResults, nextToken | Lists information for multiple secure browser sessions from a specific portal. |
expire_session | exec | portal_id, session_id, region | Expires 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.
| Name | Datatype | Description |
|---|---|---|
portal_id | string | The ID of the web portal for the session. |
region | string | AWS region (default: us-east-1) |
session_id | string | The ID of the session to expire. |
maxResults | integer | The maximum number of results to be included in the next page. |
nextToken | string | The pagination token used to retrieve the next page of results for this operation. |
sessionId | string | The ID of the session. |
sortBy | string | The method in which the returned sessions should be sorted. |
status | string | The status of the session. |
username | string | The username of the session. |
SELECT examples
- get_session
- list_sessions
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
;
Lists information for multiple secure browser sessions from a specific portal.
SELECT
end_time,
portal_arn,
session_id,
start_time,
status,
username
FROM aws.workspaces_web.sessions
WHERE portal_id = '{{ portal_id }}' -- required
AND region = '{{ region }}' -- required
AND username = '{{ username }}'
AND sessionId = '{{ sessionId }}'
AND sortBy = '{{ sortBy }}'
AND status = '{{ status }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
Lifecycle Methods
- expire_session
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
;