QApps

2024/07/08 - QApps - 23 new api methods

Changes  This is a general availability (GA) release of Amazon Q Apps, a capability of Amazon Q Business. Q Apps leverages data sources your company has provided to enable users to build, share, and customize apps within your organization.

UpdateQApp (new) Link ¶

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',
                    'placeholder': 'string',
                    'defaultValue': 'string'
                },
                'qQuery': {
                    'title': 'string',
                    'id': 'string',
                    'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                    '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',
                    'prompt': 'string',
                    'pluginId': 'string'
                },
                'fileUpload': {
                    'title': 'string',
                    'id': 'string',
                    'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                    'filename': 'string',
                    'fileId': 'string',
                    'allowOverride': True|False
                }
            },
        ],
        'initialPrompt': 'string'
    }
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type appId:

string

param appId:

[REQUIRED]

The unique identifier of the Q App to update.

type title:

string

param title:

The new title for the Q App.

type description:

string

param description:

The new description for the Q App.

type appDefinition:

dict

param appDefinition:

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.

  • initialPrompt (string) --

    The initial prompt displayed when the Q App is started.

rtype:

dict

returns:

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) --

CreateLibraryItem (new) Link ¶

Creates a new library item for an Amazon Q App, allowing it to be discovered and used by other allowed users.

See also: AWS API Documentation

Request Syntax

client.create_library_item(
    instanceId='string',
    appId='string',
    appVersion=123,
    categories=[
        'string',
    ]
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type appId:

string

param appId:

[REQUIRED]

The unique identifier of the Amazon Q App to publish to the library.

type appVersion:

integer

param appVersion:

[REQUIRED]

The version of the Amazon Q App to publish to the library.

type categories:

list

param categories:

[REQUIRED]

The categories to associate with the library item for easier discovery.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'libraryItemId': 'string',
    'status': 'string',
    'createdAt': datetime(2015, 1, 1),
    'createdBy': 'string',
    'updatedAt': datetime(2015, 1, 1),
    'updatedBy': 'string',
    'ratingCount': 123
}

Response Structure

  • (dict) --

    • libraryItemId (string) --

      The unique identifier of the new library item.

    • status (string) --

      The status of the new library item, such as "Published".

    • createdAt (datetime) --

      The date and time the library item was created.

    • createdBy (string) --

      The user who created the library item.

    • updatedAt (datetime) --

      The date and time the library item was last updated.

    • updatedBy (string) --

      The user who last updated the library item.

    • ratingCount (integer) --

      The number of ratings the library item has received from users.

UpdateLibraryItem (new) Link ¶

Updates the metadata and status of a library item for an Amazon Q App.

See also: AWS API Documentation

Request Syntax

client.update_library_item(
    instanceId='string',
    libraryItemId='string',
    status='PUBLISHED'|'DISABLED',
    categories=[
        'string',
    ]
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type libraryItemId:

string

param libraryItemId:

[REQUIRED]

The unique identifier of the library item to update.

type status:

string

param status:

The new status to set for the library item, such as "Published" or "Hidden".

type categories:

list

param categories:

The new categories to associate with the library item.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'libraryItemId': 'string',
    'appId': 'string',
    'appVersion': 123,
    'categories': [
        {
            'id': 'string',
            'title': 'string'
        },
    ],
    'status': 'string',
    'createdAt': datetime(2015, 1, 1),
    'createdBy': 'string',
    'updatedAt': datetime(2015, 1, 1),
    'updatedBy': 'string',
    'ratingCount': 123,
    'isRatedByUser': True|False,
    'userCount': 123
}

