QBusiness

2024/04/17 - QBusiness - 7 updated api methods

Changes  This release adds support for IAM Identity Center (IDC) as the identity gateway for Q Business. It also allows users to provide an explicit intent for Q Business to identify how the Chat request should be handled.

ChatSync (updated) Link ¶
Changes (request)
{'chatMode': 'RETRIEVAL_MODE | CREATOR_MODE | PLUGIN_MODE',
 'chatModeConfiguration': {'pluginConfiguration': {'pluginId': 'string'}}}

Starts or continues a non-streaming Amazon Q Business conversation.

See also: AWS API Documentation

Request Syntax

client.chat_sync(
    actionExecution={
        'payload': {
            'string': {
                'value': {...}|[...]|123|123.4|'string'|True|None
            }
        },
        'payloadFieldNameSeparator': 'string',
        'pluginId': 'string'
    },
    applicationId='string',
    attachments=[
        {
            'data': b'bytes',
            'name': 'string'
        },
    ],
    attributeFilter={
        'andAllFilters': [
            {'... recursive ...'},
        ],
        'containsAll': {
            'name': 'string',
            'value': {
                'dateValue': datetime(2015, 1, 1),
                'longValue': 123,
                'stringListValue': [
                    'string',
                ],
                'stringValue': 'string'
            }
        },
        'containsAny': {
            'name': 'string',
            'value': {
                'dateValue': datetime(2015, 1, 1),
                'longValue': 123,
                'stringListValue': [
                    'string',
                ],
                'stringValue': 'string'
            }
        },
        'equalsTo': {
            'name': 'string',
            'value': {
                'dateValue': datetime(2015, 1, 1),
                'longValue': 123,
                'stringListValue': [
                    'string',
                ],
                'stringValue': 'string'
            }
        },
        'greaterThan': {
            'name': 'string',
            'value': {
                'dateValue': datetime(2015, 1, 1),
                'longValue': 123,
                'stringListValue': [
                    'string',
                ],
                'stringValue': 'string'
            }
        },
        'greaterThanOrEquals': {
            'name': 'string',
            'value': {
                'dateValue': datetime(2015, 1, 1),
                'longValue': 123,
                'stringListValue': [
                    'string',
                ],
                'stringValue': 'string'
            }
        },
        'lessThan': {
            'name': 'string',
            'value': {
                'dateValue': datetime(2015, 1, 1),
                'longValue': 123,
                'stringListValue': [
                    'string',
                ],
                'stringValue': 'string'
            }
        },
        'lessThanOrEquals': {
            'name': 'string',
            'value': {
                'dateValue': datetime(2015, 1, 1),
                'longValue': 123,
                'stringListValue': [
                    'string',
                ],
                'stringValue': 'string'
            }
        },
        'notFilter': {'... recursive ...'},
        'orAllFilters': [
            {'... recursive ...'},
        ]
    },
    chatMode='RETRIEVAL_MODE'|'CREATOR_MODE'|'PLUGIN_MODE',
    chatModeConfiguration={
        'pluginConfiguration': {
            'pluginId': 'string'
        }
    },
    clientToken='string',
    conversationId='string',
    parentMessageId='string',
    userGroups=[
        'string',
    ],
    userId='string',
    userMessage='string'
)
type actionExecution

dict

param actionExecution

A request from an end user to perform an Amazon Q Business plugin action.

  • payload (dict) -- [REQUIRED]

    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.

  • payloadFieldNameSeparator (string) -- [REQUIRED]

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

  • pluginId (string) -- [REQUIRED]

    The identifier of the plugin the action is attached to.

type applicationId

string

param applicationId

[REQUIRED]

The identifier of the Amazon Q Business application linked to the Amazon Q Business conversation.

type attachments

list

param attachments

A list of files uploaded directly during chat. You can upload a maximum of 5 files of upto 10 MB each.

  • (dict) --

    A file directly uploaded into a web experience chat.

    • data (bytes) -- [REQUIRED]

      The data contained within the uploaded file.

    • name (string) -- [REQUIRED]

      The name of the file.

