Skip to main content

q_app_sessions

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

Overview

Nameq_app_sessions
TypeResource
Idaws.qapps.q_app_sessions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
app_versionintegerThe version of the Q App used for the session.
card_statusobjectThe current status for each card in the Q App session.
latest_published_app_versionintegerThe latest published version of the Q App used for the session.
session_arnstringThe Amazon Resource Name (ARN) of the Q App session.
session_idstringThe unique identifier of the Q App session.
session_namestringThe name of the Q App session.
statusstringThe current status of the Q App session. (IN_PROGRESS, WAITING, COMPLETED, ERROR)
user_is_hostbooleanIndicates whether the current user is the owner of the Q App data collection session.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_q_app_sessionselectinstance-id, sessionId, regionRetrieves the current state and results for an active session of an Amazon Q App.
update_q_app_sessionupdateinstance-id, region, sessionIdUpdates the session for a given Q App sessionId. This is only valid when at least one card of the session is in the WAITING state. Data for each WAITING card can be provided as input. If inputs are not provided, the call will be accepted but session will not move forward. Inputs for cards that are not in the WAITING status will be ignored.
export_q_app_session_dataexecinstance-id, region, sessionIdExports the collected data of a Q App data collection 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
instance-idstringThe unique identifier of the Amazon Q Business application environment instance.
regionstringAWS region (default: us-east-1)
sessionIdstringThe unique identifier of the Q App session to retrieve.

SELECT examples

Retrieves the current state and results for an active session of an Amazon Q App.

SELECT
app_version,
card_status,
latest_published_app_version,
session_arn,
session_id,
session_name,
status,
user_is_host
FROM aws.qapps.q_app_sessions
WHERE `instance-id` = '{{ instance-id }}' -- required
AND sessionId = '{{ sessionId }}' -- required
AND region = '{{ region }}' -- required
;

UPDATE examples

Updates the session for a given Q App sessionId. This is only valid when at least one card of the session is in the WAITING state. Data for each WAITING card can be provided as input. If inputs are not provided, the call will be accepted but session will not move forward. Inputs for cards that are not in the WAITING status will be ignored.

UPDATE aws.qapps.q_app_sessions
SET
sessionId = '{{ sessionId }}',
values = '{{ values }}'
WHERE
`instance-id` = '{{ instance-id }}' --required
AND region = '{{ region }}' --required
AND sessionId = '{{ sessionId }}' --required
RETURNING
session_arn,
session_id;

Lifecycle Methods

Exports the collected data of a Q App data collection session.

EXEC aws.qapps.q_app_sessions.export_q_app_session_data
@instance-id='{{ instance-id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"sessionId": "{{ sessionId }}"
}'
;