2024/11/26 - QApps - 7 new7 updated api methods
Changes Private sharing, file upload and data collection feature support for Q Apps
Creates a presigned URL for an S3 POST operation to upload a file. You can use this URL to set a default file for a FileUploadCard in a Q App definition or to provide a file for a single Q App run. The scope parameter determines how the file will be used, either at the app definition level or the app session level.
See also: AWS API Documentation
Request Syntax
client.create_presigned_url( instanceId='string', cardId='string', appId='string', fileContentsSha256='string', fileName='string', scope='APPLICATION'|'SESSION', sessionId='string' )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the card the file is associated with.
string
[REQUIRED]
The unique identifier of the Q App the file is associated with.
string
[REQUIRED]
The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.
string
[REQUIRED]
The name of the file to be uploaded.
string
[REQUIRED]
Whether the file is associated with a Q App definition or a specific Q App session.
string
The unique identifier of the Q App session the file is associated with, if applicable.
dict
Response Syntax
{ 'fileId': 'string', 'presignedUrl': 'string', 'presignedUrlFields': { 'string': 'string' }, 'presignedUrlExpiration': datetime(2015, 1, 1) }
Response Structure
(dict) --
fileId (string) --
The unique identifier assigned to the file to be uploaded.
presignedUrl (string) --
The URL for a presigned S3 POST operation used to upload a file.
presignedUrlFields (dict) --
The form fields to include in the presigned S3 POST operation used to upload a file.
(string) --
(string) --
presignedUrlExpiration (datetime) --
The date and time that the presigned URL will expire in ISO 8601 format.
Lists the collected data of a Q App data collection session.
See also: AWS API Documentation
Request Syntax
client.list_q_app_session_data( instanceId='string', sessionId='string' )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App data collection session.
dict
Response Syntax
{ 'sessionId': 'string', 'sessionArn': 'string', 'sessionData': [ { 'cardId': 'string', 'value': {...}|[...]|123|123.4|'string'|True|None, 'user': { 'userId': 'string' }, 'submissionId': 'string', 'timestamp': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
sessionId (string) --
The unique identifier of the Q App data collection session.
sessionArn (string) --
The Amazon Resource Name (ARN) of the Q App data collection session.
sessionData (list) --
The collected responses of a Q App session.
(dict) --
The response collected for a Amazon Q App session. This container represents a single response to a Q App session.
cardId (string) --
The card Id associated with the response submitted for a Q App session.
value (:ref:`document<document>`) --
The response submitted for a Q App session.
user (dict) --
The user who submitted the response for a Q App session.
userId (string) --
The unique identifier of a user.
submissionId (string) --
The unique identifier of the submission.
timestamp (datetime) --
The date and time when the session data is submitted.
nextToken (string) --
The pagination token that indicates the next set of results to retrieve.
Updates read permissions for a Amazon Q App in Amazon Q Business application environment instance.
See also: AWS API Documentation
Request Syntax
client.update_q_app_permissions( instanceId='string', appId='string', grantPermissions=[ { 'action': 'read'|'write', 'principal': 'string' }, ], revokePermissions=[ { 'action': 'read'|'write', 'principal': 'string' }, ] )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Amazon Q App for which permissions are being updated.
list
The list of permissions to grant for the Amazon Q App.
(dict) --
The permission to grant or revoke for a Amazon Q App.
action (string) -- [REQUIRED]
The action associated with the permission.
principal (string) -- [REQUIRED]
The principal user to which the permission applies.
list
The list of permissions to revoke for the Amazon Q App.
(dict) --
The permission to grant or revoke for a Amazon Q App.
action (string) -- [REQUIRED]
The action associated with the permission.
principal (string) -- [REQUIRED]
The principal user to which the permission applies.
dict
Response Syntax
{ 'resourceArn': 'string', 'appId': 'string', 'permissions': [ { 'action': 'read'|'write', 'principal': { 'userId': 'string', 'userType': 'owner'|'user', 'email': 'string' } }, ] }
Response Structure
(dict) --
resourceArn (string) --
The Amazon Resource Name (ARN) of the Amazon Q App for which permissions were updated.
appId (string) --
The unique identifier of the Amazon Q App for which permissions were updated.
permissions (list) --
The updated list of permissions for the Amazon Q App.
(dict) --
The permission granted to the Amazon Q App.
action (string) --
The action associated with the permission.
principal (dict) --
The principal user to which the permission applies.
userId (string) --
The unique identifier of the user.
userType (string) --
The type of the user.
email (string) --
The email address associated with the user.
Updates the configuration metadata of a session for a given Q App sessionId.
See also: AWS API Documentation
Request Syntax
client.update_q_app_session_metadata( instanceId='string', sessionId='string', sessionName='string', sharingConfiguration={ 'enabled': True|False, 'acceptResponses': True|False, 'revealCards': True|False } )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App session to update configuration for.
string
The new name for the Q App session.
dict
[REQUIRED]
The new sharing configuration for the Q App data collection session.
enabled (boolean) -- [REQUIRED]
Indicates whether an Q App session is shareable with other users.
acceptResponses (boolean) --
Indicates whether an Q App session can accept responses from users.
revealCards (boolean) --
Indicates whether collected responses for an Q App session are revealed for all users.
dict
Response Syntax
{ 'sessionId': 'string', 'sessionArn': 'string', 'sessionName': 'string', 'sharingConfiguration': { 'enabled': True|False, 'acceptResponses': True|False, 'revealCards': True|False } }
Response Structure
(dict) --
sessionId (string) --
The unique identifier of the updated Q App session.
sessionArn (string) --
The Amazon Resource Name (ARN) of the updated Q App session.
sessionName (string) --
The new name of the updated Q App session.
sharingConfiguration (dict) --
The new sharing configuration of the updated Q App data collection session.
enabled (boolean) --
Indicates whether an Q App session is shareable with other users.
acceptResponses (boolean) --
Indicates whether an Q App session can accept responses from users.
revealCards (boolean) --
Indicates whether collected responses for an Q App session are revealed for all users.
Retrieves the current configuration of a Q App session.
See also: AWS API Documentation
Request Syntax
client.get_q_app_session_metadata( instanceId='string', sessionId='string' )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App session.
dict
Response Syntax
{ 'sessionId': 'string', 'sessionArn': 'string', 'sessionName': 'string', 'sharingConfiguration': { 'enabled': True|False, 'acceptResponses': True|False, 'revealCards': True|False }, 'sessionOwner': True|False }
Response Structure
(dict) --
sessionId (string) --
The unique identifier of the Q App session.
sessionArn (string) --
The Amazon Resource Name (ARN) of the Q App session.
sessionName (string) --
The name of the Q App session.
sharingConfiguration (dict) --
The sharing configuration of the Q App data collection session.
enabled (boolean) --
Indicates whether an Q App session is shareable with other users.
acceptResponses (boolean) --
Indicates whether an Q App session can accept responses from users.
revealCards (boolean) --
Indicates whether collected responses for an Q App session are revealed for all users.
sessionOwner (boolean) --
Indicates whether the current user is the owner of the Q App session.
Exports the collected data of a Q App data collection session.
See also: AWS API Documentation
Request Syntax
client.export_q_app_session_data( instanceId='string', sessionId='string' )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App data collection session.
dict
Response Syntax
{ 'csvFileLink': 'string', 'expiresAt': datetime(2015, 1, 1), 'sessionArn': 'string' }
Response Structure
(dict) --
csvFileLink (string) --
The link where the exported Q App session data can be downloaded from.
expiresAt (datetime) --
The date and time when the link for the exported Q App session data expires.
sessionArn (string) --
The Amazon Resource Name (ARN) of the Q App data collection session.
Describes read permissions for a Amazon Q App in Amazon Q Business application environment instance.
See also: AWS API Documentation
Request Syntax
client.describe_q_app_permissions( instanceId='string', appId='string' )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Amazon Q App for which to retrieve permissions.
dict
Response Syntax
{ 'resourceArn': 'string', 'appId': 'string', 'permissions': [ { 'action': 'read'|'write', 'principal': { 'userId': 'string', 'userType': 'owner'|'user', 'email': 'string' } }, ] }
Response Structure
(dict) --
resourceArn (string) --
The Amazon Resource Name (ARN) of the Amazon Q App for which permissions are returned.
appId (string) --
The unique identifier of the Amazon Q App for which permissions are returned.
permissions (list) --
The list of permissions granted for the Amazon Q App.
(dict) --
The permission granted to the Amazon Q App.
action (string) --
The action associated with the permission.
principal (dict) --
The principal user to which the permission applies.
userId (string) --
The unique identifier of the user.
userType (string) --
The type of the user.
email (string) --
The email address associated with the user.
{'appDefinition': {'cards': {'fileUpload': {'type': {'form-input'}}, 'formInput': {'computeMode': 'append | replace', 'id': 'string', 'metadata': {'schema': {}}, 'title': 'string', 'type': 'text-input | q-query | ' 'file-upload | q-plugin | ' 'form-input'}, 'qPlugin': {'type': {'form-input'}}, 'qQuery': {'type': {'form-input'}}, 'textInput': {'type': {'form-input'}}}}}
Creates a new Amazon Q App based on the provided definition. The Q App definition specifies the cards and flow of the Q App. This operation also calculates the dependencies between the cards by inspecting the references in the prompts.
See also: AWS API Documentation
Request Syntax
client.create_q_app( instanceId='string', title='string', description='string', appDefinition={ 'cards': [ { 'textInput': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'placeholder': 'string', 'defaultValue': 'string' }, 'qQuery': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'prompt': 'string', 'outputSource': 'approved-sources'|'llm', 'attributeFilter': { 'andAllFilters': [ {'... recursive ...'}, ], 'orAllFilters': [ {'... recursive ...'}, ], 'notFilter': {'... recursive ...'}, 'equalsTo': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'containsAll': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'containsAny': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'greaterThan': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'greaterThanOrEquals': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lessThan': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lessThanOrEquals': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } } } }, 'qPlugin': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'prompt': 'string', 'pluginId': 'string' }, 'fileUpload': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'filename': 'string', 'fileId': 'string', 'allowOverride': True|False }, 'formInput': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'metadata': { 'schema': {...}|[...]|123|123.4|'string'|True|None }, 'computeMode': 'append'|'replace' } }, ], 'initialPrompt': 'string' }, tags={ 'string': 'string' } )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The title of the new Q App.
string
The description of the new Q App.
dict
[REQUIRED]
The definition of the new Q App, specifying the cards and flow.
cards (list) -- [REQUIRED]
The cards that make up the Q App definition.
(dict) --
The properties defining an input card in an Amazon Q App.
textInput (dict) --
A container for the properties of the text input card.
title (string) -- [REQUIRED]
The title or label of the text input card.
id (string) -- [REQUIRED]
The unique identifier of the text input card.
type (string) -- [REQUIRED]
The type of the card.
placeholder (string) --
The placeholder text to display in the text input field.
defaultValue (string) --
The default value to pre-populate in the text input field.
qQuery (dict) --
A container for the properties of the query input card.
title (string) -- [REQUIRED]
The title or label of the query card.
id (string) -- [REQUIRED]
The unique identifier of the query card.
type (string) -- [REQUIRED]
The type of the card.
prompt (string) -- [REQUIRED]
The prompt or instructions displayed for the query card.
outputSource (string) --
The source or type of output to generate for the query card.
attributeFilter (dict) --
Turns on filtering of responses based on document attributes or metadata fields.
andAllFilters (list) --
Performs a logical AND operation on all supplied filters.
(dict) --
The filter criteria used on responses based on document attributes or metadata fields.
orAllFilters (list) --
Performs a logical OR operation on all supplied filters.
(dict) --
The filter criteria used on responses based on document attributes or metadata fields.
notFilter (dict) --
Performs a logical NOT operation on all supplied filters.
equalsTo (dict) --
Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue, longValue, stringListValue and stringValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
containsAll (dict) --
Returns true when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
containsAny (dict) --
Returns true when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
greaterThan (dict) --
Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
greaterThanOrEquals (dict) --
Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
lessThan (dict) --
Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
lessThanOrEquals (dict) --
Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type: dateValue and longValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
qPlugin (dict) --
A container for the properties of the plugin input card.
title (string) -- [REQUIRED]
The title or label of the plugin card.
id (string) -- [REQUIRED]
The unique identifier of the plugin card.
type (string) -- [REQUIRED]
The type of the card.
prompt (string) -- [REQUIRED]
The prompt or instructions displayed for the plugin card.
pluginId (string) -- [REQUIRED]
The unique identifier of the plugin used by the card.
fileUpload (dict) --
A container for the properties of the file upload input card.
title (string) -- [REQUIRED]
The title or label of the file upload card.
id (string) -- [REQUIRED]
The unique identifier of the file upload card.
type (string) -- [REQUIRED]
The type of the card.
filename (string) --
The default filename to use for the file upload card.
fileId (string) --
The identifier of a pre-uploaded file associated with the card.
allowOverride (boolean) --
A flag indicating if the user can override the default file for the upload card.
formInput (dict) --
A container for the properties of the form input card.
title (string) -- [REQUIRED]
The title or label of the form input card.
id (string) -- [REQUIRED]
The unique identifier of the form input card.
type (string) -- [REQUIRED]
The type of the card.
metadata (dict) -- [REQUIRED]
The metadata that defines the form input card data.
schema (:ref:`document<document>`) -- [REQUIRED]
The JSON schema that defines the shape of the response data.
computeMode (string) --
The compute mode of the form input card. This property determines whether individual participants of a data collection session can submit multiple response or one response. A compute mode of append shall allow participants to submit the same form multiple times with different values. A compute mode of ``replace``code> shall overwrite the current value for each participant.
initialPrompt (string) --
The initial prompt displayed when the Q App is started.
dict
Optional tags to associate with the new Q App.
(string) --
(string) --
dict
Response Syntax
{ 'appId': 'string', 'appArn': 'string', 'title': 'string', 'description': 'string', 'initialPrompt': 'string', 'appVersion': 123, 'status': 'PUBLISHED'|'DRAFT'|'DELETED', 'createdAt': datetime(2015, 1, 1), 'createdBy': 'string', 'updatedAt': datetime(2015, 1, 1), 'updatedBy': 'string', 'requiredCapabilities': [ 'FileUpload'|'CreatorMode'|'RetrievalMode'|'PluginMode', ] }
Response Structure
(dict) --
appId (string) --
The unique identifier of the new Q App.
appArn (string) --
The Amazon Resource Name (ARN) of the new Q App.
title (string) --
The title of the new Q App.
description (string) --
The description of the new Q App.
initialPrompt (string) --
The initial prompt displayed when the Q App is started.
appVersion (integer) --
The version of the new Q App.
status (string) --
The status of the new Q App, such as "Created".
createdAt (datetime) --
The date and time the Q App was created.
createdBy (string) --
The user who created the Q App.
updatedAt (datetime) --
The date and time the Q App was last updated.
updatedBy (string) --
The user who last updated the Q App.
requiredCapabilities (list) --
The capabilities required to run the Q App, such as file upload or third-party integrations.
(string) --
{'appVersion': 'integer'}Response
{'appDefinition': {'cards': {'fileUpload': {'type': {'form-input'}}, 'formInput': {'computeMode': 'append | replace', 'dependencies': ['string'], 'id': 'string', 'metadata': {'schema': {}}, 'title': 'string', 'type': 'text-input | q-query | ' 'file-upload | q-plugin | ' 'form-input'}, 'qPlugin': {'type': {'form-input'}}, 'qQuery': {'memoryReferences': ['string'], 'type': {'form-input'}}, 'textInput': {'type': {'form-input'}}}}}
Retrieves the full details of an Q App, including its definition specifying the cards and flow.
See also: AWS API Documentation
Request Syntax
client.get_q_app( instanceId='string', appId='string', appVersion=123 )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App to retrieve.
integer
The version of the Q App.
dict
Response Syntax
{ 'appId': 'string', 'appArn': 'string', 'title': 'string', 'description': 'string', 'initialPrompt': 'string', 'appVersion': 123, 'status': 'PUBLISHED'|'DRAFT'|'DELETED', 'createdAt': datetime(2015, 1, 1), 'createdBy': 'string', 'updatedAt': datetime(2015, 1, 1), 'updatedBy': 'string', 'requiredCapabilities': [ 'FileUpload'|'CreatorMode'|'RetrievalMode'|'PluginMode', ], 'appDefinition': { 'appDefinitionVersion': 'string', 'cards': [ { 'textInput': { 'id': 'string', 'title': 'string', 'dependencies': [ 'string', ], 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'placeholder': 'string', 'defaultValue': 'string' }, 'qQuery': { 'id': 'string', 'title': 'string', 'dependencies': [ 'string', ], 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'prompt': 'string', 'outputSource': 'approved-sources'|'llm', 'attributeFilter': { 'andAllFilters': [ {'... recursive ...'}, ], 'orAllFilters': [ {'... recursive ...'}, ], 'notFilter': {'... recursive ...'}, 'equalsTo': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'containsAll': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'containsAny': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'greaterThan': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'greaterThanOrEquals': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lessThan': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lessThanOrEquals': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } } }, 'memoryReferences': [ 'string', ] }, 'qPlugin': { 'id': 'string', 'title': 'string', 'dependencies': [ 'string', ], 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'prompt': 'string', 'pluginType': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK'|'CUSTOM', 'pluginId': 'string' }, 'fileUpload': { 'id': 'string', 'title': 'string', 'dependencies': [ 'string', ], 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'filename': 'string', 'fileId': 'string', 'allowOverride': True|False }, 'formInput': { 'id': 'string', 'title': 'string', 'dependencies': [ 'string', ], 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'metadata': { 'schema': {...}|[...]|123|123.4|'string'|True|None }, 'computeMode': 'append'|'replace' } }, ], 'canEdit': True|False } }
Response Structure
(dict) --
appId (string) --
The unique identifier of the Q App.
appArn (string) --
The Amazon Resource Name (ARN) of the Q App.
title (string) --
The title of the Q App.
description (string) --
The description of the Q App.
initialPrompt (string) --
The initial prompt displayed when the Q App is started.
appVersion (integer) --
The version of the Q App.
status (string) --
The status of the Q App.
createdAt (datetime) --
The date and time the Q App was created.
createdBy (string) --
The user who created the Q App.
updatedAt (datetime) --
The date and time the Q App was last updated.
updatedBy (string) --
The user who last updated the Q App.
requiredCapabilities (list) --
The capabilities required to run the Q App, such as file upload or third-party integrations.
(string) --
appDefinition (dict) --
The full definition of the Q App, specifying the cards and flow.
appDefinitionVersion (string) --
The version of the app definition schema or specification.
cards (list) --
The cards that make up the Q App, such as text input, file upload, or query cards.
(dict) --
A card representing a component or step in an Amazon Q App's flow.
textInput (dict) --
A container for the properties of the text input card.
id (string) --
The unique identifier of the text input card.
title (string) --
The title or label of the text input card.
dependencies (list) --
Any dependencies or requirements for the text input card.
(string) --
type (string) --
The type of the card.
placeholder (string) --
The placeholder text to display in the text input field.
defaultValue (string) --
The default value to pre-populate in the text input field.
qQuery (dict) --
A container for the properties of the query card.
id (string) --
The unique identifier of the query card.
title (string) --
The title or label of the query card.
dependencies (list) --
Any dependencies or requirements for the query card.
(string) --
type (string) --
The type of the card.
prompt (string) --
The prompt or instructions displayed for the query card.
outputSource (string) --
The source or type of output generated by the query card.
attributeFilter (dict) --
The Amazon Q Business filters applied in this query card when resolving data sources
andAllFilters (list) --
Performs a logical AND operation on all supplied filters.
(dict) --
The filter criteria used on responses based on document attributes or metadata fields.
orAllFilters (list) --
Performs a logical OR operation on all supplied filters.
(dict) --
The filter criteria used on responses based on document attributes or metadata fields.
notFilter (dict) --
Performs a logical NOT operation on all supplied filters.
equalsTo (dict) --
Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue, longValue, stringListValue and stringValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
containsAll (dict) --
Returns true when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
containsAny (dict) --
Returns true when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
greaterThan (dict) --
Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
greaterThanOrEquals (dict) --
Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
lessThan (dict) --
Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
lessThanOrEquals (dict) --
Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type: dateValue and longValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
memoryReferences (list) --
Any dependencies for the query card, where the dependencies are references to the collected responses.
(string) --
qPlugin (dict) --
A container for the properties of the plugin card.
id (string) --
The unique identifier of the plugin card.
title (string) --
The title or label of the plugin card.
dependencies (list) --
Any dependencies or requirements for the plugin card.
(string) --
type (string) --
The type of the card.
prompt (string) --
The prompt or instructions displayed for the plugin card.
pluginType (string) --
The type or category of the plugin used by the card.
pluginId (string) --
The unique identifier of the plugin used by the card.
fileUpload (dict) --
A container for the properties of the file upload card.
id (string) --
The unique identifier of the file upload card.
title (string) --
The title of the file upload card.
dependencies (list) --
Any dependencies or requirements for the file upload card.
(string) --
type (string) --
The type of the card.
filename (string) --
The name of the file being uploaded.
fileId (string) --
The unique identifier of the file associated with the card.
allowOverride (boolean) --
A flag indicating if the user can override the default file for the upload card.
formInput (dict) --
A container for the properties of the form input card.
id (string) --
The unique identifier of the form input card.
title (string) --
The title of the form input card.
dependencies (list) --
Any dependencies or requirements for the form input card.
(string) --
type (string) --
The type of the card.
metadata (dict) --
The metadata that defines the form input card data.
schema (:ref:`document<document>`) --
The JSON schema that defines the shape of the response data.
computeMode (string) --
The compute mode of the form input card. This property determines whether individual participants of a data collection session can submit multiple response or one response. A compute mode of append shall allow participants to submit the same form multiple times with different values. A compute mode of ``replace``code> shall overwrite the current value for each participant.
canEdit (boolean) --
A flag indicating whether the Q App's definition can be edited by the user.
{'appVersion': 'integer', 'cardStatus': {'currentState': {'ERROR'}, 'submissions': [{'submissionId': 'string', 'timestamp': 'timestamp', 'value': {}}]}, 'latestPublishedAppVersion': 'integer', 'sessionName': 'string', 'status': {'ERROR'}, 'userIsHost': 'boolean'}
Retrieves the current state and results for an active session of an Amazon Q App.
See also: AWS API Documentation
Request Syntax
client.get_q_app_session( instanceId='string', sessionId='string' )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App session to retrieve.
dict
Response Syntax
{ 'sessionId': 'string', 'sessionArn': 'string', 'sessionName': 'string', 'appVersion': 123, 'latestPublishedAppVersion': 123, 'status': 'IN_PROGRESS'|'WAITING'|'COMPLETED'|'ERROR', 'cardStatus': { 'string': { 'currentState': 'IN_PROGRESS'|'WAITING'|'COMPLETED'|'ERROR', 'currentValue': 'string', 'submissions': [ { 'value': {...}|[...]|123|123.4|'string'|True|None, 'submissionId': 'string', 'timestamp': datetime(2015, 1, 1) }, ] } }, 'userIsHost': True|False }
Response Structure
(dict) --
sessionId (string) --
The unique identifier of the Q App session.
sessionArn (string) --
The Amazon Resource Name (ARN) of the Q App session.
sessionName (string) --
The name of the Q App session.
appVersion (integer) --
The version of the Q App used for the session.
latestPublishedAppVersion (integer) --
The latest published version of the Q App used for the session.
status (string) --
The current status of the Q App session.
cardStatus (dict) --
The current status for each card in the Q App session.
(string) --
(dict) --
The current status and value of a card in an active Amazon Q App session.
currentState (string) --
The current state of the card.
currentValue (string) --
The current value or result associated with the card.
submissions (list) --
A list of previous submissions, if the card is a form card.
(dict) --
A record created when a user submits a form card.
value (:ref:`document<document>`) --
The data submitted by the user.
submissionId (string) --
The unique identifier of the submission.
timestamp (datetime) --
The date and time when the card is submitted.
userIsHost (boolean) --
Indicates whether the current user is the owner of the Q App data collection session.
{'app': {'appDefinition': {'cards': {'fileUpload': {'type': {'form-input'}}, 'formInput': {'computeMode': 'append | ' 'replace', 'id': 'string', 'metadata': {'schema': {}}, 'title': 'string', 'type': 'text-input | ' 'q-query | ' 'file-upload | ' 'q-plugin | ' 'form-input'}, 'qPlugin': {'type': {'form-input'}}, 'qQuery': {'type': {'form-input'}}, 'textInput': {'type': {'form-input'}}}}}}
Generates an Amazon Q App definition based on either a conversation or a problem statement provided as input.The resulting app definition can be used to call CreateQApp. This API doesn't create Amazon Q Apps directly.
See also: AWS API Documentation
Request Syntax
client.predict_q_app( instanceId='string', options={ 'conversation': [ { 'body': 'string', 'type': 'USER'|'SYSTEM' }, ], 'problemStatement': 'string' } )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
dict
The input to generate the Q App definition from, either a conversation or problem statement.
conversation (list) --
A conversation to use as input for generating the Q App definition.
(dict) --
A message in a conversation, used as input for generating an Amazon Q App definition.
body (string) -- [REQUIRED]
The text content of the conversation message.
type (string) -- [REQUIRED]
The type of the conversation message.
problemStatement (string) --
A problem statement to use as input for generating the Q App definition.
dict
Response Syntax
{ 'app': { 'title': 'string', 'description': 'string', 'appDefinition': { 'cards': [ { 'textInput': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'placeholder': 'string', 'defaultValue': 'string' }, 'qQuery': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'prompt': 'string', 'outputSource': 'approved-sources'|'llm', 'attributeFilter': { 'andAllFilters': [ {'... recursive ...'}, ], 'orAllFilters': [ {'... recursive ...'}, ], 'notFilter': {'... recursive ...'}, 'equalsTo': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'containsAll': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'containsAny': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'greaterThan': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'greaterThanOrEquals': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lessThan': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lessThanOrEquals': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } } } }, 'qPlugin': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'prompt': 'string', 'pluginId': 'string' }, 'fileUpload': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'filename': 'string', 'fileId': 'string', 'allowOverride': True|False }, 'formInput': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'metadata': { 'schema': {...}|[...]|123|123.4|'string'|True|None }, 'computeMode': 'append'|'replace' } }, ], 'initialPrompt': 'string' } }, 'problemStatement': 'string' }
Response Structure
(dict) --
app (dict) --
The generated Q App definition.
title (string) --
The title of the generated Q App definition.
description (string) --
The description of the generated Q App definition.
appDefinition (dict) --
The definition specifying the cards and flow of the generated Q App.
cards (list) --
The cards that make up the Q App definition.
(dict) --
The properties defining an input card in an Amazon Q App.
textInput (dict) --
A container for the properties of the text input card.
title (string) --
The title or label of the text input card.
id (string) --
The unique identifier of the text input card.
type (string) --
The type of the card.
placeholder (string) --
The placeholder text to display in the text input field.
defaultValue (string) --
The default value to pre-populate in the text input field.
qQuery (dict) --
A container for the properties of the query input card.
title (string) --
The title or label of the query card.
id (string) --
The unique identifier of the query card.
type (string) --
The type of the card.
prompt (string) --
The prompt or instructions displayed for the query card.
outputSource (string) --
The source or type of output to generate for the query card.
attributeFilter (dict) --
Turns on filtering of responses based on document attributes or metadata fields.
andAllFilters (list) --
Performs a logical AND operation on all supplied filters.
(dict) --
The filter criteria used on responses based on document attributes or metadata fields.
orAllFilters (list) --
Performs a logical OR operation on all supplied filters.
(dict) --
The filter criteria used on responses based on document attributes or metadata fields.
notFilter (dict) --
Performs a logical NOT operation on all supplied filters.
equalsTo (dict) --
Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue, longValue, stringListValue and stringValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
containsAll (dict) --
Returns true when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
containsAny (dict) --
Returns true when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
greaterThan (dict) --
Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
greaterThanOrEquals (dict) --
Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
lessThan (dict) --
Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
lessThanOrEquals (dict) --
Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type: dateValue and longValue.
name (string) --
The identifier for the attribute.
value (dict) --
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
qPlugin (dict) --
A container for the properties of the plugin input card.
title (string) --
The title or label of the plugin card.
id (string) --
The unique identifier of the plugin card.
type (string) --
The type of the card.
prompt (string) --
The prompt or instructions displayed for the plugin card.
pluginId (string) --
The unique identifier of the plugin used by the card.
fileUpload (dict) --
A container for the properties of the file upload input card.
title (string) --
The title or label of the file upload card.
id (string) --
The unique identifier of the file upload card.
type (string) --
The type of the card.
filename (string) --
The default filename to use for the file upload card.
fileId (string) --
The identifier of a pre-uploaded file associated with the card.
allowOverride (boolean) --
A flag indicating if the user can override the default file for the upload card.
formInput (dict) --
A container for the properties of the form input card.
title (string) --
The title or label of the form input card.
id (string) --
The unique identifier of the form input card.
type (string) --
The type of the card.
metadata (dict) --
The metadata that defines the form input card data.
schema (:ref:`document<document>`) --
The JSON schema that defines the shape of the response data.
computeMode (string) --
The compute mode of the form input card. This property determines whether individual participants of a data collection session can submit multiple response or one response. A compute mode of append shall allow participants to submit the same form multiple times with different values. A compute mode of ``replace``code> shall overwrite the current value for each participant.
initialPrompt (string) --
The initial prompt displayed when the Q App is started.
problemStatement (string) --
The problem statement extracted from the input conversation, if provided.
{'initialValues': {'submissionMutation': {'mutationType': 'edit | delete | add', 'submissionId': 'string'}}, 'sessionId': 'string'}
Starts a new session for an Amazon Q App, allowing inputs to be provided and the app to be run.
See also: AWS API Documentation
Request Syntax
client.start_q_app_session( instanceId='string', appId='string', appVersion=123, initialValues=[ { 'cardId': 'string', 'value': 'string', 'submissionMutation': { 'submissionId': 'string', 'mutationType': 'edit'|'delete'|'add' } }, ], sessionId='string', tags={ 'string': 'string' } )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App to start a session for.
integer
[REQUIRED]
The version of the Q App to use for the session.
list
Optional initial input values to provide for the Q App session.
(dict) --
The value or result associated with a card in a Amazon Q App session.
cardId (string) -- [REQUIRED]
The unique identifier of the card.
value (string) -- [REQUIRED]
The value or result associated with the card.
submissionMutation (dict) --
The structure that describes how the current form card value is mutated. Only applies for form cards when multiple responses are allowed.
submissionId (string) -- [REQUIRED]
The unique identifier of the submission.
mutationType (string) -- [REQUIRED]
The operation that is performed on a submission.
string
The unique identifier of the a Q App session.
dict
Optional tags to associate with the new Q App session.
(string) --
(string) --
dict
Response Syntax
{ 'sessionId': 'string', 'sessionArn': 'string' }
Response Structure
(dict) --
sessionId (string) --
The unique identifier of the new or retrieved Q App session.
sessionArn (string) --
The Amazon Resource Name (ARN) of the new Q App session.
{'appDefinition': {'cards': {'fileUpload': {'type': {'form-input'}}, 'formInput': {'computeMode': 'append | replace', 'id': 'string', 'metadata': {'schema': {}}, 'title': 'string', 'type': 'text-input | q-query | ' 'file-upload | q-plugin | ' 'form-input'}, 'qPlugin': {'type': {'form-input'}}, 'qQuery': {'type': {'form-input'}}, 'textInput': {'type': {'form-input'}}}}}
Updates an existing Amazon Q App, allowing modifications to its title, description, and definition.
See also: AWS API Documentation
Request Syntax
client.update_q_app( instanceId='string', appId='string', title='string', description='string', appDefinition={ 'cards': [ { 'textInput': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'placeholder': 'string', 'defaultValue': 'string' }, 'qQuery': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'prompt': 'string', 'outputSource': 'approved-sources'|'llm', 'attributeFilter': { 'andAllFilters': [ {'... recursive ...'}, ], 'orAllFilters': [ {'... recursive ...'}, ], 'notFilter': {'... recursive ...'}, 'equalsTo': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'containsAll': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'containsAny': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'greaterThan': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'greaterThanOrEquals': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lessThan': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lessThanOrEquals': { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } } } }, 'qPlugin': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'prompt': 'string', 'pluginId': 'string' }, 'fileUpload': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'filename': 'string', 'fileId': 'string', 'allowOverride': True|False }, 'formInput': { 'title': 'string', 'id': 'string', 'type': 'text-input'|'q-query'|'file-upload'|'q-plugin'|'form-input', 'metadata': { 'schema': {...}|[...]|123|123.4|'string'|True|None }, 'computeMode': 'append'|'replace' } }, ], 'initialPrompt': 'string' } )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App to update.
string
The new title for the Q App.
string
The new description for the Q App.
dict
The new definition specifying the cards and flow for the Q App.
cards (list) -- [REQUIRED]
The cards that make up the Q App definition.
(dict) --
The properties defining an input card in an Amazon Q App.
textInput (dict) --
A container for the properties of the text input card.
title (string) -- [REQUIRED]
The title or label of the text input card.
id (string) -- [REQUIRED]
The unique identifier of the text input card.
type (string) -- [REQUIRED]
The type of the card.
placeholder (string) --
The placeholder text to display in the text input field.
defaultValue (string) --
The default value to pre-populate in the text input field.
qQuery (dict) --
A container for the properties of the query input card.
title (string) -- [REQUIRED]
The title or label of the query card.
id (string) -- [REQUIRED]
The unique identifier of the query card.
type (string) -- [REQUIRED]
The type of the card.
prompt (string) -- [REQUIRED]
The prompt or instructions displayed for the query card.
outputSource (string) --
The source or type of output to generate for the query card.
attributeFilter (dict) --
Turns on filtering of responses based on document attributes or metadata fields.
andAllFilters (list) --
Performs a logical AND operation on all supplied filters.
(dict) --
The filter criteria used on responses based on document attributes or metadata fields.
orAllFilters (list) --
Performs a logical OR operation on all supplied filters.
(dict) --
The filter criteria used on responses based on document attributes or metadata fields.
notFilter (dict) --
Performs a logical NOT operation on all supplied filters.
equalsTo (dict) --
Performs an equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue, longValue, stringListValue and stringValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
containsAll (dict) --
Returns true when a document contains all the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
containsAny (dict) --
Returns true when a document contains any of the specified document attributes or metadata fields. Supported for the following document attribute value types: stringListValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
greaterThan (dict) --
Performs a greater than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
greaterThanOrEquals (dict) --
Performs a greater than or equals operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
lessThan (dict) --
Performs a less than operation on two document attributes or metadata fields. Supported for the following document attribute value types: dateValue and longValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
lessThanOrEquals (dict) --
Performs a less than or equals operation on two document attributes or metadata fields.Supported for the following document attribute value type: dateValue and longValue.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
stringValue (string) --
A string.
stringListValue (list) --
A list of strings.
(string) --
longValue (integer) --
A long integer value.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
qPlugin (dict) --
A container for the properties of the plugin input card.
title (string) -- [REQUIRED]
The title or label of the plugin card.
id (string) -- [REQUIRED]
The unique identifier of the plugin card.
type (string) -- [REQUIRED]
The type of the card.
prompt (string) -- [REQUIRED]
The prompt or instructions displayed for the plugin card.
pluginId (string) -- [REQUIRED]
The unique identifier of the plugin used by the card.
fileUpload (dict) --
A container for the properties of the file upload input card.
title (string) -- [REQUIRED]
The title or label of the file upload card.
id (string) -- [REQUIRED]
The unique identifier of the file upload card.
type (string) -- [REQUIRED]
The type of the card.
filename (string) --
The default filename to use for the file upload card.
fileId (string) --
The identifier of a pre-uploaded file associated with the card.
allowOverride (boolean) --
A flag indicating if the user can override the default file for the upload card.
formInput (dict) --
A container for the properties of the form input card.
title (string) -- [REQUIRED]
The title or label of the form input card.
id (string) -- [REQUIRED]
The unique identifier of the form input card.
type (string) -- [REQUIRED]
The type of the card.
metadata (dict) -- [REQUIRED]
The metadata that defines the form input card data.
schema (:ref:`document<document>`) -- [REQUIRED]
The JSON schema that defines the shape of the response data.
computeMode (string) --
The compute mode of the form input card. This property determines whether individual participants of a data collection session can submit multiple response or one response. A compute mode of append shall allow participants to submit the same form multiple times with different values. A compute mode of ``replace``code> shall overwrite the current value for each participant.
initialPrompt (string) --
The initial prompt displayed when the Q App is started.
dict
Response Syntax
{ 'appId': 'string', 'appArn': 'string', 'title': 'string', 'description': 'string', 'initialPrompt': 'string', 'appVersion': 123, 'status': 'PUBLISHED'|'DRAFT'|'DELETED', 'createdAt': datetime(2015, 1, 1), 'createdBy': 'string', 'updatedAt': datetime(2015, 1, 1), 'updatedBy': 'string', 'requiredCapabilities': [ 'FileUpload'|'CreatorMode'|'RetrievalMode'|'PluginMode', ] }
Response Structure
(dict) --
appId (string) --
The unique identifier of the updated Q App.
appArn (string) --
The Amazon Resource Name (ARN) of the updated Q App.
title (string) --
The new title of the updated Q App.
description (string) --
The new description of the updated Q App.
initialPrompt (string) --
The initial prompt for the updated Q App.
appVersion (integer) --
The new version of the updated Q App.
status (string) --
The status of the updated Q App.
createdAt (datetime) --
The date and time the Q App was originally created.
createdBy (string) --
The user who originally created the Q App.
updatedAt (datetime) --
The date and time the Q App was last updated.
updatedBy (string) --
The user who last updated the Q App.
requiredCapabilities (list) --
The capabilities required for the updated Q App.
(string) --
{'values': {'submissionMutation': {'mutationType': 'edit | delete | add', 'submissionId': 'string'}}}
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.
See also: AWS API Documentation
Request Syntax
client.update_q_app_session( instanceId='string', sessionId='string', values=[ { 'cardId': 'string', 'value': 'string', 'submissionMutation': { 'submissionId': 'string', 'mutationType': 'edit'|'delete'|'add' } }, ] )
string
[REQUIRED]
The unique identifier of the Amazon Q Business application environment instance.
string
[REQUIRED]
The unique identifier of the Q App session to provide input for.
list
The input values to provide for the current state of the Q App session.
(dict) --
The value or result associated with a card in a Amazon Q App session.
cardId (string) -- [REQUIRED]
The unique identifier of the card.
value (string) -- [REQUIRED]
The value or result associated with the card.
submissionMutation (dict) --
The structure that describes how the current form card value is mutated. Only applies for form cards when multiple responses are allowed.
submissionId (string) -- [REQUIRED]
The unique identifier of the submission.
mutationType (string) -- [REQUIRED]
The operation that is performed on a submission.
dict
Response Syntax
{ 'sessionId': 'string', 'sessionArn': 'string' }
Response Structure
(dict) --
sessionId (string) --
The unique identifier of the updated Q App session.
sessionArn (string) --
The Amazon Resource Name (ARN) of the updated Q App session.