QBusiness / Paginator / ListMessages

ListMessages#

class QBusiness.Paginator.ListMessages#
paginator = client.get_paginator('list_messages')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from QBusiness.Client.list_messages().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    applicationId='string',
    conversationId='string',
    userId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The identifier for the Amazon Q Business application.

  • conversationId (string) –

    [REQUIRED]

    The identifier of the Amazon Q Business web experience conversation.

  • userId (string) – The identifier of the user involved in the Amazon Q Business web experience conversation.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'messages': [
        {
            'actionExecution': {
                'payload': {
                    'string': {
                        'value': {...}|[...]|123|123.4|'string'|True|None
                    }
                },
                'payloadFieldNameSeparator': 'string',
                'pluginId': 'string'
            },
            'actionReview': {
                'payload': {
                    'string': {
                        'allowedValues': [
                            {
                                'displayValue': {...}|[...]|123|123.4|'string'|True|None,
                                'value': {...}|[...]|123|123.4|'string'|True|None
                            },
                        ],
                        'displayName': 'string',
                        'displayOrder': 123,
                        'required': True|False,
                        'type': 'STRING'|'NUMBER'|'ARRAY'|'BOOLEAN',
                        'value': {...}|[...]|123|123.4|'string'|True|None
                    }
                },
                'payloadFieldNameSeparator': 'string',
                'pluginId': 'string',
                'pluginType': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK'
            },
            'attachments': [
                {
                    'error': {
                        'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound',
                        'errorMessage': 'string'
                    },
                    'name': 'string',
                    'status': 'FAILED'|'SUCCEEDED'
                },
            ],
            'body': 'string',
            'messageId': 'string',
            'sourceAttribution': [
                {
                    'citationNumber': 123,
                    'snippet': 'string',
                    'textMessageSegments': [
                        {
                            'beginOffset': 123,
                            'endOffset': 123
                        },
                    ],
                    'title': 'string',
                    'updatedAt': datetime(2015, 1, 1),
                    'url': 'string'
                },
            ],
            'time': datetime(2015, 1, 1),
            'type': 'USER'|'SYSTEM'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • messages (list) –

      An array of information on one or more messages.

      • (dict) –

        A message in an Amazon Q Business web experience.

        • actionExecution (dict) –

          Performs an Amazon Q Business plugin action during a non-streaming chat conversation.

          • payload (dict) –

            A mapping of field names to the field values in input that an end user provides to Amazon Q Business requests to perform their plugin action.

            • (string) –

              • (dict) –

                A user input field in an plugin action execution payload.

                • value (document) –

                  The content of a user input field in an plugin action execution payload.

          • payloadFieldNameSeparator (string) –

            A string used to retain information about the hierarchical contexts within an action execution event payload.

          • pluginId (string) –

            The identifier of the plugin the action is attached to.

        • actionReview (dict) –

          An output event that Amazon Q Business returns to an user who wants to perform a plugin action during a non-streaming chat conversation. It contains information about the selected action with a list of possible user input fields, some pre-populated by Amazon Q Business.

          • payload (dict) –

            Field values that an end user needs to provide to Amazon Q Business for Amazon Q Business to perform the requested plugin action.

            • (string) –

              • (dict) –

                A user input field in an plugin action review payload.

                • allowedValues (list) –

                  Information about the field values that an end user can use to provide to Amazon Q Business for Amazon Q Business to perform the requested plugin action.

                  • (dict) –

                    Information about the field values that an end user can use to provide to Amazon Q Business for Amazon Q Business to perform the requested plugin action.

                    • displayValue (document) –

                      The name of the field.

                    • value (document) –

                      The field value.

                • displayName (string) –

                  The name of the field.

                • displayOrder (integer) –

                  The display order of fields in a payload.

                • required (boolean) –

                  Information about whether the field is required.

                • type (string) –

                  The type of field.

                • value (document) –

                  The field value.

          • payloadFieldNameSeparator (string) –

            A string used to retain information about the hierarchical contexts within an action review payload.

          • pluginId (string) –

            The identifier of the plugin associated with the action review.

          • pluginType (string) –

            The type of plugin.

        • attachments (list) –

          A file directly uploaded into an Amazon Q Business web experience chat.

          • (dict) –

            The details of a file uploaded during chat.

            • error (dict) –

              An error associated with a file uploaded during chat.

              • errorCode (string) –

                The code associated with the data source sync error.

              • errorMessage (string) –

                The message explaining the data source sync error.

            • name (string) –

              The name of a file uploaded during chat.

            • status (string) –

              The status of a file uploaded during chat.

        • body (string) –

          The content of the Amazon Q Business web experience message.

        • messageId (string) –

          The identifier of the Amazon Q Business web experience message.

        • sourceAttribution (list) –

          The source documents used to generate Amazon Q Business web experience message.

          • (dict) –

            The documents used to generate an Amazon Q Business web experience response.

            • citationNumber (integer) –

              The number attached to a citation in an Amazon Q Business generated response.

            • snippet (string) –

              The content extract from the document on which the generated response is based.

            • textMessageSegments (list) –

              A text extract from a source document that is used for source attribution.

              • (dict) –

                Provides information about a text extract in a chat response that can be attributed to a source document.

                • beginOffset (integer) –

                  The zero-based location in the response string where the source attribution starts.

                • endOffset (integer) –

                  The zero-based location in the response string where the source attribution ends.

            • title (string) –

              The title of the document which is the source for the Amazon Q Business generated response.

            • updatedAt (datetime) –

              The Unix timestamp when the Amazon Q Business application was last updated.

            • url (string) –

              The URL of the document which is the source for the Amazon Q Business generated response.

        • time (datetime) –

          The timestamp of the first Amazon Q Business web experience message.

        • type (string) –

          The type of Amazon Q Business message, whether HUMAN or AI generated.

    • NextToken (string) –

      A token to resume pagination.