2024/12/02 - QBusiness - 2 new10 updated api methods
Changes Amazon Q Business now supports capabilities to extract insights and answer questions from visual elements embedded within documents, a browser extension for Google Chrome, Mozilla Firefox, and Microsoft Edge, and attachments across conversations.
Gets a list of attachments associated with an Amazon Q Business web experience or a list of attachements associated with a specific Amazon Q Business conversation.
See also: AWS API Documentation
Request Syntax
client.list_attachments( applicationId='string', conversationId='string', userId='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The unique identifier for the Amazon Q Business application.
string
The unique identifier of the Amazon Q Business web experience conversation.
string
The unique identifier of the user involved in the Amazon Q Business web experience conversation.
string
If the number of attachments returned exceeds maxResults, Amazon Q Business returns a next token as a pagination token to retrieve the next set of attachments.
integer
The maximum number of attachements to return.
dict
Response Syntax
{ 'attachments': [ { 'attachmentId': 'string', 'conversationId': 'string', 'name': 'string', 'copyFrom': { 'conversation': { 'conversationId': 'string', 'attachmentId': 'string' } }, 'fileType': 'string', 'fileSize': 123, 'md5chksum': 'string', 'createdAt': datetime(2015, 1, 1), 'status': 'FAILED'|'SUCCESS', 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
attachments (list) --
An array of information on one or more attachments.
(dict) --
An attachment in an Amazon Q Business conversation.
attachmentId (string) --
The identifier of the Amazon Q Business attachment.
conversationId (string) --
The identifier of the Amazon Q Business conversation the attachment is associated with.
name (string) --
Filename of the Amazon Q Business attachment.
copyFrom (dict) --
A CopyFromSource containing a reference to the original source of the Amazon Q Business attachment.
conversation (dict) --
A reference to an attachment in an existing conversation.
conversationId (string) --
The unique identifier of the Amazon Q Business conversation.
attachmentId (string) --
The unique identifier of the Amazon Q Business attachment.
fileType (string) --
Filetype of the Amazon Q Business attachment.
fileSize (integer) --
Size in bytes of the Amazon Q Business attachment.
md5chksum (string) --
MD5 checksum of the Amazon Q Business attachment contents.
createdAt (datetime) --
The Unix timestamp when the Amazon Q Business attachment was created.
status (string) --
AttachmentStatus of the Amazon Q Business attachment.
error (dict) --
ErrorDetail providing information about a Amazon Q Business attachment error.
errorMessage (string) --
The message explaining the Amazon Q Business request error.
errorCode (string) --
The code associated with the Amazon Q Business request error.
nextToken (string) --
If the response is truncated, Amazon Q Business returns this token, which you can use in a later request to list the next set of attachments.
Returns the image bytes corresponding to a media object. If you have implemented your own application with the Chat and ChatSync APIs, and have enabled content extraction from visual data in Amazon Q Business, you use the GetMedia API operation to download the images so you can show them in your UI with responses.
For more information, see Extracting semantic meaning from images and visuals.
See also: AWS API Documentation
Request Syntax
client.get_media( applicationId='string', conversationId='string', messageId='string', mediaId='string' )
string
[REQUIRED]
The identifier of the Amazon Q Business which contains the media object.
string
[REQUIRED]
The identifier of the Amazon Q Business conversation.
string
[REQUIRED]
The identifier of the Amazon Q Business message.
string
[REQUIRED]
The identifier of the media object. You can find this in the sourceAttributions returned by the Chat, ChatSync, and ListMessages API responses.
dict
Response Syntax
{ 'mediaBytes': b'bytes', 'mediaMimeType': 'string' }
Response Structure
(dict) --
mediaBytes (bytes) --
The base64-encoded bytes of the media object.
mediaMimeType (string) --
The MIME type of the media object (image/png).
{'documents': {'mediaExtractionConfiguration': {'imageExtractionConfiguration': {'imageExtractionStatus': 'ENABLED ' '| ' 'DISABLED'}}}}
Adds one or more documents to an Amazon Q Business index.
You use this API to:
ingest your structured and unstructured documents and documents stored in an Amazon S3 bucket into an Amazon Q Business index.
add custom attributes to documents in an Amazon Q Business index.
attach an access control list to the documents added to an Amazon Q Business index.
You can see the progress of the deletion, and any error messages related to the process, by using CloudWatch.
See also: AWS API Documentation
Request Syntax
client.batch_put_document( applicationId='string', indexId='string', documents=[ { 'id': 'string', 'attributes': [ { 'name': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, ], 'content': { 'blob': b'bytes', 's3': { 'bucket': 'string', 'key': 'string' } }, 'contentType': 'PDF'|'HTML'|'MS_WORD'|'PLAIN_TEXT'|'PPT'|'RTF'|'XML'|'XSLT'|'MS_EXCEL'|'CSV'|'JSON'|'MD', 'title': 'string', 'accessConfiguration': { 'accessControls': [ { 'principals': [ { 'user': { 'id': 'string', 'access': 'ALLOW'|'DENY', 'membershipType': 'INDEX'|'DATASOURCE' }, 'group': { 'name': 'string', 'access': 'ALLOW'|'DENY', 'membershipType': 'INDEX'|'DATASOURCE' } }, ], 'memberRelation': 'AND'|'OR' }, ], 'memberRelation': 'AND'|'OR' }, 'documentEnrichmentConfiguration': { 'inlineConfigurations': [ { 'condition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'target': { 'key': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) }, 'attributeValueOperator': 'DELETE' }, 'documentContentOperator': 'DELETE' }, ], 'preExtractionHookConfiguration': { 'invocationCondition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lambdaArn': 'string', 's3BucketName': 'string', 'roleArn': 'string' }, 'postExtractionHookConfiguration': { 'invocationCondition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lambdaArn': 'string', 's3BucketName': 'string', 'roleArn': 'string' } }, 'mediaExtractionConfiguration': { 'imageExtractionConfiguration': { 'imageExtractionStatus': 'ENABLED'|'DISABLED' } } }, ], roleArn='string', dataSourceSyncId='string' )
string
[REQUIRED]
The identifier of the Amazon Q Business application.
string
[REQUIRED]
The identifier of the Amazon Q Business index to add the documents to.
list
[REQUIRED]
One or more documents to add to the index.
(dict) --
A document in an Amazon Q Business application.
id (string) -- [REQUIRED]
The identifier of the document.
attributes (list) --
Custom attributes to apply to the document for refining Amazon Q Business web experience responses.
(dict) --
A document attribute or metadata field.
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.
content (dict) --
The contents of the document.
blob (bytes) --
The contents of the document. Documents passed to the blob parameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an Amazon Web Services SDK to call Amazon Q Business APIs. If you are calling the Amazon Q Business endpoint directly using REST, you must base64 encode the contents before sending.
s3 (dict) --
The path to the document in an Amazon S3 bucket.
bucket (string) -- [REQUIRED]
The name of the S3 bucket that contains the file.
key (string) -- [REQUIRED]
The name of the file.
contentType (string) --
The file type of the document in the Blob field.
If you want to index snippets or subsets of HTML documents instead of the entirety of the HTML documents, you add the HTML start and closing tags ( <HTML>content</HTML>) around the content.
title (string) --
The title of the document.
accessConfiguration (dict) --
Configuration information for access permission to a document.
accessControls (list) -- [REQUIRED]
A list of AccessControlList objects.
(dict) --
A list of principals. Each principal can be either a USER or a GROUP and can be designated document access permissions of either ALLOW or DENY.
principals (list) -- [REQUIRED]
Contains a list of principals, where a principal can be either a USER or a GROUP. Each principal can be have the following type of document access: ALLOW or DENY.
(dict) --
Provides user and group information used for filtering documents to use for generating Amazon Q Business conversation responses.
user (dict) --
The user associated with the principal.
id (string) --
The identifier of the user.
access (string) -- [REQUIRED]
Provides information about whether to allow or deny access to the principal.
membershipType (string) --
The type of group.
group (dict) --
The group associated with the principal.
name (string) --
The name of the group.
access (string) -- [REQUIRED]
Provides information about whether to allow or deny access to the principal.
membershipType (string) --
The type of group.
memberRelation (string) --
Describes the member relation within a principal list.
memberRelation (string) --
Describes the member relation within the AccessControlList object.
documentEnrichmentConfiguration (dict) --
The configuration information for altering document metadata and content during the document ingestion process.
inlineConfigurations (list) --
Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Q Business.
(dict) --
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q Business.
To apply advanced logic, to go beyond what you can do with basic logic, see HookConfiguration.
For more information, see Custom document enrichment.
condition (dict) --
The condition used for the target document attribute or metadata field when ingesting documents into Amazon Q Business. You use this with DocumentAttributeTarget to apply the condition.
For example, you can create the 'Department' target field and have it prefill department names associated with the documents based on information in the 'Source_URI' field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI value, then prefill the target field 'Department' with the target value 'Finance' for the document.
Amazon Q Business can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q Business then will map your newly created metadata field to your index field.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
target (dict) --
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q Business.
For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called 'Customer_ID' by setting the target key as 'Customer_ID' and the deletion flag to TRUE. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally identifiable information from each document's metadata.
Amazon Q Business can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q Business will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition.
key (string) -- [REQUIRED]
The identifier of the target document attribute or metadata field. For example, 'Department' could be an identifier for the target attribute or metadata field that includes the department names associated with the documents.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
attributeValueOperator (string) --
TRUE to delete the existing target value for your specified target attribute key. You cannot create a target value and set this to TRUE.
documentContentOperator (string) --
TRUE to delete content if the condition used for the target attribute is met.
preExtractionHookConfiguration (dict) --
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
invocationCondition (dict) --
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
lambdaArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE).
s3BucketName (string) --
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
roleArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.
postExtractionHookConfiguration (dict) --
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
invocationCondition (dict) --
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
lambdaArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE).
s3BucketName (string) --
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
roleArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.
mediaExtractionConfiguration (dict) --
The configuration for extracting information from media in the document.
imageExtractionConfiguration (dict) --
The configuration for extracting semantic meaning from images in documents. For more information, see Extracting semantic meaning from images and visuals.
imageExtractionStatus (string) -- [REQUIRED]
Specify whether to extract semantic meaning from images and visuals from documents.
string
The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket.
string
The identifier of the data source sync during which the documents were added.
dict
Response Syntax
{ 'failedDocuments': [ { 'id': 'string', 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' }, 'dataSourceId': 'string' }, ] }
Response Structure
(dict) --
failedDocuments (list) --
A list of documents that were not added to the Amazon Q Business index because the document failed a validation check. Each document contains an error message that indicates why the document couldn't be added to the index.
(dict) --
A list of documents that could not be removed from an Amazon Q Business index. Each entry contains an error message that indicates why the document couldn't be removed from the index.
id (string) --
The identifier of the document that couldn't be removed from the Amazon Q Business index.
error (dict) --
An explanation for why the document couldn't be removed from the index.
errorMessage (string) --
The message explaining the Amazon Q Business request error.
errorCode (string) --
The code associated with the Amazon Q Business request error.
dataSourceId (string) --
The identifier of the Amazon Q Business data source connector that contains the failed document.
{'inputStream': {'attachmentEvent': {'attachment': {'copyFrom': {'conversation': {'attachmentId': 'string', 'conversationId': 'string'}}}}}}Response
{'outputStream': {'failedAttachmentEvent': {'attachment': {'attachmentId': 'string', 'conversationId': 'string', 'status': {'SUCCESS'}}}, 'metadataEvent': {'sourceAttributions': {'textMessageSegments': {'mediaId': 'string', 'mediaMimeType': 'string'}}}}}
Starts or continues a streaming Amazon Q Business conversation.
See also: AWS API Documentation
Request Syntax
client.chat( applicationId='string', userId='string', userGroups=[ 'string', ], conversationId='string', parentMessageId='string', clientToken='string', inputStream={...} )
string
[REQUIRED]
The identifier of the Amazon Q Business application linked to a streaming Amazon Q Business conversation.
string
The identifier of the user attached to the chat input.
list
The group names that a user associated with the chat input belongs to.
(string) --
string
The identifier of the Amazon Q Business conversation.
string
The identifier used to associate a user message with a AI generated response.
string
A token that you provide to identify the chat input.
This field is autopopulated if not provided.
dict
The streaming input for the Chat API.
dict
The response of this operation contains an :class:`.EventStream` member. When iterated the :class:`.EventStream` will yield events based on the structure below, where only one of the top level keys will be present for any given event.
Response Syntax
{ 'outputStream': EventStream({ 'textEvent': { 'conversationId': 'string', 'userMessageId': 'string', 'systemMessageId': 'string', 'systemMessage': 'string' }, 'metadataEvent': { 'conversationId': 'string', 'userMessageId': 'string', 'systemMessageId': 'string', 'sourceAttributions': [ { 'title': 'string', 'snippet': 'string', 'url': 'string', 'citationNumber': 123, 'updatedAt': datetime(2015, 1, 1), 'textMessageSegments': [ { 'beginOffset': 123, 'endOffset': 123, 'snippetExcerpt': { 'text': 'string' }, 'mediaId': 'string', 'mediaMimeType': 'string' }, ] }, ], 'finalTextMessage': 'string' }, 'actionReviewEvent': { 'conversationId': 'string', 'userMessageId': 'string', 'systemMessageId': 'string', 'pluginId': 'string', 'pluginType': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK'|'CUSTOM', 'payload': { 'string': { 'displayName': 'string', 'displayOrder': 123, 'displayDescription': 'string', 'type': 'STRING'|'NUMBER'|'ARRAY'|'BOOLEAN', 'value': {...}|[...]|123|123.4|'string'|True|None, 'allowedValues': [ { 'value': {...}|[...]|123|123.4|'string'|True|None, 'displayValue': {...}|[...]|123|123.4|'string'|True|None }, ], 'allowedFormat': 'string', 'arrayItemJsonSchema': {...}|[...]|123|123.4|'string'|True|None, 'required': True|False } }, 'payloadFieldNameSeparator': 'string' }, 'failedAttachmentEvent': { 'conversationId': 'string', 'userMessageId': 'string', 'systemMessageId': 'string', 'attachment': { 'name': 'string', 'status': 'FAILED'|'SUCCESS', 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' }, 'attachmentId': 'string', 'conversationId': 'string' } }, 'authChallengeRequestEvent': { 'authorizationUrl': 'string' } }) }
Response Structure
(dict) --
outputStream (:class:`.EventStream`) --
The streaming output for the Chat API.
textEvent (dict) --
Information about the payload of the ChatOutputStream event containing the AI-generated message output.
conversationId (string) --
The identifier of the conversation with which the text output event is associated.
userMessageId (string) --
The identifier of an end user message in a TextOutputEvent.
systemMessageId (string) --
The identifier of an AI-generated message in a TextOutputEvent.
systemMessage (string) --
An AI-generated message in a TextOutputEvent.
metadataEvent (dict) --
A metadata event for a AI-generated text output message in a Amazon Q Business conversation.
conversationId (string) --
The identifier of the conversation with which the generated metadata is associated.
userMessageId (string) --
The identifier of an Amazon Q Business end user text input message within the conversation.
systemMessageId (string) --
The identifier of an Amazon Q Business AI generated message within the conversation.
sourceAttributions (list) --
The source documents used to generate the conversation response.
(dict) --
The documents used to generate an Amazon Q Business web experience response.
title (string) --
The title of the document which is the source for the Amazon Q Business generated response.
snippet (string) --
The content extract from the document on which the generated response is based.
url (string) --
The URL of the document which is the source for the Amazon Q Business generated response.
citationNumber (integer) --
The number attached to a citation in an Amazon Q Business generated response.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q Business application was last updated.
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.
snippetExcerpt (dict) --
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.
text (string) --
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q chat response.
mediaId (string) --
The identifier of the media object associated with the text segment in the source attribution.
mediaMimeType (string) --
The MIME type (image/png) of the media object associated with the text segment in the source attribution.
finalTextMessage (string) --
The final text output message generated by the system.
actionReviewEvent (dict) --
A request from Amazon Q Business to the end user for information Amazon Q Business needs to successfully complete a requested plugin action.
conversationId (string) --
The identifier of the conversation with which the action review event is associated.
userMessageId (string) --
The identifier of the conversation with which the plugin action is associated.
systemMessageId (string) --
The identifier of an Amazon Q Business AI generated associated with the action review event.
pluginId (string) --
The identifier of the plugin associated with the action review event.
pluginType (string) --
The type of plugin.
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.
displayName (string) --
The name of the field.
displayOrder (integer) --
The display order of fields in a payload.
displayDescription (string) --
The field level description of each action review input field. This could be an explanation of the field. In the Amazon Q Business web experience, these descriptions could be used to display as tool tips to help users understand the field.
type (string) --
The type of field.
value (:ref:`document<document>`) --
The field value.
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.
value (:ref:`document<document>`) --
The field value.
displayValue (:ref:`document<document>`) --
The name of the field.
allowedFormat (string) --
The expected data format for the action review input field value. For example, in PTO request, from and to would be of datetime allowed format.
arrayItemJsonSchema (:ref:`document<document>`) --
Use to create a custom form with array fields (fields with nested objects inside an array).
required (boolean) --
Information about whether the field is required.
payloadFieldNameSeparator (string) --
A string used to retain information about the hierarchical contexts within an action review event payload.
failedAttachmentEvent (dict) --
A failed file upload event during a web experience chat.
conversationId (string) --
The identifier of the conversation associated with the failed file upload.
userMessageId (string) --
The identifier of the end user chat message associated with the file upload.
systemMessageId (string) --
The identifier of the AI-generated message associated with the file upload.
attachment (dict) --
The details of a file uploaded during chat.
name (string) --
The name of a file uploaded during chat.
status (string) --
The status of a file uploaded during chat.
error (dict) --
An error associated with a file uploaded during chat.
errorMessage (string) --
The message explaining the Amazon Q Business request error.
errorCode (string) --
The code associated with the Amazon Q Business request error.
attachmentId (string) --
The unique identifier of the Amazon Q Business attachment.
conversationId (string) --
The unique identifier of the Amazon Q Business conversation.
authChallengeRequestEvent (dict) --
An authentication verification event activated by an end user request to use a custom plugin.
authorizationUrl (string) --
The URL sent by Amazon Q Business to a third party authentication server in response to an authentication verification event activated by an end user request to use a custom plugin.
{'attachments': {'copyFrom': {'conversation': {'attachmentId': 'string', 'conversationId': 'string'}}}}Response
{'failedAttachments': {'attachmentId': 'string', 'conversationId': 'string', 'status': {'SUCCESS'}}, 'sourceAttributions': {'textMessageSegments': {'mediaId': 'string', 'mediaMimeType': 'string'}}}
Starts or continues a non-streaming Amazon Q Business conversation.
See also: AWS API Documentation
Request Syntax
client.chat_sync( applicationId='string', userId='string', userGroups=[ 'string', ], userMessage='string', attachments=[ { 'data': b'bytes', 'name': 'string', 'copyFrom': { 'conversation': { 'conversationId': 'string', 'attachmentId': 'string' } } }, ], actionExecution={ 'pluginId': 'string', 'payload': { 'string': { 'value': {...}|[...]|123|123.4|'string'|True|None } }, 'payloadFieldNameSeparator': 'string' }, authChallengeResponse={ 'responseMap': { 'string': 'string' } }, conversationId='string', parentMessageId='string', 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) } } }, chatMode='RETRIEVAL_MODE'|'CREATOR_MODE'|'PLUGIN_MODE', chatModeConfiguration={ 'pluginConfiguration': { 'pluginId': 'string' } }, clientToken='string' )
string
[REQUIRED]
The identifier of the Amazon Q Business application linked to the Amazon Q Business conversation.
string
The identifier of the user attached to the chat input.
list
The group names that a user associated with the chat input belongs to.
(string) --
string
A end user message in a conversation.
list
A list of files uploaded directly during chat. You can upload a maximum of 5 files of upto 10 MB each.
(dict) --
This is either a file directly uploaded into a web experience chat or a reference to an existing attachment that is part of a web experience chat.
data (bytes) --
The contents of the attachment.
name (string) --
The filename of the attachment.
copyFrom (dict) --
A reference to an existing attachment.
conversation (dict) --
A reference to an attachment in an existing conversation.
conversationId (string) -- [REQUIRED]
The unique identifier of the Amazon Q Business conversation.
attachmentId (string) -- [REQUIRED]
The unique identifier of the Amazon Q Business attachment.
dict
A request from an end user to perform an Amazon Q Business plugin action.
pluginId (string) -- [REQUIRED]
The identifier of the plugin the action is attached to.
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.
value (:ref:`document<document>`) -- [REQUIRED]
The content of 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.
dict
An authentication verification event response by a third party authentication server to Amazon Q Business.
responseMap (dict) -- [REQUIRED]
The mapping of key-value pairs in an authentication challenge response.
(string) --
(string) --
string
The identifier of the Amazon Q Business conversation.
string
The identifier of the previous system message in a conversation.
dict
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.
orAllFilters (list) --
Performs a logical OR operation on all supplied filters.
(dict) --
Enables filtering of 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 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.
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.
string
The chatMode parameter determines the chat modes available to Amazon Q Business users:
RETRIEVAL_MODE - If you choose this mode, Amazon Q generates responses solely from the data sources connected and indexed by the application. If an answer is not found in the data sources or there are no data sources available, Amazon Q will respond with a "No Answer Found" message, unless LLM knowledge has been enabled. In that case, Amazon Q will generate a response from the LLM knowledge
CREATOR_MODE - By selecting this mode, you can choose to generate responses only from the LLM knowledge. You can also attach files and have Amazon Q generate a response based on the data in those files. If the attached files do not contain an answer for the query, Amazon Q will automatically fall back to generating a response from the LLM knowledge.
PLUGIN_MODE - By selecting this mode, users can choose to use plugins in chat to get their responses.
For more information, see Admin controls and guardrails, Plugins, and Response sources.
dict
The chat mode configuration for an Amazon Q Business application.
pluginConfiguration (dict) --
Configuration information required to invoke chat in PLUGIN_MODE.
pluginId (string) -- [REQUIRED]
The identifier of the plugin you want to use.
string
A token that you provide to identify a chat request.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'conversationId': 'string', 'systemMessage': 'string', 'systemMessageId': 'string', 'userMessageId': 'string', 'actionReview': { 'pluginId': 'string', 'pluginType': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK'|'CUSTOM', 'payload': { 'string': { 'displayName': 'string', 'displayOrder': 123, 'displayDescription': 'string', 'type': 'STRING'|'NUMBER'|'ARRAY'|'BOOLEAN', 'value': {...}|[...]|123|123.4|'string'|True|None, 'allowedValues': [ { 'value': {...}|[...]|123|123.4|'string'|True|None, 'displayValue': {...}|[...]|123|123.4|'string'|True|None }, ], 'allowedFormat': 'string', 'arrayItemJsonSchema': {...}|[...]|123|123.4|'string'|True|None, 'required': True|False } }, 'payloadFieldNameSeparator': 'string' }, 'authChallengeRequest': { 'authorizationUrl': 'string' }, 'sourceAttributions': [ { 'title': 'string', 'snippet': 'string', 'url': 'string', 'citationNumber': 123, 'updatedAt': datetime(2015, 1, 1), 'textMessageSegments': [ { 'beginOffset': 123, 'endOffset': 123, 'snippetExcerpt': { 'text': 'string' }, 'mediaId': 'string', 'mediaMimeType': 'string' }, ] }, ], 'failedAttachments': [ { 'name': 'string', 'status': 'FAILED'|'SUCCESS', 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' }, 'attachmentId': 'string', 'conversationId': 'string' }, ] }
Response Structure
(dict) --
conversationId (string) --
The identifier of the Amazon Q Business conversation.
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.
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.
pluginId (string) --
The identifier of the plugin associated with the action review.
pluginType (string) --
The type of plugin.
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.
displayName (string) --
The name of the field.
displayOrder (integer) --
The display order of fields in a payload.
displayDescription (string) --
The field level description of each action review input field. This could be an explanation of the field. In the Amazon Q Business web experience, these descriptions could be used to display as tool tips to help users understand the field.
type (string) --
The type of field.
value (:ref:`document<document>`) --
The field value.
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.
value (:ref:`document<document>`) --
The field value.
displayValue (:ref:`document<document>`) --
The name of the field.
allowedFormat (string) --
The expected data format for the action review input field value. For example, in PTO request, from and to would be of datetime allowed format.
arrayItemJsonSchema (:ref:`document<document>`) --
Use to create a custom form with array fields (fields with nested objects inside an array).
required (boolean) --
Information about whether the field is required.
payloadFieldNameSeparator (string) --
A string used to retain information about the hierarchical contexts within an action review payload.
authChallengeRequest (dict) --
An authentication verification event activated by an end user request to use a custom plugin.
authorizationUrl (string) --
The URL sent by Amazon Q Business to the third party authentication server to authenticate a custom plugin user through an OAuth protocol.
sourceAttributions (list) --
The source documents used to generate the conversation response.
(dict) --
The documents used to generate an Amazon Q Business web experience response.
title (string) --
The title of the document which is the source for the Amazon Q Business generated response.
snippet (string) --
The content extract from the document on which the generated response is based.
url (string) --
The URL of the document which is the source for the Amazon Q Business generated response.
citationNumber (integer) --
The number attached to a citation in an Amazon Q Business generated response.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q Business application was last updated.
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.
snippetExcerpt (dict) --
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.
text (string) --
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q chat response.
mediaId (string) --
The identifier of the media object associated with the text segment in the source attribution.
mediaMimeType (string) --
The MIME type (image/png) of the media object associated with the text segment in the source attribution.
failedAttachments (list) --
A list of files which failed to upload during chat.
(dict) --
The details of a file uploaded during chat.
name (string) --
The name of a file uploaded during chat.
status (string) --
The status of a file uploaded during chat.
error (dict) --
An error associated with a file uploaded during chat.
errorMessage (string) --
The message explaining the Amazon Q Business request error.
errorCode (string) --
The code associated with the Amazon Q Business request error.
attachmentId (string) --
The unique identifier of the Amazon Q Business attachment.
conversationId (string) --
The unique identifier of the Amazon Q Business conversation.
{'mediaExtractionConfiguration': {'imageExtractionConfiguration': {'imageExtractionStatus': 'ENABLED ' '| ' 'DISABLED'}}}
Creates a data source connector for an Amazon Q Business application.
CreateDataSource is a synchronous operation. The operation returns 200 if the data source was successfully created. Otherwise, an exception is raised.
See also: AWS API Documentation
Request Syntax
client.create_data_source( applicationId='string', indexId='string', displayName='string', configuration={...}|[...]|123|123.4|'string'|True|None, vpcConfiguration={ 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, description='string', tags=[ { 'key': 'string', 'value': 'string' }, ], syncSchedule='string', roleArn='string', clientToken='string', documentEnrichmentConfiguration={ 'inlineConfigurations': [ { 'condition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'target': { 'key': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) }, 'attributeValueOperator': 'DELETE' }, 'documentContentOperator': 'DELETE' }, ], 'preExtractionHookConfiguration': { 'invocationCondition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lambdaArn': 'string', 's3BucketName': 'string', 'roleArn': 'string' }, 'postExtractionHookConfiguration': { 'invocationCondition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lambdaArn': 'string', 's3BucketName': 'string', 'roleArn': 'string' } }, mediaExtractionConfiguration={ 'imageExtractionConfiguration': { 'imageExtractionStatus': 'ENABLED'|'DISABLED' } } )
string
[REQUIRED]
The identifier of the Amazon Q Business application the data source will be attached to.
string
[REQUIRED]
The identifier of the index that you want to use with the data source connector.
string
[REQUIRED]
A name for the data source connector.
:ref:`document<document>`
[REQUIRED]
Configuration information to connect your data source repository to Amazon Q Business. Use this parameter to provide a JSON schema with configuration information specific to your data source connector.
Each data source has a JSON schema provided by Amazon Q Business that you must use. For example, the Amazon S3 and Web Crawler connectors require the following JSON schemas:
You can find configuration templates for your specific data source using the following steps:
Navigate to the Supported connectors page in the Amazon Q Business User Guide, and select the data source of your choice.
Then, from your specific data source connector page, select Using the API. You will find the JSON schema for your data source, including parameter descriptions, in this section.
dict
Configuration information for an Amazon VPC (Virtual Private Cloud) to connect to your data source. For more information, see Using Amazon VPC with Amazon Q Business connectors.
subnetIds (list) -- [REQUIRED]
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
(string) --
securityGroupIds (list) -- [REQUIRED]
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Q Business to connect to the data source.
(string) --
string
A description for the data source connector.
list
A list of key-value pairs that identify or categorize the data source connector. You can also use tags to help control access to the data source connector. 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.
string
Sets the frequency for Amazon Q Business to check the documents in your data source repository and update your index. If you don't set a schedule, Amazon Q Business won't periodically update the index.
Specify a cron- format schedule string or an empty string to indicate that the index is updated on demand. You can't specify the Schedule parameter when the Type parameter is set to CUSTOM. If you do, you receive a ValidationException exception.
string
The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.
string
A token you provide to identify a request to create a data source connector. Multiple calls to the CreateDataSource API with the same client token will create only one data source connector.
This field is autopopulated if not provided.
dict
Provides the configuration information for altering document metadata and content during the document ingestion process.
For more information, see Custom document enrichment.
inlineConfigurations (list) --
Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Q Business.
(dict) --
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q Business.
To apply advanced logic, to go beyond what you can do with basic logic, see HookConfiguration.
For more information, see Custom document enrichment.
condition (dict) --
The condition used for the target document attribute or metadata field when ingesting documents into Amazon Q Business. You use this with DocumentAttributeTarget to apply the condition.
For example, you can create the 'Department' target field and have it prefill department names associated with the documents based on information in the 'Source_URI' field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI value, then prefill the target field 'Department' with the target value 'Finance' for the document.
Amazon Q Business can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q Business then will map your newly created metadata field to your index field.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
target (dict) --
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q Business.
For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called 'Customer_ID' by setting the target key as 'Customer_ID' and the deletion flag to TRUE. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally identifiable information from each document's metadata.
Amazon Q Business can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q Business will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition.
key (string) -- [REQUIRED]
The identifier of the target document attribute or metadata field. For example, 'Department' could be an identifier for the target attribute or metadata field that includes the department names associated with the documents.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
attributeValueOperator (string) --
TRUE to delete the existing target value for your specified target attribute key. You cannot create a target value and set this to TRUE.
documentContentOperator (string) --
TRUE to delete content if the condition used for the target attribute is met.
preExtractionHookConfiguration (dict) --
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
invocationCondition (dict) --
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
lambdaArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE).
s3BucketName (string) --
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
roleArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.
postExtractionHookConfiguration (dict) --
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
invocationCondition (dict) --
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
lambdaArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE).
s3BucketName (string) --
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
roleArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.
dict
The configuration for extracting information from media in documents during ingestion.
imageExtractionConfiguration (dict) --
The configuration for extracting semantic meaning from images in documents. For more information, see Extracting semantic meaning from images and visuals.
imageExtractionStatus (string) -- [REQUIRED]
Specify whether to extract semantic meaning from images and visuals from documents.
dict
Response Syntax
{ 'dataSourceId': 'string', 'dataSourceArn': 'string' }
Response Structure
(dict) --
dataSourceId (string) --
The identifier of the data source connector.
dataSourceArn (string) --
The Amazon Resource Name (ARN) of a data source in an Amazon Q Business application.
{'browserExtensionConfiguration': {'enabledBrowserExtensions': ['FIREFOX | ' 'CHROME']}}
Creates an Amazon Q Business web experience.
See also: AWS API Documentation
Request Syntax
client.create_web_experience( applicationId='string', title='string', subtitle='string', welcomeMessage='string', samplePromptsControlMode='ENABLED'|'DISABLED', origins=[ 'string', ], roleArn='string', tags=[ { 'key': 'string', 'value': 'string' }, ], clientToken='string', identityProviderConfiguration={ 'samlConfiguration': { 'authenticationUrl': 'string' }, 'openIDConnectConfiguration': { 'secretsArn': 'string', 'secretsRole': 'string' } }, browserExtensionConfiguration={ 'enabledBrowserExtensions': [ 'FIREFOX'|'CHROME', ] } )
string
[REQUIRED]
The identifier of the Amazon Q Business web experience.
string
The title for your Amazon Q Business web experience.
string
A subtitle to personalize your Amazon Q Business web experience.
string
The customized welcome message for end users of an Amazon Q Business web experience.
string
Determines whether sample prompts are enabled in the web experience for an end user.
list
Sets the website domain origins that are allowed to embed the Amazon Q Business web experience. The <i>domain origin</i> refers to the base URL for accessing a website including the protocol (<code>http/https</code>), the domain name, and the port number (if specified). </p> <note> <p>You must only submit a <i>base URL</i> and not a full path. For example, <code>https://docs.aws.amazon.com</code>.</p> </note>
(string) --
string
The Amazon Resource Name (ARN) of the service role attached to your web experience.
list
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.
string
A token you provide to identify a request to create an Amazon Q Business web experience.
This field is autopopulated if not provided.
dict
Information about the identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
samlConfiguration (dict) --
Information about the SAML 2.0-compliant identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
authenticationUrl (string) -- [REQUIRED]
The URL where Amazon Q Business end users will be redirected for authentication.
openIDConnectConfiguration (dict) --
Information about the OIDC-compliant identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
secretsArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of a Secrets Manager secret containing the OIDC client secret.
secretsRole (string) -- [REQUIRED]
An IAM role with permissions to access KMS to decrypt the Secrets Manager secret containing your OIDC client secret.
dict
The browser extension configuration for an Amazon Q Business web experience.
enabledBrowserExtensions (list) -- [REQUIRED]
Specify the browser extensions allowed for your Amazon Q web experience.
CHROME — Enables the extension for Chromium-based browsers (Google Chrome, Microsoft Edge, Opera, etc.).
FIREFOX — Enables the extension for Mozilla Firefox.
CHROME and FIREFOX — Enable the extension for Chromium-based browsers and Mozilla Firefox.
(string) --
dict
Response Syntax
{ 'webExperienceId': 'string', 'webExperienceArn': 'string' }
Response Structure
(dict) --
webExperienceId (string) --
The identifier of the Amazon Q Business web experience.
webExperienceArn (string) --
The Amazon Resource Name (ARN) of an Amazon Q Business web experience.
{'mediaExtractionConfiguration': {'imageExtractionConfiguration': {'imageExtractionStatus': 'ENABLED ' '| ' 'DISABLED'}}}
Gets information about an existing Amazon Q Business data source connector.
See also: AWS API Documentation
Request Syntax
client.get_data_source( applicationId='string', indexId='string', dataSourceId='string' )
string
[REQUIRED]
The identifier of the Amazon Q Business application.
string
[REQUIRED]
The identfier of the index used with the data source connector.
string
[REQUIRED]
The identifier of the data source connector.
dict
Response Syntax
{ 'applicationId': 'string', 'indexId': 'string', 'dataSourceId': 'string', 'dataSourceArn': 'string', 'displayName': 'string', 'type': 'string', 'configuration': {...}|[...]|123|123.4|'string'|True|None, 'vpcConfiguration': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'description': 'string', 'status': 'PENDING_CREATION'|'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING', 'syncSchedule': 'string', 'roleArn': 'string', 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' }, 'documentEnrichmentConfiguration': { 'inlineConfigurations': [ { 'condition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'target': { 'key': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) }, 'attributeValueOperator': 'DELETE' }, 'documentContentOperator': 'DELETE' }, ], 'preExtractionHookConfiguration': { 'invocationCondition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lambdaArn': 'string', 's3BucketName': 'string', 'roleArn': 'string' }, 'postExtractionHookConfiguration': { 'invocationCondition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lambdaArn': 'string', 's3BucketName': 'string', 'roleArn': 'string' } }, 'mediaExtractionConfiguration': { 'imageExtractionConfiguration': { 'imageExtractionStatus': 'ENABLED'|'DISABLED' } } }
Response Structure
(dict) --
applicationId (string) --
The identifier of the Amazon Q Business application.
indexId (string) --
The identifier of the index linked to the data source connector.
dataSourceId (string) --
The identifier of the data source connector.
dataSourceArn (string) --
The Amazon Resource Name (ARN) of the data source.
displayName (string) --
The name for the data source connector.
type (string) --
The type of the data source connector. For example, S3.
configuration (:ref:`document<document>`) --
The details of how the data source connector is configured.
vpcConfiguration (dict) --
Configuration information for an Amazon VPC (Virtual Private Cloud) to connect to your data source.
subnetIds (list) --
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
(string) --
securityGroupIds (list) --
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Q Business to connect to the data source.
(string) --
createdAt (datetime) --
The Unix timestamp when the data source connector was created.
updatedAt (datetime) --
The Unix timestamp when the data source connector was last updated.
description (string) --
The description for the data source connector.
status (string) --
The current status of the data source connector. When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source connector to fail.
syncSchedule (string) --
The schedule for Amazon Q Business to update the index.
roleArn (string) --
The Amazon Resource Name (ARN) of the role with permission to access the data source and required resources.
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.
errorMessage (string) --
The message explaining the Amazon Q Business request error.
errorCode (string) --
The code associated with the Amazon Q Business request error.
documentEnrichmentConfiguration (dict) --
Provides the configuration information for altering document metadata and content during the document ingestion process.
For more information, see Custom document enrichment.
inlineConfigurations (list) --
Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Q Business.
(dict) --
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q Business.
To apply advanced logic, to go beyond what you can do with basic logic, see HookConfiguration.
For more information, see Custom document enrichment.
condition (dict) --
The condition used for the target document attribute or metadata field when ingesting documents into Amazon Q Business. You use this with DocumentAttributeTarget to apply the condition.
For example, you can create the 'Department' target field and have it prefill department names associated with the documents based on information in the 'Source_URI' field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI value, then prefill the target field 'Department' with the target value 'Finance' for the document.
Amazon Q Business can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q Business then will map your newly created metadata field to your index field.
key (string) --
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) --
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
target (dict) --
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q Business.
For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called 'Customer_ID' by setting the target key as 'Customer_ID' and the deletion flag to TRUE. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally identifiable information from each document's metadata.
Amazon Q Business can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q Business will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition.
key (string) --
The identifier of the target document attribute or metadata field. For example, 'Department' could be an identifier for the target attribute or metadata field that includes the department names associated with the documents.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
attributeValueOperator (string) --
TRUE to delete the existing target value for your specified target attribute key. You cannot create a target value and set this to TRUE.
documentContentOperator (string) --
TRUE to delete content if the condition used for the target attribute is met.
preExtractionHookConfiguration (dict) --
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
invocationCondition (dict) --
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
key (string) --
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) --
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
lambdaArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE).
s3BucketName (string) --
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
roleArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.
postExtractionHookConfiguration (dict) --
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
invocationCondition (dict) --
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
key (string) --
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) --
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
lambdaArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE).
s3BucketName (string) --
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
roleArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.
mediaExtractionConfiguration (dict) --
The configuration for extracting information from media in documents for the data source.
imageExtractionConfiguration (dict) --
The configuration for extracting semantic meaning from images in documents. For more information, see Extracting semantic meaning from images and visuals.
imageExtractionStatus (string) --
Specify whether to extract semantic meaning from images and visuals from documents.
{'browserExtensionConfiguration': {'enabledBrowserExtensions': ['FIREFOX | ' 'CHROME']}}
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' )
string
[REQUIRED]
The identifier of the Amazon Q Business application linked to the web experience.
string
[REQUIRED]
The identifier of the Amazon Q Business web experience.
dict
Response Syntax
{ 'applicationId': 'string', 'webExperienceId': 'string', 'webExperienceArn': 'string', 'defaultEndpoint': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'PENDING_AUTH_CONFIG', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'title': 'string', 'subtitle': 'string', 'welcomeMessage': 'string', 'samplePromptsControlMode': 'ENABLED'|'DISABLED', 'origins': [ 'string', ], 'roleArn': 'string', 'identityProviderConfiguration': { 'samlConfiguration': { 'authenticationUrl': 'string' }, 'openIDConnectConfiguration': { 'secretsArn': 'string', 'secretsRole': 'string' } }, 'authenticationConfiguration': { 'samlConfiguration': { 'metadataXML': 'string', 'roleArn': 'string', 'userIdAttribute': 'string', 'userGroupAttribute': 'string' } }, 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' }, 'browserExtensionConfiguration': { 'enabledBrowserExtensions': [ 'FIREFOX'|'CHROME', ] } }
Response Structure
(dict) --
applicationId (string) --
The identifier of the Amazon Q Business application linked to the web experience.
webExperienceId (string) --
The identifier of the Amazon Q Business web experience.
webExperienceArn (string) --
The Amazon Resource Name (ARN) of the role with the permission to access the Amazon Q Business web experience and required resources.
defaultEndpoint (string) --
The endpoint of your Amazon Q Business web experience.
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.
createdAt (datetime) --
The Unix timestamp when the Amazon Q Business web experience was last created.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q Business web experience was last updated.
title (string) --
The title for your Amazon Q Business web experience.
subtitle (string) --
The subtitle for your Amazon Q Business web experience.
welcomeMessage (string) --
The customized welcome message for end users of an Amazon Q Business web experience.
samplePromptsControlMode (string) --
Determines whether sample prompts are enabled in the web experience for an end user.
origins (list) --
Gets the website domain origins that are allowed to embed the Amazon Q Business web experience. The <i>domain origin</i> refers to the base URL for accessing a website including the protocol (<code>http/https</code>), the domain name, and the port number (if specified). </p>
(string) --
roleArn (string) --
The Amazon Resource Name (ARN) of the service role attached to your web experience.
identityProviderConfiguration (dict) --
Information about the identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
samlConfiguration (dict) --
Information about the SAML 2.0-compliant identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
authenticationUrl (string) --
The URL where Amazon Q Business end users will be redirected for authentication.
openIDConnectConfiguration (dict) --
Information about the OIDC-compliant identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
secretsArn (string) --
The Amazon Resource Name (ARN) of a Secrets Manager secret containing the OIDC client secret.
secretsRole (string) --
An IAM role with permissions to access KMS to decrypt the Secrets Manager secret containing your OIDC client secret.
authenticationConfiguration (dict) --
The authentication configuration information for your Amazon Q Business web experience.
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.
userIdAttribute (string) --
The user attribute name in your IdP that maps to the user email.
userGroupAttribute (string) --
The group attribute name in your IdP that maps to user groups.
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.
errorMessage (string) --
The message explaining the Amazon Q Business request error.
errorCode (string) --
The code associated with the Amazon Q Business request error.
browserExtensionConfiguration (dict) --
The browser extension configuration for an Amazon Q Business web experience.
enabledBrowserExtensions (list) --
Specify the browser extensions allowed for your Amazon Q web experience.
CHROME — Enables the extension for Chromium-based browsers (Google Chrome, Microsoft Edge, Opera, etc.).
FIREFOX — Enables the extension for Mozilla Firefox.
CHROME and FIREFOX — Enable the extension for Chromium-based browsers and Mozilla Firefox.
(string) --
{'messages': {'attachments': {'attachmentId': 'string', 'conversationId': 'string', 'status': {'SUCCESS'}}, 'sourceAttribution': {'textMessageSegments': {'mediaId': 'string', 'mediaMimeType': 'string'}}}}
Gets a list of messages associated with an Amazon Q Business web experience.
See also: AWS API Documentation
Request Syntax
client.list_messages( conversationId='string', applicationId='string', userId='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The identifier of the Amazon Q Business web experience conversation.
string
[REQUIRED]
The identifier for the Amazon Q Business application.
string
The identifier of the user involved in the Amazon Q Business web experience conversation.
string
If the number of messages returned exceeds maxResults, Amazon Q Business returns a next token as a pagination token to retrieve the next set of messages.
integer
The maximum number of messages to return.
dict
Response Syntax
{ 'messages': [ { 'messageId': 'string', 'body': 'string', 'time': datetime(2015, 1, 1), 'type': 'USER'|'SYSTEM', 'attachments': [ { 'name': 'string', 'status': 'FAILED'|'SUCCESS', 'error': { 'errorMessage': 'string', 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound' }, 'attachmentId': 'string', 'conversationId': 'string' }, ], 'sourceAttribution': [ { 'title': 'string', 'snippet': 'string', 'url': 'string', 'citationNumber': 123, 'updatedAt': datetime(2015, 1, 1), 'textMessageSegments': [ { 'beginOffset': 123, 'endOffset': 123, 'snippetExcerpt': { 'text': 'string' }, 'mediaId': 'string', 'mediaMimeType': 'string' }, ] }, ], 'actionReview': { 'pluginId': 'string', 'pluginType': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK'|'CUSTOM', 'payload': { 'string': { 'displayName': 'string', 'displayOrder': 123, 'displayDescription': 'string', 'type': 'STRING'|'NUMBER'|'ARRAY'|'BOOLEAN', 'value': {...}|[...]|123|123.4|'string'|True|None, 'allowedValues': [ { 'value': {...}|[...]|123|123.4|'string'|True|None, 'displayValue': {...}|[...]|123|123.4|'string'|True|None }, ], 'allowedFormat': 'string', 'arrayItemJsonSchema': {...}|[...]|123|123.4|'string'|True|None, 'required': True|False } }, 'payloadFieldNameSeparator': 'string' }, 'actionExecution': { 'pluginId': 'string', 'payload': { 'string': { 'value': {...}|[...]|123|123.4|'string'|True|None } }, 'payloadFieldNameSeparator': 'string' } }, ], '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.
messageId (string) --
The identifier of the Amazon Q Business web experience message.
body (string) --
The content of the Amazon Q Business web experience message.
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.
attachments (list) --
A file directly uploaded into an Amazon Q Business web experience chat.
(dict) --
The details of a file uploaded during chat.
name (string) --
The name of a file uploaded during chat.
status (string) --
The status of a file uploaded during chat.
error (dict) --
An error associated with a file uploaded during chat.
errorMessage (string) --
The message explaining the Amazon Q Business request error.
errorCode (string) --
The code associated with the Amazon Q Business request error.
attachmentId (string) --
The unique identifier of the Amazon Q Business attachment.
conversationId (string) --
The unique identifier of the Amazon Q Business conversation.
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.
title (string) --
The title of the document which is the source for the Amazon Q Business generated response.
snippet (string) --
The content extract from the document on which the generated response is based.
url (string) --
The URL of the document which is the source for the Amazon Q Business generated response.
citationNumber (integer) --
The number attached to a citation in an Amazon Q Business generated response.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q Business application was last updated.
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.
snippetExcerpt (dict) --
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q Business chat response.
text (string) --
The relevant text excerpt from a source that was used to generate a citation text segment in an Amazon Q chat response.
mediaId (string) --
The identifier of the media object associated with the text segment in the source attribution.
mediaMimeType (string) --
The MIME type (image/png) of the media object associated with the text segment in the source attribution.
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.
pluginId (string) --
The identifier of the plugin associated with the action review.
pluginType (string) --
The type of plugin.
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.
displayName (string) --
The name of the field.
displayOrder (integer) --
The display order of fields in a payload.
displayDescription (string) --
The field level description of each action review input field. This could be an explanation of the field. In the Amazon Q Business web experience, these descriptions could be used to display as tool tips to help users understand the field.
type (string) --
The type of field.
value (:ref:`document<document>`) --
The field value.
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.
value (:ref:`document<document>`) --
The field value.
displayValue (:ref:`document<document>`) --
The name of the field.
allowedFormat (string) --
The expected data format for the action review input field value. For example, in PTO request, from and to would be of datetime allowed format.
arrayItemJsonSchema (:ref:`document<document>`) --
Use to create a custom form with array fields (fields with nested objects inside an array).
required (boolean) --
Information about whether the field is required.
payloadFieldNameSeparator (string) --
A string used to retain information about the hierarchical contexts within an action review payload.
actionExecution (dict) --
Performs an Amazon Q Business plugin action during a non-streaming chat conversation.
pluginId (string) --
The identifier of the plugin the action is attached to.
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 (:ref:`document<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.
nextToken (string) --
If the response is truncated, Amazon Q Business returns this token, which you can use in a later request to list the next set of messages.
{'mediaExtractionConfiguration': {'imageExtractionConfiguration': {'imageExtractionStatus': 'ENABLED ' '| ' 'DISABLED'}}}
Updates an existing Amazon Q Business data source connector.
See also: AWS API Documentation
Request Syntax
client.update_data_source( applicationId='string', indexId='string', dataSourceId='string', displayName='string', configuration={...}|[...]|123|123.4|'string'|True|None, vpcConfiguration={ 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, description='string', syncSchedule='string', roleArn='string', documentEnrichmentConfiguration={ 'inlineConfigurations': [ { 'condition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'target': { 'key': 'string', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) }, 'attributeValueOperator': 'DELETE' }, 'documentContentOperator': 'DELETE' }, ], 'preExtractionHookConfiguration': { 'invocationCondition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lambdaArn': 'string', 's3BucketName': 'string', 'roleArn': 'string' }, 'postExtractionHookConfiguration': { 'invocationCondition': { 'key': 'string', 'operator': 'GREATER_THAN'|'GREATER_THAN_OR_EQUALS'|'LESS_THAN'|'LESS_THAN_OR_EQUALS'|'EQUALS'|'NOT_EQUALS'|'CONTAINS'|'NOT_CONTAINS'|'EXISTS'|'NOT_EXISTS'|'BEGINS_WITH', 'value': { 'stringValue': 'string', 'stringListValue': [ 'string', ], 'longValue': 123, 'dateValue': datetime(2015, 1, 1) } }, 'lambdaArn': 'string', 's3BucketName': 'string', 'roleArn': 'string' } }, mediaExtractionConfiguration={ 'imageExtractionConfiguration': { 'imageExtractionStatus': 'ENABLED'|'DISABLED' } } )
string
[REQUIRED]
The identifier of the Amazon Q Business application the data source is attached to.
string
[REQUIRED]
The identifier of the index attached to the data source connector.
string
[REQUIRED]
The identifier of the data source connector.
string
A name of the data source connector.
:ref:`document<document>`
Provides the configuration information for an Amazon Q Business data source.
dict
Provides configuration information needed to connect to an Amazon VPC (Virtual Private Cloud).
subnetIds (list) -- [REQUIRED]
A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
(string) --
securityGroupIds (list) -- [REQUIRED]
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Q Business to connect to the data source.
(string) --
string
The description of the data source connector.
string
The chosen update frequency for your data source.
string
The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.
dict
Provides the configuration information for altering document metadata and content during the document ingestion process.
For more information, see Custom document enrichment.
inlineConfigurations (list) --
Configuration information to alter document attributes or metadata fields and content when ingesting documents into Amazon Q Business.
(dict) --
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q Business.
To apply advanced logic, to go beyond what you can do with basic logic, see HookConfiguration.
For more information, see Custom document enrichment.
condition (dict) --
The condition used for the target document attribute or metadata field when ingesting documents into Amazon Q Business. You use this with DocumentAttributeTarget to apply the condition.
For example, you can create the 'Department' target field and have it prefill department names associated with the documents based on information in the 'Source_URI' field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI value, then prefill the target field 'Department' with the target value 'Finance' for the document.
Amazon Q Business can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q Business then will map your newly created metadata field to your index field.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
target (dict) --
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q Business.
For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called 'Customer_ID' by setting the target key as 'Customer_ID' and the deletion flag to TRUE. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally identifiable information from each document's metadata.
Amazon Q Business can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q Business will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition.
key (string) -- [REQUIRED]
The identifier of the target document attribute or metadata field. For example, 'Department' could be an identifier for the target attribute or metadata field that includes the department names associated with the documents.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
attributeValueOperator (string) --
TRUE to delete the existing target value for your specified target attribute key. You cannot create a target value and set this to TRUE.
documentContentOperator (string) --
TRUE to delete content if the condition used for the target attribute is met.
preExtractionHookConfiguration (dict) --
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
invocationCondition (dict) --
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
lambdaArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE).
s3BucketName (string) --
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
roleArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.
postExtractionHookConfiguration (dict) --
Provides the configuration information for invoking a Lambda function in Lambda to alter document metadata and content when ingesting documents into Amazon Q Business.
You can configure your Lambda function using the PreExtractionHookConfiguration parameter if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q Business structured documents, you must configure your Lambda function using PostExtractionHookConfiguration.
You can only invoke one Lambda function. However, this function can invoke other functions it requires.
For more information, see Custom document enrichment.
invocationCondition (dict) --
The condition used for when a Lambda function should be invoked.
For example, you can specify a condition that if there are empty date-time values, then Amazon Q Business should invoke a function that inserts the current date-time.
key (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently doesn't support _document_body as an attribute key used for the condition.
operator (string) -- [REQUIRED]
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q Business currently does not support _document_body as an attribute key used for the condition.
value (dict) --
The value of a document attribute. You can only provide one value for a document 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.
lambdaArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run a Lambda function during ingestion. For more information, see IAM roles for Custom Document Enrichment (CDE).
s3BucketName (string) --
Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.
roleArn (string) --
The Amazon Resource Name (ARN) of a role with permission to run PreExtractionHookConfiguration and PostExtractionHookConfiguration for altering document metadata and content during the document ingestion process.
dict
The configuration for extracting information from media in documents for your data source.
imageExtractionConfiguration (dict) --
The configuration for extracting semantic meaning from images in documents. For more information, see Extracting semantic meaning from images and visuals.
imageExtractionStatus (string) -- [REQUIRED]
Specify whether to extract semantic meaning from images and visuals from documents.
dict
Response Syntax
{}
Response Structure
(dict) --
{'browserExtensionConfiguration': {'enabledBrowserExtensions': ['FIREFOX | ' 'CHROME']}}
Updates an Amazon Q Business web experience.
See also: AWS API Documentation
Request Syntax
client.update_web_experience( applicationId='string', webExperienceId='string', roleArn='string', authenticationConfiguration={ 'samlConfiguration': { 'metadataXML': 'string', 'roleArn': 'string', 'userIdAttribute': 'string', 'userGroupAttribute': 'string' } }, title='string', subtitle='string', welcomeMessage='string', samplePromptsControlMode='ENABLED'|'DISABLED', identityProviderConfiguration={ 'samlConfiguration': { 'authenticationUrl': 'string' }, 'openIDConnectConfiguration': { 'secretsArn': 'string', 'secretsRole': 'string' } }, origins=[ 'string', ], browserExtensionConfiguration={ 'enabledBrowserExtensions': [ 'FIREFOX'|'CHROME', ] } )
string
[REQUIRED]
The identifier of the Amazon Q Business application attached to the web experience.
string
[REQUIRED]
The identifier of the Amazon Q Business web experience.
string
The Amazon Resource Name (ARN) of the role with permission to access the Amazon Q Business web experience and required resources.
dict
The authentication configuration of the Amazon Q Business web experience.
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) -- [REQUIRED]
The metadata XML that your IdP generated.
roleArn (string) -- [REQUIRED]
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.
userIdAttribute (string) -- [REQUIRED]
The user attribute name in your IdP that maps to the user email.
userGroupAttribute (string) --
The group attribute name in your IdP that maps to user groups.
string
The title of the Amazon Q Business web experience.
string
The subtitle of the Amazon Q Business web experience.
string
A customized welcome message for an end user in an Amazon Q Business web experience.
string
Determines whether sample prompts are enabled in the web experience for an end user.
dict
Information about the identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
samlConfiguration (dict) --
Information about the SAML 2.0-compliant identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
authenticationUrl (string) -- [REQUIRED]
The URL where Amazon Q Business end users will be redirected for authentication.
openIDConnectConfiguration (dict) --
Information about the OIDC-compliant identity provider (IdP) used to authenticate end users of an Amazon Q Business web experience.
secretsArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of a Secrets Manager secret containing the OIDC client secret.
secretsRole (string) -- [REQUIRED]
An IAM role with permissions to access KMS to decrypt the Secrets Manager secret containing your OIDC client secret.
list
Updates the website domain origins that are allowed to embed the Amazon Q Business web experience. The <i>domain origin</i> refers to the <i>base URL</i> for accessing a website including the protocol (<code>http/https</code>), the domain name, and the port number (if specified).</p> <note> <ul> <li> <p>Any values except <code>null</code> submitted as part of this update will replace all previous values.</p> </li> <li> <p>You must only submit a <i>base URL</i> and not a full path. For example, <code>https://docs.aws.amazon.com</code>.</p> </li> </ul> </note>
(string) --
dict
The browser extension configuration for an Amazon Q Business web experience.
enabledBrowserExtensions (list) -- [REQUIRED]
Specify the browser extensions allowed for your Amazon Q web experience.
CHROME — Enables the extension for Chromium-based browsers (Google Chrome, Microsoft Edge, Opera, etc.).
FIREFOX — Enables the extension for Mozilla Firefox.
CHROME and FIREFOX — Enable the extension for Chromium-based browsers and Mozilla Firefox.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --