q_app_sessions
Creates, updates, deletes, gets or lists a q_app_sessions resource.
Overview
| Name | q_app_sessions |
| Type | Resource |
| Id | aws.qapps.q_app_sessions |
Fields
The following fields are returned by SELECT queries:
- get_q_app_session
| Name | Datatype | Description |
|---|---|---|
app_version | integer | The version of the Q App used for the session. |
card_status | object | The current status for each card in the Q App session. |
latest_published_app_version | integer | The latest published version of the Q App used for the session. |
session_arn | string | The Amazon Resource Name (ARN) of the Q App session. |
session_id | string | The unique identifier of the Q App session. |
session_name | string | The name of the Q App session. |
status | string | The current status of the Q App session. (IN_PROGRESS, WAITING, COMPLETED, ERROR) |
user_is_host | boolean | Indicates whether the current user is the owner of the Q App data collection session. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_q_app_session | select | instance-id, sessionId, region | Retrieves the current state and results for an active session of an Amazon Q App. | |
update_q_app_session | update | instance-id, region, sessionId | 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. | |
export_q_app_session_data | exec | instance-id, region, sessionId | Exports 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.
| Name | Datatype | Description |
|---|---|---|
instance-id | string | The unique identifier of the Amazon Q Business application environment instance. |
region | string | AWS region (default: us-east-1) |
sessionId | string | The unique identifier of the Q App session to retrieve. |
SELECT examples
- get_q_app_session
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
- update_q_app_session
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
- export_q_app_session_data
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 }}"
}'
;