type attributeFilter

dict

param attributeFilter

Enables filtering of Amazon Q Business web experience responses based on document attributes or metadata fields.

  • andAllFilters (list) --

    Performs a logical AND operation on all supplied filters.

    • (dict) --

      Enables filtering of responses based on document attributes or metadata fields.

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

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: dateValue, longValue, stringListValue, stringValue.

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

      • longValue (integer) --

        A long integer value.

      • stringListValue (list) --

        A list of strings.

        • (string) --

      • stringValue (string) --

        A string.

  • 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: dateValue , longValue , stringListValue and stringValue .

    • name (string) -- [REQUIRED]

      The identifier for the attribute.

    • value (dict) -- [REQUIRED]

      The value of the attribute.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: dateValue, longValue, stringListValue, stringValue.

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

      • longValue (integer) --

        A long integer value.

      • stringListValue (list) --

        A list of strings.

        • (string) --

      • stringValue (string) --

        A string.

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

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: dateValue, longValue, stringListValue, stringValue.

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

      • longValue (integer) --

        A long integer value.

      • stringListValue (list) --

        A list of strings.

        • (string) --

      • stringValue (string) --

        A string.

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

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: dateValue, longValue, stringListValue, stringValue.

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

      • longValue (integer) --

        A long integer value.

      • stringListValue (list) --

        A list of strings.

        • (string) --

      • stringValue (string) --

        A string.

  • greaterThanOrEquals (dict) --

    Performs a greater or equals 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.

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: dateValue, longValue, stringListValue, stringValue.

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

      • longValue (integer) --

        A long integer value.

      • stringListValue (list) --

        A list of strings.

        • (string) --

      • stringValue (string) --

        A string.

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

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: dateValue, longValue, stringListValue, stringValue.

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

      • longValue (integer) --

        A long integer value.

      • stringListValue (list) --

        A list of strings.

        • (string) --

      • stringValue (string) --

        A string.

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

      Note

      This is a Tagged Union structure. Only one of the following top level keys can be set: dateValue, longValue, stringListValue, stringValue.

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

      • longValue (integer) --

        A long integer value.

      • stringListValue (list) --

        A list of strings.

        • (string) --

      • stringValue (string) --

        A string.

  • notFilter (dict) --

    Performs a logical NOT operation on all supplied filters.

  • orAllFilters (list) --

    Performs a logical OR operation on all supplied filters.

    • (dict) --

      Enables filtering of responses based on document attributes or metadata fields.

type chatMode

string

param chatMode

The chat modes available in an Amazon Q Business web experience.

  • RETRIEVAL_MODE - The default chat mode for an Amazon Q Business application. When this mode is enabled, Amazon Q Business generates responses only from data sources connected to an Amazon Q Business application.

  • CREATOR_MODE - By selecting this mode, users can choose to generate responses only from the LLM knowledge, without consulting connected data sources, for a chat request.

  • PLUGIN_MODE - By selecting this mode, users can choose to use plugins in chat.

For more information, see Admin controls and guardrails, Plugins, and Conversation settings.

type chatModeConfiguration

dict

param chatModeConfiguration

The chat mode configuration for an Amazon Q Business application.

Note

This is a Tagged Union structure. Only one of the following top level keys can be set: pluginConfiguration.

  • pluginConfiguration (dict) --

    Configuration information required to invoke chat in PLUGIN_MODE .

    • pluginId (string) -- [REQUIRED]

      The identifier of the plugin you want to use.

type clientToken

string

param clientToken

A token that you provide to identify a chat request.

This field is autopopulated if not provided.

type conversationId

string

param conversationId

The identifier of the Amazon Q Business conversation.

type parentMessageId

string

param parentMessageId

The identifier of the previous end user text input message in a conversation.

type userGroups

list

param userGroups

The groups that a user associated with the chat input belongs to.

  • (string) --

