2023/11/28 - QBusiness - 55 new api methods
Changes Amazon Q - a generative AI powered application that your employees can use to ask questions and get answers from knowledge spread across disparate content repositories, summarize reports, write articles, take actions, and much more - all within their company's connected content repositories.
Updates the retriever used for your Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.update_retriever( applicationId='string', configuration={ 'kendraIndexConfiguration': { 'indexId': 'string' }, 'nativeIndexConfiguration': { 'indexId': 'string' } }, displayName='string', retrieverId='string', roleArn='string' )
string
[REQUIRED]
The identifier of your Amazon Q application.
dict
Provides information on how the retriever used for your Amazon Q application is configured.
kendraIndexConfiguration (dict) --
Provides information on how the Amazon Kendra index used as a retriever for your Amazon Q application is configured.
indexId (string) -- [REQUIRED]
The identifier of the Amazon Kendra index.
nativeIndexConfiguration (dict) --
Provides information on how a Amazon Q index used as a retriever for your Amazon Q application is configured.
indexId (string) -- [REQUIRED]
The identifier for the Amazon Q index.
string
The name of your retriever.
string
[REQUIRED]
The identifier of your retriever.
string
The Amazon Resource Name (ARN) of an IAM role with permission to access the retriever and required resources.
dict
Response Syntax
{}
Response Structure
(dict) --
Describes a group by group name.
See also: AWS API Documentation
Request Syntax
client.get_group( applicationId='string', dataSourceId='string', groupName='string', indexId='string' )
string
[REQUIRED]
The identifier of the application id the group is attached to.
string
The identifier of the data source the group is attached to.
string
[REQUIRED]
The name of the group.
string
[REQUIRED]
The identifier of the index the group is attached to.
dict
Response Syntax
{ 'status': { 'errorDetail': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'lastUpdatedAt': datetime(2015, 1, 1), 'status': 'FAILED'|'SUCCEEDED'|'PROCESSING'|'DELETING'|'DELETED' }, 'statusHistory': [ { 'errorDetail': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'lastUpdatedAt': datetime(2015, 1, 1), 'status': 'FAILED'|'SUCCEEDED'|'PROCESSING'|'DELETING'|'DELETED' }, ] }
Response Structure
(dict) --
status (dict) --
The current status of the group.
errorDetail (dict) --
The details of an error associated a group status.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
lastUpdatedAt (datetime) --
The Unix timestamp when the Amazon Q application was last updated.
status (string) --
The status of a group.
statusHistory (list) --
The status history of the group.
(dict) --
Provides the details of a group's status.
errorDetail (dict) --
The details of an error associated a group status.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
lastUpdatedAt (datetime) --
The Unix timestamp when the Amazon Q application was last updated.
status (string) --
The status of a group.
Adds a retriever to your Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.create_retriever( applicationId='string', clientToken='string', configuration={ 'kendraIndexConfiguration': { 'indexId': 'string' }, 'nativeIndexConfiguration': { 'indexId': 'string' } }, displayName='string', roleArn='string', tags=[ { 'key': 'string', 'value': 'string' }, ], type='NATIVE_INDEX'|'KENDRA_INDEX' )
string
[REQUIRED]
The identifier of your Amazon Q application.
string
A token that you provide to identify the request to create your Amazon Q application retriever.
This field is autopopulated if not provided.
dict
[REQUIRED]
Provides information on how the retriever used for your Amazon Q application is configured.
kendraIndexConfiguration (dict) --
Provides information on how the Amazon Kendra index used as a retriever for your Amazon Q application is configured.
indexId (string) -- [REQUIRED]
The identifier of the Amazon Kendra index.
nativeIndexConfiguration (dict) --
Provides information on how a Amazon Q index used as a retriever for your Amazon Q application is configured.
indexId (string) -- [REQUIRED]
The identifier for the Amazon Q index.
string
[REQUIRED]
The name of your retriever.
string
The ARN of an IAM role used by Amazon Q to access the basic authentication credentials stored in a Secrets Manager secret.
list
A list of key-value pairs that identify or categorize the retriever. You can also use tags to help control access to the retriever. 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 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
[REQUIRED]
The type of retriever you are using.
dict
Response Syntax
{ 'retrieverArn': 'string', 'retrieverId': 'string' }
Response Structure
(dict) --
retrieverArn (string) --
The Amazon Resource Name (ARN) of an IAM role associated with a retriever.
retrieverId (string) --
The identifier of the retriever you are using.
Deletes chat controls configured for an existing Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.delete_chat_controls_configuration( applicationId='string' )
string
[REQUIRED]
The identifier of the application the chat controls have been configured for.
dict
Response Syntax
{}
Response Structure
(dict) --
Gets information about an existing Amazon Q plugin.
See also: AWS API Documentation
Request Syntax
client.get_plugin( applicationId='string', pluginId='string' )
string
[REQUIRED]
The identifier of the application which contains the plugin.
string
[REQUIRED]
The identifier of the plugin.
dict
Response Syntax
{ 'applicationId': 'string', 'authConfiguration': { 'basicAuthConfiguration': { 'roleArn': 'string', 'secretArn': 'string' }, 'oAuth2ClientCredentialConfiguration': { 'roleArn': 'string', 'secretArn': 'string' } }, 'createdAt': datetime(2015, 1, 1), 'displayName': 'string', 'pluginArn': 'string', 'pluginId': 'string', 'serverUrl': 'string', 'state': 'ENABLED'|'DISABLED', 'type': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK', 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
applicationId (string) --
The identifier of the application which contains the plugin.
authConfiguration (dict) --
Authentication configuration information for an Amazon Q plugin.
basicAuthConfiguration (dict) --
Information about the basic authentication credentials used to configure a plugin.
roleArn (string) --
The ARN of an IAM role used by Amazon Q to access the basic authentication credentials stored in a Secrets Manager secret.
secretArn (string) --
The ARN of the Secrets Manager secret that stores the basic authentication credentials used for plugin configuration..
oAuth2ClientCredentialConfiguration (dict) --
Information about the OAuth 2.0 authentication credential/token used to configure a plugin.
roleArn (string) --
The ARN of an IAM role used by Amazon Q to access the OAuth 2.0 authentication credentials stored in a Secrets Manager secret.
secretArn (string) --
The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token used for plugin configuration.
createdAt (datetime) --
The timestamp for when the plugin was created.
displayName (string) --
The name of the plugin.
pluginArn (string) --
The Amazon Resource Name (ARN) of the role with permission to access resources needed to create the plugin.
pluginId (string) --
The identifier of the plugin.
serverUrl (string) --
The source URL used for plugin configuration.
state (string) --
The current state of the plugin.
type (string) --
The type of the plugin.
updatedAt (datetime) --
The timestamp for when the plugin was last updated.
Removes a tag from an Amazon Q application or a data source.
See also: AWS API Documentation
Request Syntax
client.untag_resource( resourceARN='string', tagKeys=[ 'string', ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Amazon Q application, or data source to remove the tag from.
list
[REQUIRED]
A list of tag keys to remove from the Amazon Q application or data source. If a tag key does not exist on the resource, it is ignored.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
Lists Amazon Q applications.
See also: AWS API Documentation
Request Syntax
client.list_applications( maxResults=123, nextToken='string' )
integer
The maximum number of Amazon Q applications to return.
string
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q applications.
dict
Response Syntax
{ 'applications': [ { 'applicationId': 'string', 'createdAt': datetime(2015, 1, 1), 'displayName': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
applications (list) --
An array of summary information on the configuration of one or more Amazon Q applications.
(dict) --
Summary information for an Amazon Q application.
applicationId (string) --
The identifier for the Amazon Q application.
createdAt (datetime) --
The Unix timestamp when the Amazon Q application was created.
displayName (string) --
The name of the Amazon Q application.
status (string) --
The status of the Amazon Q application. The application is ready to use when the status is ACTIVE.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q application was last updated.
nextToken (string) --
If the response is truncated, Amazon Q returns this token. You can use this token in a subsequent request to retrieve the next set of applications.
Deletes an Amazon Q index.
See also: AWS API Documentation
Request Syntax
client.delete_index( applicationId='string', indexId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application the Amazon Q index is linked to.
string
[REQUIRED]
The identifier of the Amazon Q index.
dict
Response Syntax
{}
Response Structure
(dict) --
Gets information about an chat controls configured for an existing Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.get_chat_controls_configuration( applicationId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the application for which the chat controls are configured.
integer
The maximum number of configured chat controls to return.
string
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q chat controls configured.
dict
Response Syntax
{ 'blockedPhrases': { 'blockedPhrases': [ 'string', ], 'systemMessageOverride': 'string' }, 'nextToken': 'string', 'responseScope': 'ENTERPRISE_CONTENT_ONLY'|'EXTENDED_KNOWLEDGE_ENABLED', 'topicConfigurations': [ { 'description': 'string', 'exampleChatMessages': [ 'string', ], 'name': 'string', 'rules': [ { 'excludedUsersAndGroups': { 'userGroups': [ 'string', ], 'userIds': [ 'string', ] }, 'includedUsersAndGroups': { 'userGroups': [ 'string', ], 'userIds': [ 'string', ] }, 'ruleConfiguration': { 'contentBlockerRule': { 'systemMessageOverride': 'string' }, 'contentRetrievalRule': { 'eligibleDataSources': [ { 'dataSourceId': 'string', 'indexId': 'string' }, ] } }, 'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE' }, ] }, ] }
Response Structure
(dict) --
blockedPhrases (dict) --
The phrases blocked from chat by your chat control configuration.
blockedPhrases (list) --
A list of phrases blocked from a Amazon Q web experience chat.
(string) --
systemMessageOverride (string) --
The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.
nextToken (string) --
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q chat controls configured.
responseScope (string) --
The response scope configured for a Amazon Q application. This determines whether your application uses its retrieval augmented generation (RAG) system to generate answers only from your enterprise data, or also uses the large language models (LLM) knowledge to respons to end user questions in chat.
topicConfigurations (list) --
The topic specific controls configured for a Amazon Q application.
(dict) --
The topic specific controls configured for an Amazon Q application.
description (string) --
A description for your topic control configuration. Use this outline how the large language model (LLM) should use this topic control configuration.
exampleChatMessages (list) --
A list of example phrases that you expect the end user to use in relation to the topic.
(string) --
name (string) --
A name for your topic control configuration.
rules (list) --
Rules defined for a topic configuration.
(dict) --
Guardrail rules for an Amazon Q application. Amazon Q supports only one rule at a time.
excludedUsersAndGroups (dict) --
Users and groups to be excluded from a rule.
userGroups (list) --
The user groups associated with a topic control rule.
(string) --
userIds (list) --
The user ids associated with a topic control rule.
(string) --
includedUsersAndGroups (dict) --
Users and groups to be included in a rule.
userGroups (list) --
The user groups associated with a topic control rule.
(string) --
userIds (list) --
The user ids associated with a topic control rule.
(string) --
ruleConfiguration (dict) --
The configuration information for a rule.
contentBlockerRule (dict) --
A rule for configuring how Amazon Q responds when it encounters a a blocked topic.
systemMessageOverride (string) --
The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.
contentRetrievalRule (dict) --
Rules for retrieving content from data sources connected to a Amazon Q application for a specific topic control configuration.
eligibleDataSources (list) --
Specifies data sources in a Amazon Q application to use for content generation.
(dict) --
The identifier of the data source Amazon Q will generate responses from.
dataSourceId (string) --
The identifier of the data source.
indexId (string) --
The identifier of the index the data source is attached to.
ruleType (string) --
The type fo rule.
Deletes the retriever used by an Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.delete_retriever( applicationId='string', retrieverId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application using the retriever.
string
[REQUIRED]
The identifier of the retriever being deleted.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists the Amazon Q indices you have created.
See also: AWS API Documentation
Request Syntax
client.list_indices( applicationId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the Amazon Q application connected to the index.
integer
The maximum number of indices to return.
string
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q indices.
dict
Response Syntax
{ 'indices': [ { 'createdAt': datetime(2015, 1, 1), 'displayName': 'string', 'indexId': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
indices (list) --
An array of information on the items in one or more indexes.
(dict) --
Summary information for your Amazon Q index.
createdAt (datetime) --
The Unix timestamp when the index was created.
displayName (string) --
The name of the index.
indexId (string) --
The identifier for the index.
status (string) --
The current status of the index. When the status is ACTIVE, the index is ready.
updatedAt (datetime) --
The Unix timestamp when the index was last updated.
nextToken (string) --
If the response is truncated, Amazon Q returns this token that you can use in the subsequent request to retrieve the next set of indexes.
Updates an existing Amazon Q data source connector.
See also: AWS API Documentation
Request Syntax
client.update_data_source( applicationId='string', configuration={...}|[...]|123|123.4|'string'|True|None, dataSourceId='string', description='string', displayName='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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'documentContentOperator': 'DELETE', 'target': { 'attributeValueOperator': 'DELETE', 'key': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lambdaArn': 'string', 'roleArn': 'string', 's3BucketName': 'string' }, '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lambdaArn': 'string', 'roleArn': 'string', 's3BucketName': 'string' } }, indexId='string', roleArn='string', syncSchedule='string', vpcConfiguration={ 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } )
string
[REQUIRED]
The identifier of the Amazon Q application the data source is attached to.
:ref:`document<document>`
Provides the configuration information for an Amazon Q data source.
string
[REQUIRED]
The identifier of the data source connector.
string
The description of the data source connector.
string
A name of the data source connector.
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.
(dict) --
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q.
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. 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 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
documentContentOperator (string) --
TRUE to delete content if the condition used for the target attribute is met.
target (dict) --
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q.
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 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 will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition.
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.
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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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).
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.
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.
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.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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).
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.
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.
string
[REQUIRED]
The identifier of the index attached to the data source connector.
string
The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.
string
The chosen update frequency for your data source.
dict
Provides configuration information needed to connect to an Amazon VPC (Virtual Private Cloud).
securityGroupIds (list) -- [REQUIRED]
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Q to connect to the data source.
(string) --
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) --
dict
Response Syntax
{}
Response Structure
(dict) --
Lists configured Amazon Q plugins.
See also: AWS API Documentation
Request Syntax
client.list_plugins( applicationId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the application the plugin is attached to.
integer
The maximum number of documents to return.
string
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of plugins.
dict
Response Syntax
{ 'nextToken': 'string', 'plugins': [ { 'createdAt': datetime(2015, 1, 1), 'displayName': 'string', 'pluginId': 'string', 'serverUrl': 'string', 'state': 'ENABLED'|'DISABLED', 'type': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK', 'updatedAt': datetime(2015, 1, 1) }, ] }
Response Structure
(dict) --
nextToken (string) --
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of plugins.
plugins (list) --
Information about a configured plugin.
(dict) --
Information about an Amazon Q plugin and its configuration.
createdAt (datetime) --
The timestamp for when the plugin was created.
displayName (string) --
The name of the plugin.
pluginId (string) --
The identifier of the plugin.
serverUrl (string) --
The plugin server URL used for configuration.
state (string) --
The current status of the plugin.
type (string) --
The type of the plugin.
updatedAt (datetime) --
The timestamp for when the plugin was last updated.
Gets information about an existing Amazon Q data source connector.
See also: AWS API Documentation
Request Syntax
client.get_data_source( applicationId='string', dataSourceId='string', indexId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application.
string
[REQUIRED]
The identifier of the data source connector.
string
[REQUIRED]
The identfier of the index used with the data source connector.
dict
Response Syntax
{ 'applicationId': 'string', 'configuration': {...}|[...]|123|123.4|'string'|True|None, 'createdAt': datetime(2015, 1, 1), 'dataSourceArn': 'string', 'dataSourceId': 'string', 'description': 'string', 'displayName': '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'documentContentOperator': 'DELETE', 'target': { 'attributeValueOperator': 'DELETE', 'key': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lambdaArn': 'string', 'roleArn': 'string', 's3BucketName': 'string' }, '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lambdaArn': 'string', 'roleArn': 'string', 's3BucketName': 'string' } }, 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'indexId': 'string', 'roleArn': 'string', 'status': 'PENDING_CREATION'|'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING', 'syncSchedule': 'string', 'type': 'string', 'updatedAt': datetime(2015, 1, 1), 'vpcConfiguration': { 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } }
Response Structure
(dict) --
applicationId (string) --
The identifier of the Amazon Q application.
configuration (:ref:`document<document>`) --
The details of how the data source connector is configured.
createdAt (datetime) --
The Unix timestamp when the data source connector was created.
dataSourceArn (string) --
The Amazon Resource Name (ARN) of the data source.
dataSourceId (string) --
The identifier of the data source connector.
description (string) --
The description for the data source connector.
displayName (string) --
The name for the data source connector.
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.
(dict) --
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q.
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. 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 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
documentContentOperator (string) --
TRUE to delete content if the condition used for the target attribute is met.
target (dict) --
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q.
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 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 will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition.
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.
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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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).
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.
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.
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.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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).
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.
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.
error (dict) --
When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source connector to fail.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
indexId (string) --
The identifier of the index linked to the data source connector.
roleArn (string) --
The Amazon Resource Name (ARN) of the role with permission to access the data source and required resources.
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 to update the index.
type (string) --
The type of the data source connector. For example, S3.
updatedAt (datetime) --
The Unix timestamp when the data source connector was last updated.
vpcConfiguration (dict) --
Configuration information for an Amazon VPC (Virtual Private Cloud) to connect to your data source.
securityGroupIds (list) --
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Q to connect to the data source.
(string) --
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) --
Stops an Amazon Q data source connector synchronization job already in progress.
See also: AWS API Documentation
Request Syntax
client.stop_data_source_sync_job( applicationId='string', dataSourceId='string', indexId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application that the data source is connected to.
string
[REQUIRED]
The identifier of the data source connector.
string
[REQUIRED]
The identifier of the index used with the Amazon Q data source connector.
dict
Response Syntax
{}
Response Structure
(dict) --
Create, or updates, a mapping of users—who have access to a document—to groups.
You can also map sub groups to groups. For example, the group "Company Intellectual Property Teams" includes sub groups "Research" and "Engineering". These sub groups include their own list of users or people who work in these teams. Only users who work in research and engineering, and therefore belong in the intellectual property group, can see top-secret company documents in their Amazon Q chat results.
See also: AWS API Documentation
Request Syntax
client.put_group( applicationId='string', dataSourceId='string', groupMembers={ 'memberGroups': [ { 'groupName': 'string', 'type': 'INDEX'|'DATASOURCE' }, ], 'memberUsers': [ { 'type': 'INDEX'|'DATASOURCE', 'userId': 'string' }, ] }, groupName='string', indexId='string', type='INDEX'|'DATASOURCE' )
string
[REQUIRED]
The identifier of the application in which the user and group mapping belongs.
string
The identifier of the data source for which you want to map users to their groups. This is useful if a group is tied to multiple data sources, but you only want the group to access documents of a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. However, "Sales and Marketing" team only needs access to customer-related documents stored in Salesforce.
dict
[REQUIRED]
A list of users or sub groups that belong to a group. This is for generating Amazon Q chat results only from document a user has access to.
memberGroups (list) --
A list of sub groups that belong to a group. For example, the sub groups "Research", "Engineering", and "Sales and Marketing" all belong to the group "Company".
(dict) --
The sub groups that belong to a group.
groupName (string) -- [REQUIRED]
The name of the sub group.
type (string) --
The type of the sub group.
memberUsers (list) --
A list of users that belong to a group. For example, a list of interns all belong to the "Interns" group.
(dict) --
The users that belong to a group.
type (string) --
The type of the user.
userId (string) -- [REQUIRED]
The identifier of the user you want to map to a group.
string
[REQUIRED]
The list that contains your users or sub groups that belong the same group. For example, the group "Company" includes the user "CEO" and the sub groups "Research", "Engineering", and "Sales and Marketing".
If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.
string
[REQUIRED]
The identifier of the index in which you want to map users to their groups.
string
[REQUIRED]
The type of the group.
dict
Response Syntax
{}
Response Structure
(dict) --
Updates an existing Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.update_application( applicationId='string', attachmentsConfiguration={ 'attachmentsControlMode': 'ENABLED'|'DISABLED' }, description='string', displayName='string', roleArn='string' )
string
[REQUIRED]
The identifier of the Amazon Q application.
dict
An option to allow end users to upload files directly during chat.
attachmentsControlMode (string) -- [REQUIRED]
Status information about whether file upload functionality is activated or deactivated for your end user.
string
A description for the Amazon Q application.
string
A name for the Amazon Q application.
string
An Amazon Web Services Identity and Access Management (IAM) role that gives Amazon Q permission to access Amazon CloudWatch logs and metrics.
dict
Response Syntax
{}
Response Structure
(dict) --
Starts a data source connector synchronization job. If a synchronization job is already in progress, Amazon Q returns a ConflictException.
See also: AWS API Documentation
Request Syntax
client.start_data_source_sync_job( applicationId='string', dataSourceId='string', indexId='string' )
string
[REQUIRED]
The identifier of Amazon Q application the data source is connected to.
string
[REQUIRED]
The identifier of the data source connector.
string
[REQUIRED]
The identifier of the index used with the data source connector.
dict
Response Syntax
{ 'executionId': 'string' }
Response Structure
(dict) --
executionId (string) --
The identifier for a particular synchronization job.
Deletes an Amazon Q web experience conversation.
See also: AWS API Documentation
Request Syntax
client.delete_conversation( applicationId='string', conversationId='string', userId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application associated with the conversation.
string
[REQUIRED]
The identifier of the Amazon Q web experience conversation being deleted.
string
[REQUIRED]
The identifier of the user who is deleting the conversation.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes an Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.delete_application( applicationId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes a user by email id.
See also: AWS API Documentation
Request Syntax
client.delete_user( applicationId='string', userId='string' )
string
[REQUIRED]
The identifier of the application from which the user is being deleted.
string
[REQUIRED]
The user email being deleted.
dict
Response Syntax
{}
Response Structure
(dict) --
Starts or continues a non-streaming Amazon Q conversation.
See also: AWS API Documentation
Request Syntax
client.chat_sync( actionExecution={ 'payload': { 'string': { 'value': {...}|[...]|123|123.4|'string'|True|None } }, 'payloadFieldNameSeparator': 'string', 'pluginId': 'string' }, applicationId='string', attachments=[ { 'data': b'bytes', 'name': 'string' }, ], attributeFilter={ 'andAllFilters': [ {'... recursive ...'}, ], 'containsAll': { 'name': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'containsAny': { 'name': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'equalsTo': { 'name': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'greaterThan': { 'name': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'greaterThanOrEquals': { 'name': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lessThan': { 'name': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lessThanOrEquals': { 'name': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'notFilter': {'... recursive ...'}, 'orAllFilters': [ {'... recursive ...'}, ] }, clientToken='string', conversationId='string', parentMessageId='string', userGroups=[ 'string', ], userId='string', userMessage='string' )
dict
A request from an end user to perform an Amazon Q plugin action.
payload (dict) -- [REQUIRED]
A mapping of field names to the field values in input that an end user provides to Amazon Q 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.
pluginId (string) -- [REQUIRED]
The identifier of the plugin the action is attached to.
string
[REQUIRED]
The identifier of the Amazon Q application linked to the Amazon Q conversation.
list
A list of files uploaded directly during chat. You can upload a maximum of 5 files of upto 10 MB each.
(dict) --
A file directly uploaded into a web experience chat.
data (bytes) -- [REQUIRED]
The data contained within the uploaded file.
name (string) -- [REQUIRED]
The name of the file.
dict
Enables filtering of Amazon Q 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 Amazon Q web experience responses based on document attributes or metadata fields.
containsAll (dict) --
Returns true when a document contains all the specified document attributes or metadata fields.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
containsAny (dict) --
Returns true when a document contains any of the specified document attributes or metadata fields.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
equalsTo (dict) --
Performs an equals operation on two document attributes or metadata fields.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
greaterThan (dict) --
Performs a greater than operation on two document attributes or metadata fields. Use with a document attribute of type Date or Long.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
greaterThanOrEquals (dict) --
Performs a greater or equals than operation on two document attributes or metadata fields. Use with a document attribute of type Date or Long.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
lessThan (dict) --
Performs a less than operation on two document attributes or metadata fields. Use with a document attribute of type Date or Long.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
lessThanOrEquals (dict) --
Performs a less than or equals operation on two document attributes or metadata fields. Use with a document attribute of type Date or Long.
name (string) -- [REQUIRED]
The identifier for the attribute.
value (dict) -- [REQUIRED]
The value of the attribute.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
notFilter (dict) --
Performs a logical NOT operation on all supplied filters.
orAllFilters (list) --
Performs a logical OR operation on all supplied filters.
(dict) --
Enables filtering of Amazon Q web experience responses based on document attributes or metadata fields.
string
A token that you provide to identify a chat request.
This field is autopopulated if not provided.
string
The identifier of the Amazon Q conversation.
string
The identifier of the previous end user text input message in a conversation.
list
The groups that a user associated with the chat input belongs to.
(string) --
string
[REQUIRED]
The identifier of the user attached to the chat input.
string
A end user message in a conversation.
dict
Response Syntax
{ 'actionReview': { 'payload': { 'string': { 'allowedValues': [ { 'displayValue': {...}|[...]|123|123.4|'string'|True|None, 'value': {...}|[...]|123|123.4|'string'|True|None }, ], 'displayName': 'string', 'displayOrder': 123, 'required': True|False, 'type': 'STRING'|'NUMBER'|'ARRAY'|'BOOLEAN', 'value': {...}|[...]|123|123.4|'string'|True|None } }, 'payloadFieldNameSeparator': 'string', 'pluginId': 'string', 'pluginType': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK' }, 'conversationId': 'string', 'failedAttachments': [ { 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'name': 'string', 'status': 'FAILED'|'SUCCEEDED' }, ], 'sourceAttributions': [ { 'citationNumber': 123, 'snippet': 'string', 'textMessageSegments': [ { 'beginOffset': 123, 'endOffset': 123 }, ], 'title': 'string', 'updatedAt': datetime(2015, 1, 1), 'url': 'string' }, ], 'systemMessage': 'string', 'systemMessageId': 'string', 'userMessageId': 'string' }
Response Structure
(dict) --
actionReview (dict) --
A request from Amazon Q to the end user for information Amazon Q needs to successfully complete a requested plugin action.
payload (dict) --
Field values that an end user needs to provide to Amazon Q for Amazon Q to perform the requested plugin action.
(string) --
(dict) --
A user input field in an plugin action review payload.
allowedValues (list) --
Information about the field values that an end user can use to provide to Amazon Q for Amazon Q to perform the requested plugin action.
(dict) --
Information about the field values that an end user can use to provide to Amazon Q for Amazon Q to perform the requested plugin action.
displayValue (:ref:`document<document>`) --
The name of the field.
value (:ref:`document<document>`) --
The field value.
displayName (string) --
The name of the field.
displayOrder (integer) --
The display order of fields in a payload.
required (boolean) --
Information about whether the field is required.
type (string) --
The type of field.
value (:ref:`document<document>`) --
The field value.
payloadFieldNameSeparator (string) --
A string used to retain information about the hierarchical contexts within an action review payload.
pluginId (string) --
The identifier of the plugin associated with the action review.
pluginType (string) --
The type of plugin.
conversationId (string) --
The identifier of the Amazon Q conversation.
failedAttachments (list) --
A list of files which failed to upload during chat.
(dict) --
The details of a file uploaded during chat.
error (dict) --
An error associated with a file uploaded during chat.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
name (string) --
The name of a file uploaded during chat.
status (string) --
The status of a file uploaded during chat.
sourceAttributions (list) --
The source documents used to generate the conversation response.
(dict) --
The documents used to generate an Amazon Q web experience response.
citationNumber (integer) --
The number attached to a citation in an Amazon Q generated response.
snippet (string) --
The content extract from the document on which the generated response is based.
textMessageSegments (list) --
A text extract from a source document that is used for source attribution.
(dict) --
Provides information about a text extract in a chat response that can be attributed to a source document.
beginOffset (integer) --
The zero-based location in the response string where the source attribution starts.
endOffset (integer) --
The zero-based location in the response string where the source attribution ends.
title (string) --
The title of the document which is the source for the Amazon Q generated response.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q application was last updated.
url (string) --
The URL of the document which is the source for the Amazon Q generated response.
systemMessage (string) --
An AI-generated message in a conversation.
systemMessageId (string) --
The identifier of an Amazon Q AI generated message within the conversation.
userMessageId (string) --
The identifier of an Amazon Q end user text input message within the conversation.
Gets information about an existing Amazon Q 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 application linked to the web experience.
string
[REQUIRED]
The identifier of the Amazon Q web experience.
dict
Response Syntax
{ 'applicationId': 'string', 'authenticationConfiguration': { 'samlConfiguration': { 'metadataXML': 'string', 'roleArn': 'string', 'userGroupAttribute': 'string', 'userIdAttribute': 'string' } }, 'createdAt': datetime(2015, 1, 1), 'defaultEndpoint': 'string', 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'samplePromptsControlMode': 'ENABLED'|'DISABLED', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'PENDING_AUTH_CONFIG', 'subtitle': 'string', 'title': 'string', 'updatedAt': datetime(2015, 1, 1), 'webExperienceArn': 'string', 'webExperienceId': 'string', 'welcomeMessage': 'string' }
Response Structure
(dict) --
applicationId (string) --
The identifier of the Amazon Q application linked to the web experience.
authenticationConfiguration (dict) --
The authentication configuration information for your Amazon Q web experience.
samlConfiguration (dict) --
Provides the SAML 2.0 compliant identity provider (IdP) configuration information Amazon Q needs to deploy a Amazon Q 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 web experience, containing the relevant Amazon Q permissions for conversing with Amazon Q.
userGroupAttribute (string) --
The group attribute name in your IdP that maps to user groups.
userIdAttribute (string) --
The user attribute name in your IdP that maps to the user email.
createdAt (datetime) --
The Unix timestamp when the retriever was created.
defaultEndpoint (string) --
The endpoint of your Amazon Q web experience.
error (dict) --
When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source connector to fail.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
samplePromptsControlMode (string) --
Determines whether sample prompts are enabled in the web experience for an end user.
status (string) --
The current status of the Amazon Q web experience. When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source connector to fail.
subtitle (string) --
The subtitle for your Amazon Q web experience.
title (string) --
The title for your Amazon Q web experience.
updatedAt (datetime) --
The Unix timestamp when the data source connector was last updated.
webExperienceArn (string) --
The Amazon Resource Name (ARN) of the role with the permission to access the Amazon Q web experience and required resources.
webExperienceId (string) --
The identifier of the Amazon Q web experience.
welcomeMessage (string) --
The customized welcome message for end users of an Amazon Q web experience.
Deletes an Amazon Q data source connector. While the data source is being deleted, the Status field returned by a call to the DescribeDataSource API is set to DELETING.
See also: AWS API Documentation
Request Syntax
client.delete_data_source( applicationId='string', dataSourceId='string', indexId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application used with the data source connector.
string
[REQUIRED]
The identifier of the data source connector that you want to delete.
string
[REQUIRED]
The identifier of the index used with the data source connector.
dict
Response Syntax
{}
Response Structure
(dict) --
Enables your end user to to provide feedback on their Amazon Q generated chat responses.
See also: AWS API Documentation
Request Syntax
client.put_feedback( applicationId='string', conversationId='string', messageCopiedAt=datetime(2015, 1, 1), messageId='string', messageUsefulness={ 'comment': 'string', 'reason': 'NOT_FACTUALLY_CORRECT'|'HARMFUL_OR_UNSAFE'|'INCORRECT_OR_MISSING_SOURCES'|'NOT_HELPFUL'|'FACTUALLY_CORRECT'|'COMPLETE'|'RELEVANT_SOURCES'|'HELPFUL', 'submittedAt': datetime(2015, 1, 1), 'usefulness': 'USEFUL'|'NOT_USEFUL' }, userId='string' )
string
[REQUIRED]
The identifier of the application associated with the feedback.
string
[REQUIRED]
The identifier of the conversation the feedback is attached to.
datetime
The timestamp for when the feedback was recorded.
string
[REQUIRED]
The identifier of the chat message that the feedback was given for.
dict
The feedback usefulness value given by the user to the chat message.
comment (string) --
A comment given by an end user on the usefulness of an AI-generated chat message.
reason (string) --
The reason for a usefulness rating.
submittedAt (datetime) -- [REQUIRED]
The timestamp for when the feedback was submitted.
usefulness (string) -- [REQUIRED]
The usefulness value assigned by an end user to a message.
string
[REQUIRED]
The identifier of the user giving the feedback.
None
Adds the specified tag to the specified Amazon Q application or data source resource. If the tag already exists, the existing value is replaced with the new value.
See also: AWS API Documentation
Request Syntax
client.tag_resource( resourceARN='string', tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Amazon Q application or data source to tag.
list
[REQUIRED]
A list of tag keys to add to the Amazon Q application or data source. If a tag already exists, the existing value is replaced with the new value.
(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 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.
dict
Response Syntax
{}
Response Structure
(dict) --
Adds one or more documents to an Amazon Q index.
You use this API to:
ingest your structured and unstructured documents and documents stored in an Amazon S3 bucket into an Amazon Q index.
add custom attributes to documents in an Amazon Q index.
attach an access control list to the documents added to an Amazon Q 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', dataSourceSyncId='string', documents=[ { 'accessConfiguration': { 'accessControls': [ { 'memberRelation': 'AND'|'OR', 'principals': [ { 'group': { 'access': 'ALLOW'|'DENY', 'membershipType': 'INDEX'|'DATASOURCE', 'name': 'string' }, 'user': { 'access': 'ALLOW'|'DENY', 'id': 'string', 'membershipType': 'INDEX'|'DATASOURCE' } }, ] }, ], 'memberRelation': 'AND'|'OR' }, 'attributes': [ { 'name': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, ], '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', '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'documentContentOperator': 'DELETE', 'target': { 'attributeValueOperator': 'DELETE', 'key': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lambdaArn': 'string', 'roleArn': 'string', 's3BucketName': 'string' }, '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lambdaArn': 'string', 'roleArn': 'string', 's3BucketName': 'string' } }, 'id': 'string', 'title': 'string' }, ], indexId='string', roleArn='string' )
string
[REQUIRED]
The identifier of the Amazon Q application.
string
The identifier of the data source sync during which the documents were added.
list
[REQUIRED]
One or more documents to add to the index.
(dict) --
A document in an Amazon Q application.
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.
memberRelation (string) --
Describes the member relation within a principal list.
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 conversation responses.
group (dict) --
The group associated with the principal.
access (string) -- [REQUIRED]
Provides information about whether to allow or deny access to the principal.
membershipType (string) --
The type of group.
name (string) --
The name of the group.
user (dict) --
The user associated with the principal.
access (string) -- [REQUIRED]
Provides information about whether to allow or deny access to the principal.
id (string) --
The identifier of the user.
membershipType (string) --
The type of group.
memberRelation (string) --
Describes the member relation within the AccessControlList object.
attributes (list) --
Custom attributes to apply to the document for refining Amazon Q 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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 APIs. If you are calling the Amazon Q 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.
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.
(dict) --
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q.
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. 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 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
documentContentOperator (string) --
TRUE to delete content if the condition used for the target attribute is met.
target (dict) --
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q.
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 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 will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition.
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.
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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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).
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.
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.
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.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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).
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.
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.
id (string) -- [REQUIRED]
The identifier of the document.
title (string) --
The title of the document.
string
[REQUIRED]
The identifier of the Amazon Q index to add the documents to.
string
The Amazon Resource Name (ARN) of an IAM role with permission to access your S3 bucket.
dict
Response Syntax
{ 'failedDocuments': [ { 'dataSourceId': 'string', 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'id': 'string' }, ] }
Response Structure
(dict) --
failedDocuments (list) --
A list of documents that were not added to the Amazon Q 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 index. Each entry contains an error message that indicates why the document couldn't be removed from the index.
dataSourceId (string) --
The identifier of the Amazon Q data source connector that contains the failed document.
error (dict) --
An explanation for why the document couldn't be removed from the index.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
id (string) --
The identifier of the document that couldn't be removed from the Amazon Q index.
Creates a data source connector for an Amazon Q 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', clientToken='string', configuration={...}|[...]|123|123.4|'string'|True|None, description='string', displayName='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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'documentContentOperator': 'DELETE', 'target': { 'attributeValueOperator': 'DELETE', 'key': 'string', 'value': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lambdaArn': 'string', 'roleArn': 'string', 's3BucketName': 'string' }, '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': { 'dateValue': datetime(2015, 1, 1), 'longValue': 123, 'stringListValue': [ 'string', ], 'stringValue': 'string' } }, 'lambdaArn': 'string', 'roleArn': 'string', 's3BucketName': 'string' } }, indexId='string', roleArn='string', syncSchedule='string', tags=[ { 'key': 'string', 'value': 'string' }, ], vpcConfiguration={ 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } )
string
[REQUIRED]
The identifier of the Amazon Q application the data source will be attached to.
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.
:ref:`document<document>`
[REQUIRED]
Configuration information to connect to your data source repository. For configuration templates for your specific data source, see Supported connectors.
string
A description for the data source connector.
string
[REQUIRED]
A name for the data source connector.
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.
(dict) --
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q.
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. 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 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
documentContentOperator (string) --
TRUE to delete content if the condition used for the target attribute is met.
target (dict) --
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q.
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 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 will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition.
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.
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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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).
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.
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.
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.
You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents.
If you want to apply advanced alterations on the Amazon Q 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 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 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 Kendra 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.
dateValue (datetime) --
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
longValue (integer) --
A long integer value.
stringListValue (list) --
A list of strings.
(string) --
stringValue (string) --
A string.
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).
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.
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.
string
[REQUIRED]
The identifier of the index that you want to use with the data source connector.
string
The Amazon Resource Name (ARN) of an IAM role with permission to access the data source and required resources.
string
Sets the frequency for Amazon Q to check the documents in your data source repository and update your index. If you don't set a schedule, Amazon Q 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.
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 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.
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 connectors.
securityGroupIds (list) -- [REQUIRED]
A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Q to connect to the data source.
(string) --
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) --
dict
Response Syntax
{ 'dataSourceArn': 'string', 'dataSourceId': 'string' }
Response Structure
(dict) --
dataSourceArn (string) --
The Amazon Resource Name (ARN) of a data source in an Amazon Q application.
dataSourceId (string) --
The identifier of the data source connector.
Gets information about an existing retriever used by an Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.get_retriever( applicationId='string', retrieverId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application using the retriever.
string
[REQUIRED]
The identifier of the retriever.
dict
Response Syntax
{ 'applicationId': 'string', 'configuration': { 'kendraIndexConfiguration': { 'indexId': 'string' }, 'nativeIndexConfiguration': { 'indexId': 'string' } }, 'createdAt': datetime(2015, 1, 1), 'displayName': 'string', 'retrieverArn': 'string', 'retrieverId': 'string', 'roleArn': 'string', 'status': 'CREATING'|'ACTIVE'|'FAILED', 'type': 'NATIVE_INDEX'|'KENDRA_INDEX', 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
applicationId (string) --
The identifier of the Amazon Q application using the retriever.
configuration (dict) --
Provides information on how the retriever used for your Amazon Q application is configured.
kendraIndexConfiguration (dict) --
Provides information on how the Amazon Kendra index used as a retriever for your Amazon Q application is configured.
indexId (string) --
The identifier of the Amazon Kendra index.
nativeIndexConfiguration (dict) --
Provides information on how a Amazon Q index used as a retriever for your Amazon Q application is configured.
indexId (string) --
The identifier for the Amazon Q index.
createdAt (datetime) --
The Unix timestamp when the retriever was created.
displayName (string) --
The name of the retriever.
retrieverArn (string) --
The Amazon Resource Name (ARN) of the IAM role associated with the retriever.
retrieverId (string) --
The identifier of the retriever.
roleArn (string) --
The Amazon Resource Name (ARN) of the role with the permission to access the retriever and required resources.
status (string) --
The status of the retriever.
type (string) --
The type of the retriever.
updatedAt (datetime) --
The Unix timestamp when the retriever was last updated.
Updates an Amazon Q plugin.
See also: AWS API Documentation
Request Syntax
client.update_plugin( applicationId='string', authConfiguration={ 'basicAuthConfiguration': { 'roleArn': 'string', 'secretArn': 'string' }, 'oAuth2ClientCredentialConfiguration': { 'roleArn': 'string', 'secretArn': 'string' } }, displayName='string', pluginId='string', serverUrl='string', state='ENABLED'|'DISABLED' )
string
[REQUIRED]
The identifier of the application the plugin is attached to.
dict
The authentication configuration the plugin is using.
basicAuthConfiguration (dict) --
Information about the basic authentication credentials used to configure a plugin.
roleArn (string) -- [REQUIRED]
The ARN of an IAM role used by Amazon Q to access the basic authentication credentials stored in a Secrets Manager secret.
secretArn (string) -- [REQUIRED]
The ARN of the Secrets Manager secret that stores the basic authentication credentials used for plugin configuration..
oAuth2ClientCredentialConfiguration (dict) --
Information about the OAuth 2.0 authentication credential/token used to configure a plugin.
roleArn (string) -- [REQUIRED]
The ARN of an IAM role used by Amazon Q to access the OAuth 2.0 authentication credentials stored in a Secrets Manager secret.
secretArn (string) -- [REQUIRED]
The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token used for plugin configuration.
string
The name of the plugin.
string
[REQUIRED]
The identifier of the plugin.
string
The source URL used for plugin configuration.
string
The status of the plugin.
dict
Response Syntax
{}
Response Structure
(dict) --
Gets a list of tags associated with a specified resource. Amazon Q applications and data sources can have tags associated with them.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( resourceARN='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the Amazon Q application or data source to get a list of tags for.
dict
Response Syntax
{ 'tags': [ { 'key': 'string', 'value': 'string' }, ] }
Response Structure
(dict) --
tags (list) --
A list of tags associated with the Amazon Q application or data source.
(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) --
The key for the tag. Keys are not case sensitive and must be unique for the Amazon Q application or data source.
value (string) --
The value associated with the tag. The value may be an empty string but it can't be null.
Get information about an Amazon Q data source connector synchronization.
See also: AWS API Documentation
Request Syntax
client.list_data_source_sync_jobs( applicationId='string', dataSourceId='string', endTime=datetime(2015, 1, 1), indexId='string', maxResults=123, nextToken='string', startTime=datetime(2015, 1, 1), statusFilter='FAILED'|'SUCCEEDED'|'SYNCING'|'INCOMPLETE'|'STOPPING'|'ABORTED'|'SYNCING_INDEXING' )
string
[REQUIRED]
The identifier of the Amazon Q application connected to the data source.
string
[REQUIRED]
The identifier of the data source connector.
datetime
The end time of the data source connector sync.
string
[REQUIRED]
The identifier of the index used with the Amazon Q data source connector.
integer
The maximum number of synchronization jobs to return in the response.
string
If the maxResults response was incpmplete because there is more data to retriever, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of responses.
datetime
The start time of the data source connector sync.
string
Only returns synchronization jobs with the Status field equal to the specified status.
dict
Response Syntax
{ 'history': [ { 'dataSourceErrorCode': 'string', 'endTime': datetime(2015, 1, 1), 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'executionId': 'string', 'metrics': { 'documentsAdded': 'string', 'documentsDeleted': 'string', 'documentsFailed': 'string', 'documentsModified': 'string', 'documentsScanned': 'string' }, 'startTime': datetime(2015, 1, 1), 'status': 'FAILED'|'SUCCEEDED'|'SYNCING'|'INCOMPLETE'|'STOPPING'|'ABORTED'|'SYNCING_INDEXING' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
history (list) --
A history of synchronization jobs for the data source connector.
(dict) --
Provides information about an Amazon Q data source connector synchronization job.
dataSourceErrorCode (string) --
If the reason that the synchronization failed is due to an error with the underlying data source, this field contains a code that identifies the error.
endTime (datetime) --
The Unix timestamp when the synchronization job completed.
error (dict) --
If the Status field is set to FAILED, the ErrorCode field indicates the reason the synchronization failed.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
executionId (string) --
The identifier of a data source synchronization job.
metrics (dict) --
Maps a batch delete document request to a specific data source sync job. This is optional and should only be supplied when documents are deleted by a data source connector.
documentsAdded (string) --
The current count of documents added from the data source during the data source sync.
documentsDeleted (string) --
The current count of documents deleted from the data source during the data source sync.
documentsFailed (string) --
The current count of documents that failed to sync from the data source during the data source sync.
documentsModified (string) --
The current count of documents modified in the data source during the data source sync.
documentsScanned (string) --
The current count of documents crawled by the ongoing sync job in the data source.
startTime (datetime) --
The Unix time stamp when the data source synchronization job started.
status (string) --
The status of the synchronization job. When the Status field is set to SUCCEEDED, the synchronization job is done. If the status code is FAILED, the ErrorCode and ErrorMessage fields give you the reason for the failure.
nextToken (string) --
If the response is truncated, Amazon Q returns this token. You can use this token in any subsequent request to retrieve the next set of jobs.
Updates an set of chat controls configured for an existing Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.update_chat_controls_configuration( applicationId='string', blockedPhrasesConfigurationUpdate={ 'blockedPhrasesToCreateOrUpdate': [ 'string', ], 'blockedPhrasesToDelete': [ 'string', ], 'systemMessageOverride': 'string' }, clientToken='string', responseScope='ENTERPRISE_CONTENT_ONLY'|'EXTENDED_KNOWLEDGE_ENABLED', topicConfigurationsToCreateOrUpdate=[ { 'description': 'string', 'exampleChatMessages': [ 'string', ], 'name': 'string', 'rules': [ { 'excludedUsersAndGroups': { 'userGroups': [ 'string', ], 'userIds': [ 'string', ] }, 'includedUsersAndGroups': { 'userGroups': [ 'string', ], 'userIds': [ 'string', ] }, 'ruleConfiguration': { 'contentBlockerRule': { 'systemMessageOverride': 'string' }, 'contentRetrievalRule': { 'eligibleDataSources': [ { 'dataSourceId': 'string', 'indexId': 'string' }, ] } }, 'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE' }, ] }, ], topicConfigurationsToDelete=[ { 'description': 'string', 'exampleChatMessages': [ 'string', ], 'name': 'string', 'rules': [ { 'excludedUsersAndGroups': { 'userGroups': [ 'string', ], 'userIds': [ 'string', ] }, 'includedUsersAndGroups': { 'userGroups': [ 'string', ], 'userIds': [ 'string', ] }, 'ruleConfiguration': { 'contentBlockerRule': { 'systemMessageOverride': 'string' }, 'contentRetrievalRule': { 'eligibleDataSources': [ { 'dataSourceId': 'string', 'indexId': 'string' }, ] } }, 'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE' }, ] }, ] )
string
[REQUIRED]
The identifier of the application for which the chat controls are configured.
dict
The phrases blocked from chat by your chat control configuration.
blockedPhrasesToCreateOrUpdate (list) --
Creates or updates a blocked phrases configuration in your Amazon Q application.
(string) --
blockedPhrasesToDelete (list) --
Deletes a blocked phrases configuration in your Amazon Q application.
(string) --
systemMessageOverride (string) --
The configured custom message displayed to your end user when they use blocked phrase during chat.
string
A token that you provide to identify the request to update a Amazon Q application chat configuration.
This field is autopopulated if not provided.
string
The response scope configured for your application. This determines whether your application uses its retrieval augmented generation (RAG) system to generate answers only from your enterprise data, or also uses the large language models (LLM) knowledge to respons to end user questions in chat.
list
The configured topic specific chat controls you want to update.
(dict) --
The topic specific controls configured for an Amazon Q application.
description (string) --
A description for your topic control configuration. Use this outline how the large language model (LLM) should use this topic control configuration.
exampleChatMessages (list) --
A list of example phrases that you expect the end user to use in relation to the topic.
(string) --
name (string) -- [REQUIRED]
A name for your topic control configuration.
rules (list) -- [REQUIRED]
Rules defined for a topic configuration.
(dict) --
Guardrail rules for an Amazon Q application. Amazon Q supports only one rule at a time.
excludedUsersAndGroups (dict) --
Users and groups to be excluded from a rule.
userGroups (list) --
The user groups associated with a topic control rule.
(string) --
userIds (list) --
The user ids associated with a topic control rule.
(string) --
includedUsersAndGroups (dict) --
Users and groups to be included in a rule.
userGroups (list) --
The user groups associated with a topic control rule.
(string) --
userIds (list) --
The user ids associated with a topic control rule.
(string) --
ruleConfiguration (dict) --
The configuration information for a rule.
contentBlockerRule (dict) --
A rule for configuring how Amazon Q responds when it encounters a a blocked topic.
systemMessageOverride (string) --
The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.
contentRetrievalRule (dict) --
Rules for retrieving content from data sources connected to a Amazon Q application for a specific topic control configuration.
eligibleDataSources (list) --
Specifies data sources in a Amazon Q application to use for content generation.
(dict) --
The identifier of the data source Amazon Q will generate responses from.
dataSourceId (string) --
The identifier of the data source.
indexId (string) --
The identifier of the index the data source is attached to.
ruleType (string) -- [REQUIRED]
The type fo rule.
list
The configured topic specific chat controls you want to delete.
(dict) --
The topic specific controls configured for an Amazon Q application.
description (string) --
A description for your topic control configuration. Use this outline how the large language model (LLM) should use this topic control configuration.
exampleChatMessages (list) --
A list of example phrases that you expect the end user to use in relation to the topic.
(string) --
name (string) -- [REQUIRED]
A name for your topic control configuration.
rules (list) -- [REQUIRED]
Rules defined for a topic configuration.
(dict) --
Guardrail rules for an Amazon Q application. Amazon Q supports only one rule at a time.
excludedUsersAndGroups (dict) --
Users and groups to be excluded from a rule.
userGroups (list) --
The user groups associated with a topic control rule.
(string) --
userIds (list) --
The user ids associated with a topic control rule.
(string) --
includedUsersAndGroups (dict) --
Users and groups to be included in a rule.
userGroups (list) --
The user groups associated with a topic control rule.
(string) --
userIds (list) --
The user ids associated with a topic control rule.
(string) --
ruleConfiguration (dict) --
The configuration information for a rule.
contentBlockerRule (dict) --
A rule for configuring how Amazon Q responds when it encounters a a blocked topic.
systemMessageOverride (string) --
The configured custom message displayed to an end user informing them that they've used a blocked phrase during chat.
contentRetrievalRule (dict) --
Rules for retrieving content from data sources connected to a Amazon Q application for a specific topic control configuration.
eligibleDataSources (list) --
Specifies data sources in a Amazon Q application to use for content generation.
(dict) --
The identifier of the data source Amazon Q will generate responses from.
dataSourceId (string) --
The identifier of the data source.
indexId (string) --
The identifier of the index the data source is attached to.
ruleType (string) -- [REQUIRED]
The type fo rule.
dict
Response Syntax
{}
Response Structure
(dict) --
Provides a list of groups that are mapped to users.
See also: AWS API Documentation
Request Syntax
client.list_groups( applicationId='string', dataSourceId='string', indexId='string', maxResults=123, nextToken='string', updatedEarlierThan=datetime(2015, 1, 1) )
string
[REQUIRED]
The identifier of the application for getting a list of groups mapped to users.
string
The identifier of the data source for getting a list of groups mapped to users.
string
[REQUIRED]
The identifier of the index for getting a list of groups mapped to users.
integer
The maximum number of returned groups that are mapped to users.
string
If the previous response was incomplete (because there is more data to retrieve), Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of groups that are mapped to users.
datetime
[REQUIRED]
The timestamp identifier used for the latest PUT or DELETE action for mapping users to their groups.
dict
Response Syntax
{ 'items': [ { 'groupName': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
items (list) --
Summary information for list of groups that are mapped to users.
(dict) --
Summary information for groups.
groupName (string) --
The name of the group the summary information is for.
nextToken (string) --
If the response is truncated, Amazon Q returns this token that you can use in the subsequent request to retrieve the next set of groups that are mapped to users.
Deletes a group so that all users and sub groups that belong to the group can no longer access documents only available to that group. For example, after deleting the group "Summer Interns", all interns who belonged to that group no longer see intern-only documents in their chat results.
If you want to delete, update, or replace users or sub groups of a group, you need to use the PutGroup operation. For example, if a user in the group "Engineering" leaves the engineering team and another user takes their place, you provide an updated list of users or sub groups that belong to the "Engineering" group when calling PutGroup.
See also: AWS API Documentation
Request Syntax
client.delete_group( applicationId='string', dataSourceId='string', groupName='string', indexId='string' )
string
[REQUIRED]
The identifier of the application in which the group mapping belongs.
string
The identifier of the data source linked to the group
A group can be tied to multiple data sources. You can delete a group from accessing documents in a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. You want to delete "Research" and "Engineering" groups from Salesforce, so that these groups cannot access customer-related documents stored in Salesforce. Only "Sales and Marketing" should access documents in the Salesforce data source.
string
[REQUIRED]
The name of the group you want to delete.
string
[REQUIRED]
The identifier of the index you want to delete the group from.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes an Amazon Q web experience.
See also: AWS API Documentation
Request Syntax
client.delete_web_experience( applicationId='string', webExperienceId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application linked to the Amazon Q web experience.
string
[REQUIRED]
The identifier of the Amazon Q web experience being deleted.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates an Amazon Q plugin.
See also: AWS API Documentation
Request Syntax
client.create_plugin( applicationId='string', authConfiguration={ 'basicAuthConfiguration': { 'roleArn': 'string', 'secretArn': 'string' }, 'oAuth2ClientCredentialConfiguration': { 'roleArn': 'string', 'secretArn': 'string' } }, clientToken='string', displayName='string', serverUrl='string', tags=[ { 'key': 'string', 'value': 'string' }, ], type='SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK' )
string
[REQUIRED]
The identifier of the application that will contain the plugin.
dict
[REQUIRED]
Authentication configuration information for an Amazon Q plugin.
basicAuthConfiguration (dict) --
Information about the basic authentication credentials used to configure a plugin.
roleArn (string) -- [REQUIRED]
The ARN of an IAM role used by Amazon Q to access the basic authentication credentials stored in a Secrets Manager secret.
secretArn (string) -- [REQUIRED]
The ARN of the Secrets Manager secret that stores the basic authentication credentials used for plugin configuration..
oAuth2ClientCredentialConfiguration (dict) --
Information about the OAuth 2.0 authentication credential/token used to configure a plugin.
roleArn (string) -- [REQUIRED]
The ARN of an IAM role used by Amazon Q to access the OAuth 2.0 authentication credentials stored in a Secrets Manager secret.
secretArn (string) -- [REQUIRED]
The ARN of the Secrets Manager secret that stores the OAuth 2.0 credentials/token used for plugin configuration.
string
A token that you provide to identify the request to create your Amazon Q plugin.
This field is autopopulated if not provided.
string
[REQUIRED]
A the name for your plugin.
string
[REQUIRED]
The source URL used for plugin configuration.
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 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
[REQUIRED]
The type of plugin you want to create.
dict
Response Syntax
{ 'pluginArn': 'string', 'pluginId': 'string' }
Response Structure
(dict) --
pluginArn (string) --
The Amazon Resource Name (ARN) of a plugin.
pluginId (string) --
The identifier of the plugin created.
Creates an Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.create_application( attachmentsConfiguration={ 'attachmentsControlMode': 'ENABLED'|'DISABLED' }, clientToken='string', description='string', displayName='string', encryptionConfiguration={ 'kmsKeyId': 'string' }, roleArn='string', tags=[ { 'key': 'string', 'value': 'string' }, ] )
dict
An option to allow end users to upload files directly during chat.
attachmentsControlMode (string) -- [REQUIRED]
Status information about whether file upload functionality is activated or deactivated for your end user.
string
A token that you provide to identify the request to create your Amazon Q application.
This field is autopopulated if not provided.
string
A description for the Amazon Q application.
string
[REQUIRED]
A name for the Amazon Q application.
dict
The identifier of the KMS key that is used to encrypt your data. Amazon Q doesn't support asymmetric keys.
kmsKeyId (string) --
The identifier of the KMS key. Amazon Q doesn't support asymmetric keys.
string
[REQUIRED]
The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon CloudWatch logs and metrics.
list
A list of key-value pairs that identify or categorize your Amazon Q application. You can also use tags to help control access to the application. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
(dict) --
A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and values can consist of Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @.
key (string) -- [REQUIRED]
The key for the tag. Keys are not case sensitive and must be unique for the Amazon Q 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.
dict
Response Syntax
{ 'applicationArn': 'string', 'applicationId': 'string' }
Response Structure
(dict) --
applicationArn (string) --
The Amazon Resource Name (ARN) of the Amazon Q application.
applicationId (string) --
The identifier of the Amazon Q application.
Deletes an Amazon Q plugin.
See also: AWS API Documentation
Request Syntax
client.delete_plugin( applicationId='string', pluginId='string' )
string
[REQUIRED]
The identifier the application attached to the Amazon Q plugin.
string
[REQUIRED]
The identifier of the plugin being deleted.
dict
Response Syntax
{}
Response Structure
(dict) --
Gets a list of messages associated with an Amazon Q web experience.
See also: AWS API Documentation
Request Syntax
client.list_messages( applicationId='string', conversationId='string', maxResults=123, nextToken='string', userId='string' )
string
[REQUIRED]
The identifier for the Amazon Q application.
string
[REQUIRED]
The identifier of the Amazon Q web experience conversation.
integer
The maximum number of messages to return.
string
If the number of retrievers returned exceeds maxResults, Amazon Q returns a next token as a pagination token to retrieve the next set of messages.
string
[REQUIRED]
The identifier of the user involved in the Amazon Q web experience conversation.
dict
Response Syntax
{ 'messages': [ { 'actionExecution': { 'payload': { 'string': { 'value': {...}|[...]|123|123.4|'string'|True|None } }, 'payloadFieldNameSeparator': 'string', 'pluginId': 'string' }, 'actionReview': { 'payload': { 'string': { 'allowedValues': [ { 'displayValue': {...}|[...]|123|123.4|'string'|True|None, 'value': {...}|[...]|123|123.4|'string'|True|None }, ], 'displayName': 'string', 'displayOrder': 123, 'required': True|False, 'type': 'STRING'|'NUMBER'|'ARRAY'|'BOOLEAN', 'value': {...}|[...]|123|123.4|'string'|True|None } }, 'payloadFieldNameSeparator': 'string', 'pluginId': 'string', 'pluginType': 'SERVICE_NOW'|'SALESFORCE'|'JIRA'|'ZENDESK' }, 'attachments': [ { 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'name': 'string', 'status': 'FAILED'|'SUCCEEDED' }, ], 'body': 'string', 'messageId': 'string', 'sourceAttribution': [ { 'citationNumber': 123, 'snippet': 'string', 'textMessageSegments': [ { 'beginOffset': 123, 'endOffset': 123 }, ], 'title': 'string', 'updatedAt': datetime(2015, 1, 1), 'url': 'string' }, ], 'time': datetime(2015, 1, 1), 'type': 'USER'|'SYSTEM' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
messages (list) --
An array of information on one or more messages.
(dict) --
A message in an Amazon Q web experience.
actionExecution (dict) --
Performs an Amazon Q plugin action during a non-streaming chat conversation.
payload (dict) --
A mapping of field names to the field values in input that an end user provides to Amazon Q 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.
pluginId (string) --
The identifier of the plugin the action is attached to.
actionReview (dict) --
An output event that Amazon Q 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.
payload (dict) --
Field values that an end user needs to provide to Amazon Q for Amazon Q to perform the requested plugin action.
(string) --
(dict) --
A user input field in an plugin action review payload.
allowedValues (list) --
Information about the field values that an end user can use to provide to Amazon Q for Amazon Q to perform the requested plugin action.
(dict) --
Information about the field values that an end user can use to provide to Amazon Q for Amazon Q to perform the requested plugin action.
displayValue (:ref:`document<document>`) --
The name of the field.
value (:ref:`document<document>`) --
The field value.
displayName (string) --
The name of the field.
displayOrder (integer) --
The display order of fields in a payload.
required (boolean) --
Information about whether the field is required.
type (string) --
The type of field.
value (:ref:`document<document>`) --
The field value.
payloadFieldNameSeparator (string) --
A string used to retain information about the hierarchical contexts within an action review payload.
pluginId (string) --
The identifier of the plugin associated with the action review.
pluginType (string) --
The type of plugin.
attachments (list) --
A file directly uploaded into an Amazon Q web experience chat.
(dict) --
The details of a file uploaded during chat.
error (dict) --
An error associated with a file uploaded during chat.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
name (string) --
The name of a file uploaded during chat.
status (string) --
The status of a file uploaded during chat.
body (string) --
The content of the Amazon Q web experience message.
messageId (string) --
The identifier of the Amazon Q web experience message.
sourceAttribution (list) --
The source documents used to generate Amazon Q web experience message.
(dict) --
The documents used to generate an Amazon Q web experience response.
citationNumber (integer) --
The number attached to a citation in an Amazon Q generated response.
snippet (string) --
The content extract from the document on which the generated response is based.
textMessageSegments (list) --
A text extract from a source document that is used for source attribution.
(dict) --
Provides information about a text extract in a chat response that can be attributed to a source document.
beginOffset (integer) --
The zero-based location in the response string where the source attribution starts.
endOffset (integer) --
The zero-based location in the response string where the source attribution ends.
title (string) --
The title of the document which is the source for the Amazon Q generated response.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q application was last updated.
url (string) --
The URL of the document which is the source for the Amazon Q generated response.
time (datetime) --
The timestamp of the first Amazon Q web experience message.
type (string) --
The type of Amazon Q message, whether HUMAN or AI generated.
nextToken (string) --
If the response is truncated, Amazon Q returns this token, which you can use in a later request to list the next set of messages.
Updates a information associated with a user id.
See also: AWS API Documentation
Request Syntax
client.update_user( applicationId='string', userAliasesToDelete=[ { 'dataSourceId': 'string', 'indexId': 'string', 'userId': 'string' }, ], userAliasesToUpdate=[ { 'dataSourceId': 'string', 'indexId': 'string', 'userId': 'string' }, ], userId='string' )
string
[REQUIRED]
The identifier of the application the user is attached to.
list
The user aliases attached to the user id that are to be deleted.
(dict) --
Aliases attached to a user id within an Amazon Q application.
dataSourceId (string) --
The identifier of the data source that the user aliases are associated with.
indexId (string) --
The identifier of the index that the user aliases are associated with.
userId (string) -- [REQUIRED]
The identifier of the user id associated with the user aliases.
list
The user aliases attached to the user id that are to be updated.
(dict) --
Aliases attached to a user id within an Amazon Q application.
dataSourceId (string) --
The identifier of the data source that the user aliases are associated with.
indexId (string) --
The identifier of the index that the user aliases are associated with.
userId (string) -- [REQUIRED]
The identifier of the user id associated with the user aliases.
string
[REQUIRED]
The email id attached to the user.
dict
Response Syntax
{ 'userAliasesAdded': [ { 'dataSourceId': 'string', 'indexId': 'string', 'userId': 'string' }, ], 'userAliasesDeleted': [ { 'dataSourceId': 'string', 'indexId': 'string', 'userId': 'string' }, ], 'userAliasesUpdated': [ { 'dataSourceId': 'string', 'indexId': 'string', 'userId': 'string' }, ] }
Response Structure
(dict) --
userAliasesAdded (list) --
The user aliases that have been to be added to a user id.
(dict) --
Aliases attached to a user id within an Amazon Q application.
dataSourceId (string) --
The identifier of the data source that the user aliases are associated with.
indexId (string) --
The identifier of the index that the user aliases are associated with.
userId (string) --
The identifier of the user id associated with the user aliases.
userAliasesDeleted (list) --
The user aliases that have been deleted from a user id.
(dict) --
Aliases attached to a user id within an Amazon Q application.
dataSourceId (string) --
The identifier of the data source that the user aliases are associated with.
indexId (string) --
The identifier of the index that the user aliases are associated with.
userId (string) --
The identifier of the user id associated with the user aliases.
userAliasesUpdated (list) --
The user aliases attached to a user id that have been updated.
(dict) --
Aliases attached to a user id within an Amazon Q application.
dataSourceId (string) --
The identifier of the data source that the user aliases are associated with.
indexId (string) --
The identifier of the index that the user aliases are associated with.
userId (string) --
The identifier of the user id associated with the user aliases.
Creates an Amazon Q web experience.
See also: AWS API Documentation
Request Syntax
client.create_web_experience( applicationId='string', clientToken='string', samplePromptsControlMode='ENABLED'|'DISABLED', subtitle='string', tags=[ { 'key': 'string', 'value': 'string' }, ], title='string', welcomeMessage='string' )
string
[REQUIRED]
The identifier of the Amazon Q web experience.
string
A token you provide to identify a request to create an Amazon Q web experience.
This field is autopopulated if not provided.
string
Determines whether sample prompts are enabled in the web experience for an end user.
string
A subtitle to personalize your Amazon Q web experience.
list
A list of key-value pairs that identify or categorize your Amazon Q 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 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
The title for your Amazon Q web experience.
string
The customized welcome message for end users of an Amazon Q web experience.
dict
Response Syntax
{ 'webExperienceArn': 'string', 'webExperienceId': 'string' }
Response Structure
(dict) --
webExperienceArn (string) --
The Amazon Resource Name (ARN) of an Amazon Q web experience.
webExperienceId (string) --
The identifier of the Amazon Q web experience.
Gets information about an existing Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.get_application( applicationId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application.
dict
Response Syntax
{ 'applicationArn': 'string', 'applicationId': 'string', 'attachmentsConfiguration': { 'attachmentsControlMode': 'ENABLED'|'DISABLED' }, 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'displayName': 'string', 'encryptionConfiguration': { 'kmsKeyId': 'string' }, 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'roleArn': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING', 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
applicationArn (string) --
The Amazon Resource Name (ARN) of the Amazon Q application.
applicationId (string) --
The identifier of the Amazon Q application.
attachmentsConfiguration (dict) --
Settings for whether end users can upload files directly during chat.
attachmentsControlMode (string) --
Information about whether file upload during chat functionality is activated for your application.
createdAt (datetime) --
The Unix timestamp when the Amazon Q application was last updated.
description (string) --
A description for the Amazon Q application.
displayName (string) --
The name of the Amazon Q application.
encryptionConfiguration (dict) --
The identifier of the Amazon Web Services KMS key that is used to encrypt your data. Amazon Q doesn't support asymmetric keys.
kmsKeyId (string) --
The identifier of the KMS key. Amazon Q doesn't support asymmetric keys.
error (dict) --
If the Status field is set to ERROR, the ErrorMessage field contains a description of the error that caused the synchronization to fail.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM with permissions to access your CloudWatch logs and metrics.
status (string) --
The status of the Amazon Q application.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q application was last updated.
Updates an Amazon Q index.
See also: AWS API Documentation
Request Syntax
client.update_index( applicationId='string', capacityConfiguration={ 'units': 123 }, description='string', displayName='string', documentAttributeConfigurations=[ { 'name': 'string', 'search': 'ENABLED'|'DISABLED', 'type': 'STRING'|'STRING_LIST'|'NUMBER'|'DATE' }, ], indexId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application connected to the index.
dict
The storage capacity units you want to provision for your Amazon Q index. You can add and remove capacity to fit your usage needs.
units (integer) --
The number of storage units configured for an Amazon Q index.
string
The description of the Amazon Q index.
string
The name of the Amazon Q index.
list
Configuration information for document metadata or fields. Document metadata are fields or attributes associated with your documents. For example, the company department name associated with each document. For more information, see Understanding document attributes.
(dict) --
Configuration information for document attributes. Document attributes are metadata or fields associated with your documents. For example, the company department name associated with each document.
For more information, see Understanding document attributes.
name (string) --
The name of the document attribute.
search (string) --
Information about whether the document attribute can be used by an end user to search for information on their web experience.
type (string) --
The type of document attribute.
string
[REQUIRED]
The identifier of the Amazon Q index.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists the Amazon Q data source connectors that you have created.
See also: AWS API Documentation
Request Syntax
client.list_data_sources( applicationId='string', indexId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the Amazon Q application linked to the data source connectors.
string
[REQUIRED]
The identifier of the index used with one or more data source connectors.
integer
The maximum number of data source connectors to return.
string
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q data source connectors.
dict
Response Syntax
{ 'dataSources': [ { 'createdAt': datetime(2015, 1, 1), 'dataSourceId': 'string', 'displayName': 'string', 'status': 'PENDING_CREATION'|'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING', 'type': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
dataSources (list) --
An array of summary information for one or more data source connector.
(dict) --
A data source in an Amazon Q application.
createdAt (datetime) --
The Unix timestamp when the Amazon Q data source was created.
dataSourceId (string) --
The identifier of the Amazon Q data source.
displayName (string) --
The name of the Amazon Q data source.
status (string) --
The status of the Amazon Q data source.
type (string) --
The type of the Amazon Q data source.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q data source was last updated.
nextToken (string) --
If the response is truncated, Amazon Q returns this token. You can use this token in a subsequent request to retrieve the next set of data source connectors.
Gets information about an existing Amazon Q index.
See also: AWS API Documentation
Request Syntax
client.get_index( applicationId='string', indexId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application connected to the index.
string
[REQUIRED]
The identifier of the Amazon Q index you want information on.
dict
Response Syntax
{ 'applicationId': 'string', 'capacityConfiguration': { 'units': 123 }, 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'displayName': 'string', 'documentAttributeConfigurations': [ { 'name': 'string', 'search': 'ENABLED'|'DISABLED', 'type': 'STRING'|'STRING_LIST'|'NUMBER'|'DATE' }, ], 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'indexArn': 'string', 'indexId': 'string', 'indexStatistics': { 'textDocumentStatistics': { 'indexedTextBytes': 123, 'indexedTextDocumentCount': 123 } }, 'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'UPDATING', 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
applicationId (string) --
The identifier of the Amazon Q application associated with the index.
capacityConfiguration (dict) --
The storage capacity units chosen for your Amazon Q index.
units (integer) --
The number of storage units configured for an Amazon Q index.
createdAt (datetime) --
The Unix timestamp when the Amazon Q index was created.
description (string) --
The description for the Amazon Q index.
displayName (string) --
The name of the Amazon Q index.
documentAttributeConfigurations (list) --
Configuration information for document attributes or metadata. Document metadata are fields associated with your documents. For example, the company department name associated with each document. For more information, see Understanding document attributes.
(dict) --
Configuration information for document attributes. Document attributes are metadata or fields associated with your documents. For example, the company department name associated with each document.
For more information, see Understanding document attributes.
name (string) --
The name of the document attribute.
search (string) --
Information about whether the document attribute can be used by an end user to search for information on their web experience.
type (string) --
The type of document attribute.
error (dict) --
When the Status field value is FAILED, the ErrorMessage field contains a message that explains why.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
indexArn (string) --
The Amazon Resource Name (ARN) of the Amazon Q index.
indexId (string) --
The identifier of the Amazon Q index.
indexStatistics (dict) --
Provides information about the number of documents indexed.
textDocumentStatistics (dict) --
The number of documents indexed.
indexedTextBytes (integer) --
The total size, in bytes, of the indexed documents.
indexedTextDocumentCount (integer) --
The number of text documents indexed.
status (string) --
The current status of the index. When the value is ACTIVE, the index is ready for use. If the Status field value is FAILED, the ErrorMessage field contains a message that explains why.
updatedAt (datetime) --
The Unix timestamp when the Amazon Q index was last updated.
Creates an Amazon Q index.
To determine if index creation has completed, check the Status field returned from a call to DescribeIndex. The Status field is set to ACTIVE when the index is ready to use.
Once the index is active, you can index your documents using the BatchPutDocument API or the CreateDataSource API.
See also: AWS API Documentation
Request Syntax
client.create_index( applicationId='string', capacityConfiguration={ 'units': 123 }, clientToken='string', description='string', displayName='string', tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
The identifier of the Amazon Q application using the index.
dict
The capacity units you want to provision for your index. You can add and remove capacity to fit your usage needs.
units (integer) --
The number of storage units configured for an Amazon Q index.
string
A token that you provide to identify the request to create an index. Multiple calls to the CreateIndex API with the same client token will create only one index.
This field is autopopulated if not provided.
string
A description for the Amazon Q index.
string
[REQUIRED]
A name for the Amazon Q index.
list
A list of key-value pairs that identify or categorize the index. You can also use tags to help control access to the index. 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 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.
dict
Response Syntax
{ 'indexArn': 'string', 'indexId': 'string' }
Response Structure
(dict) --
indexArn (string) --
The Amazon Resource Name (ARN) of an Amazon Q index.
indexId (string) --
The identifier for the Amazon Q index.
Lists the retriever used by an Amazon Q application.
See also: AWS API Documentation
Request Syntax
client.list_retrievers( applicationId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the Amazon Q application using the retriever.
integer
The maximum number of retrievers returned.
string
If the number of retrievers returned exceeds maxResults, Amazon Q returns a next token as a pagination token to retrieve the next set of retrievers.
dict
Response Syntax
{ 'nextToken': 'string', 'retrievers': [ { 'applicationId': 'string', 'displayName': 'string', 'retrieverId': 'string', 'status': 'CREATING'|'ACTIVE'|'FAILED', 'type': 'NATIVE_INDEX'|'KENDRA_INDEX' }, ] }
Response Structure
(dict) --
nextToken (string) --
If the response is truncated, Amazon Q returns this token, which you can use in a later request to list the next set of retrievers.
retrievers (list) --
An array of summary information for one or more retrievers.
(dict) --
Summary information for the retriever used for your Amazon Q application.
applicationId (string) --
The identifier of the Amazon Q application using the retriever.
displayName (string) --
The name of your retriever.
retrieverId (string) --
The identifier of the retriever used by your Amazon Q application.
status (string) --
The status of your retriever.
type (string) --
The type of your retriever.
Lists one or more Amazon Q conversations.
See also: AWS API Documentation
Request Syntax
client.list_conversations( applicationId='string', maxResults=123, nextToken='string', userId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application.
integer
The maximum number of Amazon Q conversations to return.
string
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q conversations.
string
[REQUIRED]
The identifier of the user involved in the Amazon Q web experience conversation.
dict
Response Syntax
{ 'conversations': [ { 'conversationId': 'string', 'startTime': datetime(2015, 1, 1), 'title': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
conversations (list) --
An array of summary information on the configuration of one or more Amazon Q web experiences.
(dict) --
A conversation in an Amazon Q application.
conversationId (string) --
The identifier of the Amazon Q conversation.
startTime (datetime) --
The start time of the conversation.
title (string) --
The title of the conversation.
nextToken (string) --
If the response is truncated, Amazon Q returns this token, which you can use in a later request to list the next set of messages.
Lists one or more Amazon Q Web Experiences.
See also: AWS API Documentation
Request Syntax
client.list_web_experiences( applicationId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the Amazon Q application linked to the listed web experiences.
integer
The maximum number of Amazon Q Web Experiences to return.
string
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q conversations.
dict
Response Syntax
{ 'nextToken': 'string', 'webExperiences': [ { 'createdAt': datetime(2015, 1, 1), 'defaultEndpoint': 'string', 'status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED'|'PENDING_AUTH_CONFIG', 'updatedAt': datetime(2015, 1, 1), 'webExperienceId': 'string' }, ] }
Response Structure
(dict) --
nextToken (string) --
If the response is truncated, Amazon Q returns this token, which you can use in a later request to list the next set of messages.
webExperiences (list) --
An array of summary information for one or more Amazon Q experiences.
(dict) --
Provides information for an Amazon Q web experience.
createdAt (datetime) --
The Unix timestamp when the Amazon Q application was last updated.
defaultEndpoint (string) --
The endpoint URLs for your Amazon Q web experience. The URLs are unique and fully hosted by Amazon Web Services.
status (string) --
The status of your Amazon Q web experience.
updatedAt (datetime) --
The Unix timestamp when your Amazon Q web experience was updated.
webExperienceId (string) --
The identifier of your Amazon Q web experience.
Describes the universally unique identifier (UUID) associated with a local user in a data source.
See also: AWS API Documentation
Request Syntax
client.get_user( applicationId='string', userId='string' )
string
[REQUIRED]
The identifier of the application connected to the user.
string
[REQUIRED]
The user email address attached to the user.
dict
Response Syntax
{ 'userAliases': [ { 'dataSourceId': 'string', 'indexId': 'string', 'userId': 'string' }, ] }
Response Structure
(dict) --
userAliases (list) --
A list of user aliases attached to a user.
(dict) --
Aliases attached to a user id within an Amazon Q application.
dataSourceId (string) --
The identifier of the data source that the user aliases are associated with.
indexId (string) --
The identifier of the index that the user aliases are associated with.
userId (string) --
The identifier of the user id associated with the user aliases.
Updates an Amazon Q web experience.
See also: AWS API Documentation
Request Syntax
client.update_web_experience( applicationId='string', authenticationConfiguration={ 'samlConfiguration': { 'metadataXML': 'string', 'roleArn': 'string', 'userGroupAttribute': 'string', 'userIdAttribute': 'string' } }, samplePromptsControlMode='ENABLED'|'DISABLED', subtitle='string', title='string', webExperienceId='string', welcomeMessage='string' )
string
[REQUIRED]
The identifier of the Amazon Q application attached to the web experience.
dict
The authentication configuration of the Amazon Q web experience.
samlConfiguration (dict) --
Provides the SAML 2.0 compliant identity provider (IdP) configuration information Amazon Q needs to deploy a Amazon Q 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 web experience, containing the relevant Amazon Q permissions for conversing with Amazon Q.
userGroupAttribute (string) --
The group attribute name in your IdP that maps to user groups.
userIdAttribute (string) -- [REQUIRED]
The user attribute name in your IdP that maps to the user email.
string
Determines whether sample prompts are enabled in the web experience for an end user.
string
The subtitle of the Amazon Q web experience.
string
The title of the Amazon Q web experience.
string
[REQUIRED]
The identifier of the Amazon Q web experience.
string
A customized welcome message for an end user in an Amazon Q web experience.
dict
Response Syntax
{}
Response Structure
(dict) --
A list of documents attached to an index.
See also: AWS API Documentation
Request Syntax
client.list_documents( applicationId='string', dataSourceIds=[ 'string', ], indexId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the application id the documents are attached to.
list
The identifier of the data sources the documents are attached to.
(string) --
string
[REQUIRED]
The identifier of the index the documents are attached to.
integer
The maximum number of documents to return.
string
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents.
dict
Response Syntax
{ 'documentDetailList': [ { 'createdAt': datetime(2015, 1, 1), 'documentId': 'string', 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'status': 'RECEIVED'|'PROCESSING'|'INDEXED'|'UPDATED'|'FAILED'|'DELETING'|'DELETED'|'DOCUMENT_FAILED_TO_INDEX', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
documentDetailList (list) --
A list of document details.
(dict) --
The details of a document within an Amazon Q index.
createdAt (datetime) --
The timestamp for when the document was created.
documentId (string) --
The identifier of the document.
error (dict) --
An error message associated with the document.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
status (string) --
The current status of the document.
updatedAt (datetime) --
The timestamp for when the document was last updated.
nextToken (string) --
If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents.
Creates a universally unique identifier (UUID) mapped to a list of local user ids within an application.
See also: AWS API Documentation
Request Syntax
client.create_user( applicationId='string', clientToken='string', userAliases=[ { 'dataSourceId': 'string', 'indexId': 'string', 'userId': 'string' }, ], userId='string' )
string
[REQUIRED]
The identifier of the application for which the user mapping will be created.
string
A token that you provide to identify the request to create your Amazon Q user mapping.
This field is autopopulated if not provided.
list
The list of user aliases in the mapping.
(dict) --
Aliases attached to a user id within an Amazon Q application.
dataSourceId (string) --
The identifier of the data source that the user aliases are associated with.
indexId (string) --
The identifier of the index that the user aliases are associated with.
userId (string) -- [REQUIRED]
The identifier of the user id associated with the user aliases.
string
[REQUIRED]
The user emails attached to a user mapping.
dict
Response Syntax
{}
Response Structure
(dict) --
Asynchronously deletes one or more documents added using the BatchPutDocument API from an Amazon Q 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_delete_document( applicationId='string', dataSourceSyncId='string', documents=[ { 'documentId': 'string' }, ], indexId='string' )
string
[REQUIRED]
The identifier of the Amazon Q application.
string
The identifier of the data source sync during which the documents were deleted.
list
[REQUIRED]
Documents deleted from the Amazon Q index.
(dict) --
A document deleted from an Amazon Q data source connector.
documentId (string) -- [REQUIRED]
The identifier of the deleted document.
string
[REQUIRED]
The identifier of the Amazon Q index that contains the documents to delete.
dict
Response Syntax
{ 'failedDocuments': [ { 'dataSourceId': 'string', 'error': { 'errorCode': 'InternalError'|'InvalidRequest'|'ResourceInactive'|'ResourceNotFound', 'errorMessage': 'string' }, 'id': 'string' }, ] }
Response Structure
(dict) --
failedDocuments (list) --
A list of documents that couldn't be removed from the Amazon Q index. Each entry contains an error message that indicates why the document couldn't be removed from the index.
(dict) --
A list of documents that could not be removed from an Amazon Q index. Each entry contains an error message that indicates why the document couldn't be removed from the index.
dataSourceId (string) --
The identifier of the Amazon Q data source connector that contains the failed document.
error (dict) --
An explanation for why the document couldn't be removed from the index.
errorCode (string) --
The code associated with the data source sync error.
errorMessage (string) --
The message explaining the data source sync error.
id (string) --
The identifier of the document that couldn't be removed from the Amazon Q index.