Response Structure

  • (dict) --

    • libraryItemId (string) --

      The unique identifier of the updated library item.

    • appId (string) --

      The unique identifier of the Q App associated with the library item.

    • appVersion (integer) --

      The version of the Q App associated with the library item.

    • categories (list) --

      The categories associated with the updated library item.

      • (dict) --

        A category used to classify and filter library items for Amazon Q Apps.

        • id (string) --

          The unique identifier of the category.

        • title (string) --

          The title or name of the category.

    • status (string) --

      The new status of the updated library item.

    • createdAt (datetime) --

      The date and time the library item was originally created.

    • createdBy (string) --

      The user who originally created the library item.

    • updatedAt (datetime) --

      The date and time the library item was last updated.

    • updatedBy (string) --

      The user who last updated the library item.

    • ratingCount (integer) --

      The number of ratings the library item has received.

    • isRatedByUser (boolean) --

      Whether the current user has rated the library item.

    • userCount (integer) --

      The number of users who have the associated Q App.

PredictQApp (new) Link ¶

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'
    }
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type options:

dict

param options:

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.

rtype:

dict

returns:

Response Syntax

{
    'app': {
        'title': 'string',
        'description': 'string',
        'appDefinition': {
            'cards': [
                {
                    'textInput': {
                        'title': 'string',
                        'id': 'string',
                        'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                        'placeholder': 'string',
                        'defaultValue': 'string'
                    },
                    'qQuery': {
                        'title': 'string',
                        'id': 'string',
                        'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                        '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',
                        'prompt': 'string',
                        'pluginId': 'string'
                    },
                    'fileUpload': {
                        'title': 'string',
                        'id': 'string',
                        'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                        'filename': 'string',
                        'fileId': 'string',
                        'allowOverride': True|False
                    }
                },
            ],
            '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.

        • initialPrompt (string) --

          The initial prompt displayed when the Q App is started.

    • problemStatement (string) --

      The problem statement extracted from the input conversation, if provided.

StopQAppSession (new) Link ¶

Stops an active session for an Amazon Q App.This deletes all data related to the session and makes it invalid for future uses. The results of the session will be persisted as part of the conversation.

See also: AWS API Documentation

Request Syntax

client.stop_q_app_session(
    instanceId='string',
    sessionId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type sessionId:

string

param sessionId:

[REQUIRED]

The unique identifier of the Q App session to stop.

returns:

None

StartQAppSession (new) Link ¶

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'
        },
    ],
    tags={
        'string': 'string'
    }
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type appId:

string

param appId:

[REQUIRED]

The unique identifier of the Q App to start a session for.

type appVersion:

integer

param appVersion:

[REQUIRED]

The version of the Q App to use for the session.

type initialValues:

list

param initialValues:

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.

type tags:

dict

param tags:

Optional tags to associate with the new Q App session.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'sessionId': 'string',
    'sessionArn': 'string'
}

Response Structure

  • (dict) --

    • sessionId (string) --

      The unique identifier of the new Q App session.

    • sessionArn (string) --

      The Amazon Resource Name (ARN) of the new Q App session.

GetLibraryItem (new) Link ¶

Retrieves details about a library item for an Amazon Q App, including its metadata, categories, ratings, and usage statistics.

See also: AWS API Documentation

Request Syntax

client.get_library_item(
    instanceId='string',
    libraryItemId='string',
    appId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type libraryItemId:

string

param libraryItemId:

[REQUIRED]

The unique identifier of the library item to retrieve.

type appId:

string

param appId:

The unique identifier of the Amazon Q App associated with the library item.

rtype:

dict

returns:

Response Syntax

{
    'libraryItemId': 'string',
    'appId': 'string',
    'appVersion': 123,
    'categories': [
        {
            'id': 'string',
            'title': 'string'
        },
    ],
    'status': 'string',
    'createdAt': datetime(2015, 1, 1),
    'createdBy': 'string',
    'updatedAt': datetime(2015, 1, 1),
    'updatedBy': 'string',
    'ratingCount': 123,
    'isRatedByUser': True|False,
    'userCount': 123
}

Response Structure

  • (dict) --

    • libraryItemId (string) --

      The unique identifier of the library item.

    • appId (string) --

      The unique identifier of the Q App associated with the library item.

    • appVersion (integer) --

      The version of the Q App associated with the library item.

    • categories (list) --

      The categories associated with the library item for discovery.

      • (dict) --

        A category used to classify and filter library items for Amazon Q Apps.

        • id (string) --

          The unique identifier of the category.

        • title (string) --

          The title or name of the category.

    • status (string) --

      The status of the library item, such as "Published".

    • createdAt (datetime) --

      The date and time the library item was created.

    • createdBy (string) --

      The user who created the library item.

    • updatedAt (datetime) --

      The date and time the library item was last updated.

    • updatedBy (string) --

      The user who last updated the library item.

    • ratingCount (integer) --

      The number of ratings the library item has received from users.

    • isRatedByUser (boolean) --

      Whether the current user has rated the library item.

    • userCount (integer) --

      The number of users who have associated the Q App with their account.

AssociateLibraryItemReview (new) Link ¶

Associates a rating or review for a library item with the user submitting the request. This increments the rating count for the specified library item.

See also: AWS API Documentation

Request Syntax

client.associate_library_item_review(
    instanceId='string',
    libraryItemId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier for the Amazon Q Business application environment instance.

type libraryItemId:

string

param libraryItemId:

[REQUIRED]

The unique identifier of the library item to associate the review with.

returns:

None

ListQApps (new) Link ¶

Lists the Amazon Q Apps owned by or associated with the user either because they created it or because they used it from the library in the past. The user identity is extracted from the credentials used to invoke this operation..

See also: AWS API Documentation

Request Syntax

client.list_q_apps(
    instanceId='string',
    limit=123,
    nextToken='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type limit:

integer

param limit:

The maximum number of Q Apps to return in the response.

type nextToken:

string

param nextToken:

The token to request the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'apps': [
        {
            'appId': 'string',
            'appArn': 'string',
            'title': 'string',
            'description': 'string',
            'createdAt': datetime(2015, 1, 1),
            'canEdit': True|False,
            'status': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • apps (list) --

      The list of Amazon Q Apps meeting the request criteria.

      • (dict) --

        An Amazon Q App associated with a user, either owned by the user or favorited.

        • 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.

        • createdAt (datetime) --

          The date and time the user's association with the Q App was created.

        • canEdit (boolean) --

          A flag indicating whether the user can edit the Q App.

        • status (string) --

          The status of the user's association with the Q App.

    • nextToken (string) --

      The token to use to request the next page of results.

AssociateQAppWithUser (new) Link ¶

This operation creates a link between the user's identity calling the operation and a specific Q App. This is useful to mark the Q App as a favorite for the user if the user doesn't own the Amazon Q App so they can still run it and see it in their inventory of Q Apps.

See also: AWS API Documentation

Request Syntax

client.associate_q_app_with_user(
    instanceId='string',
    appId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type appId:

string

param appId:

[REQUIRED]

The ID of the Amazon Q App to associate with the user.

returns:

None

UpdateQAppSession (new) Link ¶

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'
        },
    ]
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type sessionId:

string

param sessionId:

[REQUIRED]

The unique identifier of the Q App session to provide input for.

type values:

list

param values:

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.

rtype:

dict

returns:

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.

GetQApp (new) Link ¶

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'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type appId:

string

param appId:

[REQUIRED]

The unique identifier of the Q App to retrieve.

rtype:

dict

returns:

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',
                    'placeholder': 'string',
                    'defaultValue': 'string'
                },
                'qQuery': {
                    'id': 'string',
                    'title': 'string',
                    'dependencies': [
                        'string',
                    ],
                    'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                    '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': {
                    'id': 'string',
                    'title': 'string',
                    'dependencies': [
                        'string',
                    ],
                    'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                    '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',
                    'filename': 'string',
                    'fileId': 'string',
                    'allowOverride': True|False
                }
            },
        ],
        '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.

          • 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.

      • canEdit (boolean) --

        A flag indicating whether the Q App's definition can be edited by the user.

DeleteQApp (new) Link ¶

Deletes an Amazon Q App owned by the user. If the Q App was previously published to the library, it is also removed from the library.

See also: AWS API Documentation

Request Syntax

client.delete_q_app(
    instanceId='string',
    appId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type appId:

string

param appId:

[REQUIRED]

The unique identifier of the Q App to delete.

returns:

None

DisassociateQAppFromUser (new) Link ¶

Disassociates a Q App from a user removing the user's access to run the Q App.

See also: AWS API Documentation

Request Syntax

client.disassociate_q_app_from_user(
    instanceId='string',
    appId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type appId:

string

param appId:

[REQUIRED]

The unique identifier of the Q App to disassociate from the user.

returns:

None

TagResource (new) Link ¶

Associates tags with an Amazon Q Apps resource.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceARN='string',
    tags={
        'string': 'string'
    }
)
type resourceARN:

string

param resourceARN:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to tag.

type tags:

dict

param tags:

[REQUIRED]

The tags to associate with the resource.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DeleteLibraryItem (new) Link ¶

Deletes a library item for an Amazon Q App, removing it from the library so it can no longer be discovered or used by other users.

See also: AWS API Documentation

Request Syntax

client.delete_library_item(
    instanceId='string',
    libraryItemId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type libraryItemId:

string

param libraryItemId:

[REQUIRED]

The unique identifier of the library item to delete.

returns:

None

ListTagsForResource (new) Link ¶

Lists the tags associated with an Amazon Q Apps resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceARN='string'
)
type resourceARN:

string

param resourceARN:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource whose tags should be listed.

rtype:

dict

returns:

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      The list of tags that are assigned to the resource.

      • (string) --

        • (string) --

GetQAppSession (new) Link ¶

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'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type sessionId:

string

param sessionId:

[REQUIRED]

The unique identifier of the Q App session to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'sessionId': 'string',
    'sessionArn': 'string',
    'status': 'IN_PROGRESS'|'WAITING'|'COMPLETED',
    'cardStatus': {
        'string': {
            'currentState': 'IN_PROGRESS'|'WAITING'|'COMPLETED',
            'currentValue': 'string'
        }
    }
}

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.

    • 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.

ListLibraryItems (new) Link ¶

Lists the library items for Amazon Q Apps that are published and available for users in your Amazon Web Services account.

See also: AWS API Documentation

Request Syntax

client.list_library_items(
    instanceId='string',
    limit=123,
    nextToken='string',
    categoryId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type limit:

integer

param limit:

The maximum number of library items to return in the response.

type nextToken:

string

param nextToken:

The token to request the next page of results.

type categoryId:

string

param categoryId:

Optional category to filter the library items by.

rtype:

dict

returns:

Response Syntax

{
    'libraryItems': [
        {
            'libraryItemId': 'string',
            'appId': 'string',
            'appVersion': 123,
            'categories': [
                {
                    'id': 'string',
                    'title': 'string'
                },
            ],
            'status': 'string',
            'createdAt': datetime(2015, 1, 1),
            'createdBy': 'string',
            'updatedAt': datetime(2015, 1, 1),
            'updatedBy': 'string',
            'ratingCount': 123,
            'isRatedByUser': True|False,
            'userCount': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • libraryItems (list) --

      The list of library items meeting the request criteria.

      • (dict) --

        A library item is a snapshot of an Amazon Q App that can be published so the users in their Amazon Q Apps library can discover it, clone it, and run it.

        • libraryItemId (string) --

          The unique identifier of the library item.

        • appId (string) --

          The unique identifier of the Q App associated with the library item.

        • appVersion (integer) --

          The version of the Q App associated with the library item.

        • categories (list) --

          The categories associated with the library item.

          • (dict) --

            A category used to classify and filter library items for Amazon Q Apps.

            • id (string) --

              The unique identifier of the category.

            • title (string) --

              The title or name of the category.

        • status (string) --

          The status of the library item.

        • createdAt (datetime) --

          The date and time the library item was created.

        • createdBy (string) --

          The user who created the library item.

        • updatedAt (datetime) --

          The date and time the library item was last updated.

        • updatedBy (string) --

          The user who last updated the library item.

        • ratingCount (integer) --

          The number of ratings the library item has received.

        • isRatedByUser (boolean) --

          Whether the current user has rated the library item.

        • userCount (integer) --

          The number of users who have the associated Q App.

    • nextToken (string) --

      The token to use to request the next page of results.

ImportDocument (new) Link ¶

Uploads a file that can then be used either as a default in a FileUploadCard from Q App definition or as a file that is used inside a single Q App run. The purpose of the document is determined by a scope parameter that indicates whether it is at the app definition level or at the app session level.

See also: AWS API Documentation

Request Syntax

client.import_document(
    instanceId='string',
    cardId='string',
    appId='string',
    fileContentsBase64='string',
    fileName='string',
    scope='APPLICATION'|'SESSION',
    sessionId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type cardId:

string

param cardId:

[REQUIRED]

The unique identifier of the card the file is associated with, if applicable.

type appId:

string

param appId:

[REQUIRED]

The unique identifier of the Q App the file is associated with.

type fileContentsBase64:

string

param fileContentsBase64:

[REQUIRED]

The base64-encoded contents of the file to upload.

type fileName:

string

param fileName:

[REQUIRED]

The name of the file being uploaded.

type scope:

string

param scope:

[REQUIRED]

Whether the file is associated with an Q App definition or a specific Q App session.

type sessionId:

string

param sessionId:

The unique identifier of the Q App session the file is associated with, if applicable.

rtype:

dict

returns:

Response Syntax

{
    'fileId': 'string'
}

Response Structure

  • (dict) --

    • fileId (string) --

      The unique identifier assigned to the uploaded file.

DisassociateLibraryItemReview (new) Link ¶

Removes a rating or review previously submitted by the user for a library item.

See also: AWS API Documentation

Request Syntax

client.disassociate_library_item_review(
    instanceId='string',
    libraryItemId='string'
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type libraryItemId:

string

param libraryItemId:

[REQUIRED]

The unique identifier of the library item to remove the review from.

returns:

None

UntagResource (new) Link ¶

Disassociates tags from an Amazon Q Apps resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceARN='string',
    tagKeys=[
        'string',
    ]
)
type resourceARN:

string

param resourceARN:

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to disassociate the tag from.

type tagKeys:

list

param tagKeys:

[REQUIRED]

The keys of the tags to disassociate from the resource.

  • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

CreateQApp (new) Link ¶

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',
                    'placeholder': 'string',
                    'defaultValue': 'string'
                },
                'qQuery': {
                    'title': 'string',
                    'id': 'string',
                    'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                    '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',
                    'prompt': 'string',
                    'pluginId': 'string'
                },
                'fileUpload': {
                    'title': 'string',
                    'id': 'string',
                    'type': 'text-input'|'q-query'|'file-upload'|'q-plugin',
                    'filename': 'string',
                    'fileId': 'string',
                    'allowOverride': True|False
                }
            },
        ],
        'initialPrompt': 'string'
    },
    tags={
        'string': 'string'
    }
)
type instanceId:

string

param instanceId:

[REQUIRED]

The unique identifier of the Amazon Q Business application environment instance.

type title:

string

param title:

[REQUIRED]

The title of the new Q App.

type description:

string

param description:

The description of the new Q App.

type appDefinition:

dict

param appDefinition:

[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.

  • initialPrompt (string) --

    The initial prompt displayed when the Q App is started.

type tags:

dict

param tags:

Optional tags to associate with the new Q App.

  • (string) --

    • (string) --

rtype:

dict

returns:

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) --