type userId

string

param userId

The identifier of the user attached to the chat input.

type userMessage

string

param userMessage

A end user message in a conversation.

rtype

dict

returns

Response Syntax

{
    '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'
    },
    'conversationId': 'string',
    'failedAttachments': [
        {
            'error': {
                'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound',
                'errorMessage': 'string'
            },
            'name': 'string',
            'status': 'FAILED'|'SUCCEEDED'
        },
    ],
    'sourceAttributions': [
        {
            'citationNumber': 123,
            'snippet': 'string',
            'textMessageSegments': [
                {
                    'beginOffset': 123,
                    'endOffset': 123
                },
            ],
            'title': 'string',
            'updatedAt': datetime(2015, 1, 1),
            'url': 'string'
        },
    ],
    'systemMessage': 'string',
    'systemMessageId': 'string',
    'userMessageId': 'string'
}

Response Structure

  • (dict) --

    • actionReview (dict) --

      A request from Amazon Q Business to the end user for information Amazon Q Business needs to successfully complete a requested plugin action.

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

            • 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 (:ref:`document<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.

    • conversationId (string) --

      The identifier of the Amazon Q Business conversation.

    • failedAttachments (list) --

      A list of files which failed to upload during 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.

    • sourceAttributions (list) --

      The source documents used to generate the conversation response.

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

    • systemMessage (string) --

      An AI-generated message in a conversation.

    • systemMessageId (string) --

      The identifier of an Amazon Q Business AI generated message within the conversation.

    • userMessageId (string) --

      The identifier of an Amazon Q Business end user text input message within the conversation.

CreateApplication (updated) Link ¶
Changes (request)
{'identityCenterInstanceArn': 'string'}

Creates an Amazon Q Business application.

See also: AWS API Documentation

Request Syntax

client.create_application(
    attachmentsConfiguration={
        'attachmentsControlMode': 'ENABLED'|'DISABLED'
    },
    clientToken='string',
    description='string',
    displayName='string',
    encryptionConfiguration={
        'kmsKeyId': 'string'
    },
    identityCenterInstanceArn='string',
    roleArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type attachmentsConfiguration

dict

param attachmentsConfiguration

An option to allow end users to upload files directly during chat.

  • attachmentsControlMode (string) -- [REQUIRED]

    Status information about whether file upload functionality is activated or deactivated for your end user.

type clientToken

string

param clientToken

A token that you provide to identify the request to create your Amazon Q Business application.

This field is autopopulated if not provided.

type description

string

param description

A description for the Amazon Q Business application.

type displayName

string

param displayName

[REQUIRED]

A name for the Amazon Q Business application.

type encryptionConfiguration

dict

param encryptionConfiguration

The identifier of the KMS key that is used to encrypt your data. Amazon Q Business doesn't support asymmetric keys.

  • kmsKeyId (string) --

    The identifier of the KMS key. Amazon Q Business doesn't support asymmetric keys.

type identityCenterInstanceArn

string

param identityCenterInstanceArn

The Amazon Resource Name (ARN) of the IAM Identity Center instance you are either creating for—or connecting to—your Amazon Q Business application.

type roleArn

string

param roleArn

[REQUIRED]

The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon CloudWatch logs and metrics.

type tags

list

param tags

A list of key-value pairs that identify or categorize your Amazon Q Business application. You can also use tags to help control access to the application. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

  • (dict) --

    A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

    • key (string) -- [REQUIRED]

      The key for the tag. Keys are not case sensitive and must be unique for the Amazon Q Business application or data source.

    • value (string) -- [REQUIRED]

      The value associated with the tag. The value may be an empty string but it can't be null.

rtype

dict

returns

Response Syntax

{
    'applicationArn': 'string',
    'applicationId': 'string'
}

Response Structure

  • (dict) --

    • applicationArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Q Business application.

    • applicationId (string) --

      The identifier of the Amazon Q Business application.

CreateWebExperience (updated) Link ¶
Changes (request)
{'roleArn': 'string'}

Creates an Amazon Q Business web experience.

See also: AWS API Documentation

Request Syntax

client.create_web_experience(
    applicationId='string',
    clientToken='string',
    roleArn='string',
    samplePromptsControlMode='ENABLED'|'DISABLED',
    subtitle='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    title='string',
    welcomeMessage='string'
)
type applicationId

string

param applicationId

[REQUIRED]

The identifier of the Amazon Q Business web experience.

type clientToken

string

param clientToken

A token you provide to identify a request to create an Amazon Q Business web experience.

This field is autopopulated if not provided.

type roleArn

string

param roleArn

The Amazon Resource Name (ARN) of the service role attached to your web experience.

type samplePromptsControlMode

string

param samplePromptsControlMode

Determines whether sample prompts are enabled in the web experience for an end user.

type subtitle

string

param subtitle

A subtitle to personalize your Amazon Q Business web experience.

type tags

list

param tags

A list of key-value pairs that identify or categorize your Amazon Q Business web experience. You can also use tags to help control access to the web experience. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

  • (dict) --

    A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.

    • key (string) -- [REQUIRED]

      The key for the tag. Keys are not case sensitive and must be unique for the Amazon Q Business application or data source.

    • value (string) -- [REQUIRED]

      The value associated with the tag. The value may be an empty string but it can't be null.

type title

string

param title

The title for your Amazon Q Business web experience.

type welcomeMessage

string

param welcomeMessage

The customized welcome message for end users of an Amazon Q Business web experience.

rtype

dict

returns

Response Syntax

{
    'webExperienceArn': 'string',
    'webExperienceId': 'string'
}

Response Structure

  • (dict) --

    • webExperienceArn (string) --

      The Amazon Resource Name (ARN) of an Amazon Q Business web experience.

    • webExperienceId (string) --

      The identifier of the Amazon Q Business web experience.

GetApplication (updated) Link ¶
Changes (response)
{'identityCenterApplicationArn': 'string'}

Gets information about an existing Amazon Q Business application.

See also: AWS API Documentation

Request Syntax

client.get_application(
    applicationId='string'
)
type applicationId

string

param applicationId

[REQUIRED]

The identifier of the Amazon Q Business application.

rtype

dict

returns

Response Syntax

{
    'applicationArn': 'string',
    'applicationId': 'string',
    'attachmentsConfiguration': {
        'attachmentsControlMode': 'ENABLED'|'DISABLED'
    },
    'createdAt': datetime(2015, 1, 1),
    'description': 'string',
    'displayName': 'string',
    'encryptionConfiguration': {
        'kmsKeyId': 'string'
    },
    'error': {
        'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound',
        'errorMessage': 'string'
    },
    'identityCenterApplicationArn': 'string',
    'roleArn': 'string',
    'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING',
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • applicationArn (string) --

      The Amazon Resource Name (ARN) of the Amazon Q Business application.

    • applicationId (string) --

      The identifier of the Amazon Q Business application.

    • attachmentsConfiguration (dict) --

      Settings for whether end users can upload files directly during chat.

      • attachmentsControlMode (string) --

        Information about whether file upload during chat functionality is activated for your application.

    • createdAt (datetime) --

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

    • description (string) --

      A description for the Amazon Q Business application.

    • displayName (string) --

      The name of the Amazon Q Business application.

    • encryptionConfiguration (dict) --

      The identifier of the Amazon Web Services KMS key that is used to encrypt your data. Amazon Q Business doesn't support asymmetric keys.

      • kmsKeyId (string) --

        The identifier of the KMS key. Amazon Q Business doesn't support asymmetric keys.

    • error (dict) --

      If the Status field is set to ERROR , the ErrorMessage field contains a description of the error that caused the synchronization to fail.

      • errorCode (string) --

        The code associated with the data source sync error.

      • errorMessage (string) --

        The message explaining the data source sync error.

    • identityCenterApplicationArn (string) --

      The Amazon Resource Name (ARN) of the AWS IAM Identity Center instance attached to your Amazon Q Business application.

    • roleArn (string) --

      The Amazon Resource Name (ARN) of the IAM with permissions to access your CloudWatch logs and metrics.

    • status (string) --

      The status of the Amazon Q Business application.

    • updatedAt (datetime) --

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

GetChatControlsConfiguration (updated) Link ¶
Changes (response)
{'creatorModeConfiguration': {'creatorModeControl': 'ENABLED | DISABLED'}}

Gets information about an chat controls configured for an existing Amazon Q Business application.

See also: AWS API Documentation

Request Syntax

client.get_chat_controls_configuration(
    applicationId='string',
    maxResults=123,
    nextToken='string'
)
type applicationId

string

param applicationId

[REQUIRED]

The identifier of the application for which the chat controls are configured.

type maxResults

integer

param maxResults

The maximum number of configured chat controls to return.

type nextToken

string

param nextToken

If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q Business chat controls configured.

rtype

dict

returns

Response Syntax

{
    'blockedPhrases': {
        'blockedPhrases': [
            'string',
        ],
        'systemMessageOverride': 'string'
    },
    'creatorModeConfiguration': {
        'creatorModeControl': 'ENABLED'|'DISABLED'
    },
    'nextToken': 'string',
    'responseScope': 'ENTERPRISE_CONTENT_ONLY'|'EXTENDED_KNOWLEDGE_ENABLED',
    'topicConfigurations': [
        {
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'name': 'string',
            'rules': [
                {
                    'excludedUsersAndGroups': {
                        'userGroups': [
                            'string',
                        ],
                        'userIds': [
                            'string',
                        ]
                    },
                    'includedUsersAndGroups': {
                        'userGroups': [
                            'string',
                        ],
                        'userIds': [
                            'string',
                        ]
                    },
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'dataSourceId': 'string',
                                    'indexId': 'string'
                                },
                            ]
                        }
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • blockedPhrases (dict) --

      The phrases blocked from chat by your chat control configuration.

      • blockedPhrases (list) --

        A list of phrases blocked from a Amazon Q Business web experience chat.

        • (string) --

      • systemMessageOverride (string) --

        The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.

    • creatorModeConfiguration (dict) --

      The configuration details for CREATOR_MODE .

      • creatorModeControl (string) --

        Information about whether creator mode is enabled or disabled for an Amazon Q Business application.

    • nextToken (string) --

      If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q Business chat controls configured.

    • responseScope (string) --

      The response scope configured for a Amazon Q Business application. This determines whether your application uses its retrieval augmented generation (RAG) system to generate answers only from your enterprise data, or also uses the large language models (LLM) knowledge to respons to end user questions in chat.

    • topicConfigurations (list) --

      The topic specific controls configured for a Amazon Q Business application.

      • (dict) --

        The topic specific controls configured for an Amazon Q Business application.

        • description (string) --

          A description for your topic control configuration. Use this to outline how the large language model (LLM) should use this topic control configuration.

        • exampleChatMessages (list) --

          A list of example phrases that you expect the end user to use in relation to the topic.

          • (string) --

        • name (string) --

          A name for your topic control configuration.

        • rules (list) --

          Rules defined for a topic configuration.

          • (dict) --

            Guardrail rules for an Amazon Q Business application. Amazon Q Business supports only one rule at a time.

            • excludedUsersAndGroups (dict) --

              Users and groups to be excluded from a rule.

              • userGroups (list) --

                The user groups associated with a topic control rule.

                • (string) --

              • userIds (list) --

                The user ids associated with a topic control rule.

                • (string) --

            • includedUsersAndGroups (dict) --

              Users and groups to be included in a rule.

              • userGroups (list) --

                The user groups associated with a topic control rule.

                • (string) --

              • userIds (list) --

                The user ids associated with a topic control rule.

                • (string) --

            • ruleConfiguration (dict) --

              The configuration information for a rule.

              Note

              This is a Tagged Union structure. Only one of the following top level keys will be set: contentBlockerRule, contentRetrievalRule. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

              'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
              • contentBlockerRule (dict) --

                A rule for configuring how Amazon Q Business responds when it encounters a a blocked topic.

                • systemMessageOverride (string) --

                  The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.

              • contentRetrievalRule (dict) --

                Rules for retrieving content from data sources connected to a Amazon Q Business application for a specific topic control configuration.

                • eligibleDataSources (list) --

                  Specifies data sources in a Amazon Q Business application to use for content generation.

                  • (dict) --

                    The identifier of the data source Amazon Q Business will generate responses from.

                    • dataSourceId (string) --

                      The identifier of the data source.

                    • indexId (string) --

                      The identifier of the index the data source is attached to.

            • ruleType (string) --

              The type of rule.

GetWebExperience (updated) Link ¶
Changes (response)
{'roleArn': 'string'}

Gets information about an existing Amazon Q Business web experience.

See also: AWS API Documentation

Request Syntax

client.get_web_experience(
    applicationId='string',
    webExperienceId='string'
)
type applicationId

string

param applicationId

[REQUIRED]

The identifier of the Amazon Q Business application linked to the web experience.

type webExperienceId

string

param webExperienceId

[REQUIRED]

The identifier of the Amazon Q Business web experience.

rtype

dict

returns

Response Syntax

{
    'applicationId': 'string',
    'authenticationConfiguration': {
        'samlConfiguration': {
            'metadataXML': 'string',
            'roleArn': 'string',
            'userGroupAttribute': 'string',
            'userIdAttribute': 'string'
        }
    },
    'createdAt': datetime(2015, 1, 1),
    'defaultEndpoint': 'string',
    'error': {
        'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound',
        'errorMessage': 'string'
    },
    'roleArn': 'string',
    'samplePromptsControlMode': 'ENABLED'|'DISABLED',
    'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'PENDING_AUTH_CONFIG',
    'subtitle': 'string',
    'title': 'string',
    'updatedAt': datetime(2015, 1, 1),
    'webExperienceArn': 'string',
    'webExperienceId': 'string',
    'welcomeMessage': 'string'
}

Response Structure

  • (dict) --

    • applicationId (string) --

      The identifier of the Amazon Q Business application linked to the web experience.

    • authenticationConfiguration (dict) --

      The authentication configuration information for your Amazon Q Business web experience.

      Note

      This is a Tagged Union structure. Only one of the following top level keys will be set: samlConfiguration. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

      'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
      • samlConfiguration (dict) --

        Provides the SAML 2.0 compliant identity provider (IdP) configuration information Amazon Q Business needs to deploy a Amazon Q Business web experience.

        • metadataXML (string) --

          The metadata XML that your IdP generated.

        • roleArn (string) --

          The Amazon Resource Name (ARN) of an IAM role assumed by users when they authenticate into their Amazon Q Business web experience, containing the relevant Amazon Q Business permissions for conversing with Amazon Q Business.

        • userGroupAttribute (string) --

          The group attribute name in your IdP that maps to user groups.

        • userIdAttribute (string) --

          The user attribute name in your IdP that maps to the user email.

    • createdAt (datetime) --

      The Unix timestamp when the retriever was created.

    • defaultEndpoint (string) --

      The endpoint of your Amazon Q Business web experience.

    • error (dict) --

      When the Status field value is FAILED , the ErrorMessage field contains a description of the error that caused the data source connector to fail.

      • errorCode (string) --

        The code associated with the data source sync error.

      • errorMessage (string) --

        The message explaining the data source sync error.

    • roleArn (string) --

      The Amazon Resource Name (ARN) of the service role attached to your web experience.

    • samplePromptsControlMode (string) --

      Determines whether sample prompts are enabled in the web experience for an end user.

    • status (string) --

      The current status of the Amazon Q Business web experience. When the Status field value is FAILED , the ErrorMessage field contains a description of the error that caused the data source connector to fail.

    • subtitle (string) --

      The subtitle for your Amazon Q Business web experience.

    • title (string) --

      The title for your Amazon Q Business web experience.

    • updatedAt (datetime) --

      The Unix timestamp when the data source connector was last updated.

    • webExperienceArn (string) --

      The Amazon Resource Name (ARN) of the role with the permission to access the Amazon Q Business web experience and required resources.

    • webExperienceId (string) --

      The identifier of the Amazon Q Business web experience.

    • welcomeMessage (string) --

      The customized welcome message for end users of an Amazon Q Business web experience.

UpdateChatControlsConfiguration (updated) Link ¶
Changes (request)
{'creatorModeConfiguration': {'creatorModeControl': 'ENABLED | DISABLED'}}

Updates an set of chat controls configured for an existing Amazon Q Business application.

See also: AWS API Documentation

Request Syntax

client.update_chat_controls_configuration(
    applicationId='string',
    blockedPhrasesConfigurationUpdate={
        'blockedPhrasesToCreateOrUpdate': [
            'string',
        ],
        'blockedPhrasesToDelete': [
            'string',
        ],
        'systemMessageOverride': 'string'
    },
    clientToken='string',
    creatorModeConfiguration={
        'creatorModeControl': 'ENABLED'|'DISABLED'
    },
    responseScope='ENTERPRISE_CONTENT_ONLY'|'EXTENDED_KNOWLEDGE_ENABLED',
    topicConfigurationsToCreateOrUpdate=[
        {
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'name': 'string',
            'rules': [
                {
                    'excludedUsersAndGroups': {
                        'userGroups': [
                            'string',
                        ],
                        'userIds': [
                            'string',
                        ]
                    },
                    'includedUsersAndGroups': {
                        'userGroups': [
                            'string',
                        ],
                        'userIds': [
                            'string',
                        ]
                    },
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'dataSourceId': 'string',
                                    'indexId': 'string'
                                },
                            ]
                        }
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE'
                },
            ]
        },
    ],
    topicConfigurationsToDelete=[
        {
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'name': 'string',
            'rules': [
                {
                    'excludedUsersAndGroups': {
                        'userGroups': [
                            'string',
                        ],
                        'userIds': [
                            'string',
                        ]
                    },
                    'includedUsersAndGroups': {
                        'userGroups': [
                            'string',
                        ],
                        'userIds': [
                            'string',
                        ]
                    },
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'dataSourceId': 'string',
                                    'indexId': 'string'
                                },
                            ]
                        }
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE'
                },
            ]
        },
    ]
)
type applicationId

string

param applicationId

[REQUIRED]

The identifier of the application for which the chat controls are configured.

type blockedPhrasesConfigurationUpdate

dict

param blockedPhrasesConfigurationUpdate

The phrases blocked from chat by your chat control configuration.

  • blockedPhrasesToCreateOrUpdate (list) --

    Creates or updates a blocked phrases configuration in your Amazon Q Business application.

    • (string) --

  • blockedPhrasesToDelete (list) --

    Deletes a blocked phrases configuration in your Amazon Q Business application.

    • (string) --

  • systemMessageOverride (string) --

    The configured custom message displayed to your end user when they use blocked phrase during chat.

type clientToken

string

param clientToken

A token that you provide to identify the request to update a Amazon Q Business application chat configuration.

This field is autopopulated if not provided.

type creatorModeConfiguration

dict

param creatorModeConfiguration

The configuration details for CREATOR_MODE .

  • creatorModeControl (string) -- [REQUIRED]

    Status information about whether CREATOR_MODE has been enabled or disabled. The default status is DISABLED .

type responseScope

string

param responseScope

The response scope configured for your application. This determines whether your application uses its retrieval augmented generation (RAG) system to generate answers only from your enterprise data, or also uses the large language models (LLM) knowledge to respons to end user questions in chat.

type topicConfigurationsToCreateOrUpdate

list

param topicConfigurationsToCreateOrUpdate

The configured topic specific chat controls you want to update.

  • (dict) --

    The topic specific controls configured for an Amazon Q Business application.

    • description (string) --

      A description for your topic control configuration. Use this to outline how the large language model (LLM) should use this topic control configuration.

    • exampleChatMessages (list) --

      A list of example phrases that you expect the end user to use in relation to the topic.

      • (string) --

    • name (string) -- [REQUIRED]

      A name for your topic control configuration.

    • rules (list) -- [REQUIRED]

      Rules defined for a topic configuration.

      • (dict) --

        Guardrail rules for an Amazon Q Business application. Amazon Q Business supports only one rule at a time.

        • excludedUsersAndGroups (dict) --

          Users and groups to be excluded from a rule.

          • userGroups (list) --

            The user groups associated with a topic control rule.

            • (string) --

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

        • includedUsersAndGroups (dict) --

          Users and groups to be included in a rule.

          • userGroups (list) --

            The user groups associated with a topic control rule.

            • (string) --

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

        • ruleConfiguration (dict) --

          The configuration information for a rule.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: contentBlockerRule, contentRetrievalRule.

          • contentBlockerRule (dict) --

            A rule for configuring how Amazon Q Business responds when it encounters a a blocked topic.

            • systemMessageOverride (string) --

              The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.

          • contentRetrievalRule (dict) --

            Rules for retrieving content from data sources connected to a Amazon Q Business application for a specific topic control configuration.

            • eligibleDataSources (list) --

              Specifies data sources in a Amazon Q Business application to use for content generation.

              • (dict) --

                The identifier of the data source Amazon Q Business will generate responses from.

                • dataSourceId (string) --

                  The identifier of the data source.

                • indexId (string) --

                  The identifier of the index the data source is attached to.

        • ruleType (string) -- [REQUIRED]

          The type of rule.

type topicConfigurationsToDelete

list

param topicConfigurationsToDelete

The configured topic specific chat controls you want to delete.

  • (dict) --

    The topic specific controls configured for an Amazon Q Business application.

    • description (string) --

      A description for your topic control configuration. Use this to outline how the large language model (LLM) should use this topic control configuration.

    • exampleChatMessages (list) --

      A list of example phrases that you expect the end user to use in relation to the topic.

      • (string) --

    • name (string) -- [REQUIRED]

      A name for your topic control configuration.

    • rules (list) -- [REQUIRED]

      Rules defined for a topic configuration.

      • (dict) --

        Guardrail rules for an Amazon Q Business application. Amazon Q Business supports only one rule at a time.

        • excludedUsersAndGroups (dict) --

          Users and groups to be excluded from a rule.

          • userGroups (list) --

            The user groups associated with a topic control rule.

            • (string) --

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

        • includedUsersAndGroups (dict) --

          Users and groups to be included in a rule.

          • userGroups (list) --

            The user groups associated with a topic control rule.

            • (string) --

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

        • ruleConfiguration (dict) --

          The configuration information for a rule.

          Note

          This is a Tagged Union structure. Only one of the following top level keys can be set: contentBlockerRule, contentRetrievalRule.

          • contentBlockerRule (dict) --

            A rule for configuring how Amazon Q Business responds when it encounters a a blocked topic.

            • systemMessageOverride (string) --

              The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.

          • contentRetrievalRule (dict) --

            Rules for retrieving content from data sources connected to a Amazon Q Business application for a specific topic control configuration.

            • eligibleDataSources (list) --

              Specifies data sources in a Amazon Q Business application to use for content generation.

              • (dict) --

                The identifier of the data source Amazon Q Business will generate responses from.

                • dataSourceId (string) --

                  The identifier of the data source.

                • indexId (string) --

                  The identifier of the index the data source is attached to.

        • ruleType (string) -- [REQUIRED]

          The type of rule.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --