Amazon Q Connect

2023/11/28 - Amazon Q Connect - 41 new api methods

Changes  Amazon Q in Connect, an LLM-enhanced evolution of Amazon Connect Wisdom. This release adds generative AI support to Amazon Q Connect QueryAssistant and GetRecommendations APIs.

ListQuickResponses (new) Link ¶

Lists information about quick response.

See also: AWS API Documentation

Request Syntax

client.list_quick_responses(
    knowledgeBaseId='string',
    maxResults=123,
    nextToken='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'quickResponseSummaries': [
        {
            'channels': [
                'string',
            ],
            'contentType': 'string',
            'createdTime': datetime(2015, 1, 1),
            'description': 'string',
            'isActive': True|False,
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'lastModifiedBy': 'string',
            'lastModifiedTime': datetime(2015, 1, 1),
            'name': 'string',
            'quickResponseArn': 'string',
            'quickResponseId': 'string',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
            'tags': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    • quickResponseSummaries (list) --

      Summary information about the quick responses.

      • (dict) --

        The summary information about the quick response.

        • channels (list) --

          The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat .

          • (string) --

        • contentType (string) --

          The media type of the quick response content.

          • Use application/x.quickresponse;format=plain for quick response written in plain text.

          • Use application/x.quickresponse;format=markdown for quick response written in richtext.

        • createdTime (datetime) --

          The timestamp when the quick response was created.

        • description (string) --

          The description of the quick response.

        • isActive (boolean) --

          Whether the quick response is active.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

        • lastModifiedBy (string) --

          The Amazon Resource Name (ARN) of the user who last updated the quick response data.

        • lastModifiedTime (datetime) --

          The timestamp when the quick response summary was last modified.

        • name (string) --

          The name of the quick response.

        • quickResponseArn (string) --

          The Amazon Resource Name (ARN) of the quick response.

        • quickResponseId (string) --

          The identifier of the quick response.

        • status (string) --

          The resource status of the quick response.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

GetAssistant (new) Link ¶

Retrieves information about an assistant.

See also: AWS API Documentation

Request Syntax

client.get_assistant(
    assistantId='string'
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{
    'assistant': {
        'assistantArn': 'string',
        'assistantId': 'string',
        'capabilityConfiguration': {
            'type': 'V1'|'V2'
        },
        'description': 'string',
        'integrationConfiguration': {
            'topicIntegrationArn': 'string'
        },
        'name': 'string',
        'serverSideEncryptionConfiguration': {
            'kmsKeyId': 'string'
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'type': 'AGENT'
    }
}

Response Structure

  • (dict) --

    • assistant (dict) --

      Information about the assistant.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q assistant.

      • assistantId (string) --

        The identifier of the Amazon Q assistant.

      • capabilityConfiguration (dict) --

        The configuration information for the Amazon Q assistant capability.

        • type (string) --

          The type of Amazon Q assistant capability.

      • description (string) --

        The description.

      • integrationConfiguration (dict) --

        The configuration information for the Amazon Q assistant integration.

        • topicIntegrationArn (string) --

          The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

      • name (string) --

        The name.

      • serverSideEncryptionConfiguration (dict) --

        The configuration information for the customer managed key used for encryption.

        This KMS key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow kms:Decrypt , kms:GenerateDataKey* , and kms:DescribeKey permissions to the connect.amazonaws.com service principal.

        For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

      • status (string) --

        The status of the assistant.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • type (string) --

        The type of assistant.

SearchQuickResponses (new) Link ¶

Searches existing Amazon Q quick responses in a Amazon Q knowledge base.

See also: AWS API Documentation

Request Syntax

client.search_quick_responses(
    attributes={
        'string': 'string'
    },
    knowledgeBaseId='string',
    maxResults=123,
    nextToken='string',
    searchExpression={
        'filters': [
            {
                'includeNoExistence': True|False,
                'name': 'string',
                'operator': 'EQUALS'|'PREFIX',
                'values': [
                    'string',
                ]
            },
        ],
        'orderOnField': {
            'name': 'string',
            'order': 'ASC'|'DESC'
        },
        'queries': [
            {
                'allowFuzziness': True|False,
                'name': 'string',
                'operator': 'CONTAINS'|'CONTAINS_AND_PREFIX',
                'priority': 'HIGH'|'MEDIUM'|'LOW',
                'values': [
                    'string',
                ]
            },
        ]
    }
)
type attributes

dict

param attributes

The user-defined Amazon Connect contact attributes to be resolved when search results are returned.

  • (string) --

    • (string) --

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type searchExpression

dict

param searchExpression

[REQUIRED]

The search expression for querying the quick response.

  • filters (list) --

    The configuration of filtering rules applied to quick response query results.

    • (dict) --

      The quick response fields to filter the quick response query results by.

      The following is the list of supported field names.

      • name

      • description

      • shortcutKey

      • isActive

      • channels

      • language

      • contentType

      • createdTime

      • lastModifiedTime

      • lastModifiedBy

      • groupingConfiguration.criteria

      • groupingConfiguration.values

      • includeNoExistence (boolean) --

        Whether to treat null value as a match for the attribute field.

      • name (string) -- [REQUIRED]

        The name of the attribute field to filter the quick responses by.

      • operator (string) -- [REQUIRED]

        The operator to use for filtering.

      • values (list) --

        The values of attribute field to filter the quick response by.

        • (string) --

  • orderOnField (dict) --

    The quick response attribute fields on which the query results are ordered.

    • name (string) -- [REQUIRED]

      The name of the attribute to order the quick response query results by.

    • order (string) --

      The order at which the quick responses are sorted by.

  • queries (list) --

    The quick response query expressions.

    • (dict) --

      The quick response fields to query quick responses by.

      The following is the list of supported field names.

      • content

      • name

      • description

      • shortcutKey

      • allowFuzziness (boolean) --

        Whether the query expects only exact matches on the attribute field values. The results of the query will only include exact matches if this parameter is set to false.

      • name (string) -- [REQUIRED]

        The name of the attribute to query the quick responses by.

      • operator (string) -- [REQUIRED]

        The operator to use for matching attribute field values in the query.

      • priority (string) --

        The importance of the attribute field when calculating query result relevancy scores. The value set for this parameter affects the ordering of search results.

      • values (list) -- [REQUIRED]

        The values of the attribute to query the quick responses by.

        • (string) --

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'results': [
        {
            'attributesInterpolated': [
                'string',
            ],
            'attributesNotInterpolated': [
                'string',
            ],
            'channels': [
                'string',
            ],
            'contentType': 'string',
            'contents': {
                'markdown': {
                    'content': 'string'
                },
                'plainText': {
                    'content': 'string'
                }
            },
            'createdTime': datetime(2015, 1, 1),
            'description': 'string',
            'groupingConfiguration': {
                'criteria': 'string',
                'values': [
                    'string',
                ]
            },
            'isActive': True|False,
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'language': 'string',
            'lastModifiedBy': 'string',
            'lastModifiedTime': datetime(2015, 1, 1),
            'name': 'string',
            'quickResponseArn': 'string',
            'quickResponseId': 'string',
            'shortcutKey': 'string',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
            'tags': {
                'string': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    • results (list) --

      The results of the quick response search.

      • (dict) --

        The result of quick response search.

        • attributesInterpolated (list) --

          The user defined contact attributes that are resolved when the search result is returned.

          • (string) --

        • attributesNotInterpolated (list) --

          The user defined contact attributes that are not resolved when the search result is returned.

          • (string) --

        • channels (list) --

          The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat .

          • (string) --

        • contentType (string) --

          The media type of the quick response content.

          • Use application/x.quickresponse;format=plain for quick response written in plain text.

          • Use application/x.quickresponse;format=markdown for quick response written in richtext.

        • contents (dict) --

          The contents of the quick response.

          • markdown (dict) --

            The container quick response content.

            • content (string) --

              The content of the quick response.

          • plainText (dict) --

            The container quick response content.

            • content (string) --

              The content of the quick response.

        • createdTime (datetime) --

          The timestamp when the quick response was created.

        • description (string) --

          The description of the quick response.

        • groupingConfiguration (dict) --

          The configuration information of the user groups that the quick response is accessible to.

          • criteria (string) --

            The criteria used for grouping Amazon Q users.

            The following is the list of supported criteria values.

          • values (list) --

            The list of values that define different groups of Amazon Q users.

            • (string) --

        • isActive (boolean) --

          Whether the quick response is active.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

        • language (string) --

          The language code value for the language in which the quick response is written.

        • lastModifiedBy (string) --

          The Amazon Resource Name (ARN) of the user who last updated the quick response search result data.

        • lastModifiedTime (datetime) --

          The timestamp when the quick response search result data was last modified.

        • name (string) --

          The name of the quick response.

        • quickResponseArn (string) --

          The Amazon Resource Name (ARN) of the quick response.

        • quickResponseId (string) --

          The identifier of the quick response.

        • shortcutKey (string) --

          The shortcut key of the quick response. The value should be unique across the knowledge base.

        • status (string) --

          The resource status of the quick response.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

CreateContent (new) Link ¶

Creates Amazon Q content. Before to calling this API, use StartContentUpload to upload an asset.

See also: AWS API Documentation

Request Syntax

client.create_content(
    clientToken='string',
    knowledgeBaseId='string',
    metadata={
        'string': 'string'
    },
    name='string',
    overrideLinkOutUri='string',
    tags={
        'string': 'string'
    },
    title='string',
    uploadId='string'
)
type clientToken

string

param clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .

This field is autopopulated if not provided.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type metadata

dict

param metadata

A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

  • (string) --

    • (string) --

type name

string

param name

[REQUIRED]

The name of the content. Each piece of content in a knowledge base must have a unique name. You can retrieve a piece of content using only its knowledge base and its name with the SearchContent API.

type overrideLinkOutUri

string

param overrideLinkOutUri

The URI you want to use for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content.

type tags

dict

param tags

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

type title

string

param title

The title of the content. If not set, the title is equal to the name.

type uploadId

string

param uploadId

[REQUIRED]

A pointer to the uploaded asset. This value is returned by StartContentUpload .

rtype

dict

returns

Response Syntax

{
    'content': {
        'contentArn': 'string',
        'contentId': 'string',
        'contentType': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'linkOutUri': 'string',
        'metadata': {
            'string': 'string'
        },
        'name': 'string',
        'revisionId': 'string',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_FAILED',
        'tags': {
            'string': 'string'
        },
        'title': 'string',
        'url': 'string',
        'urlExpiry': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • content (dict) --

      The content.

      • contentArn (string) --

        The Amazon Resource Name (ARN) of the content.

      • contentId (string) --

        The identifier of the content.

      • contentType (string) --

        The media type of the content.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • linkOutUri (string) --

        The URI of the content.

      • metadata (dict) --

        A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

        • (string) --

          • (string) --

      • name (string) --

        The name of the content.

      • revisionId (string) --

        The identifier of the content revision.

      • status (string) --

        The status of the content.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • title (string) --

        The title of the content.

      • url (string) --

        The URL of the content.

      • urlExpiry (datetime) --

        The expiration time of the URL as an epoch timestamp.

CreateKnowledgeBase (new) Link ¶

Creates a knowledge base.

Note

When using this API, you cannot reuse Amazon AppIntegrations DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do, you'll get an InvalidRequestException error.

For example, you're programmatically managing your external knowledge base, and you want to add or remove one of the fields that is being ingested from Salesforce. Do the following:

See also: AWS API Documentation

Request Syntax

client.create_knowledge_base(
    clientToken='string',
    description='string',
    knowledgeBaseType='EXTERNAL'|'CUSTOM'|'QUICK_RESPONSES',
    name='string',
    renderingConfiguration={
        'templateUri': 'string'
    },
    serverSideEncryptionConfiguration={
        'kmsKeyId': 'string'
    },
    sourceConfiguration={
        'appIntegrations': {
            'appIntegrationArn': 'string',
            'objectFields': [
                'string',
            ]
        }
    },
    tags={
        'string': 'string'
    }
)
type clientToken

string

param clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .

This field is autopopulated if not provided.

type description

string

param description

The description.

type knowledgeBaseType

string

param knowledgeBaseType

[REQUIRED]

The type of knowledge base. Only CUSTOM knowledge bases allow you to upload your own content. EXTERNAL knowledge bases support integrations with third-party systems whose content is synchronized automatically.

type name

string

param name

[REQUIRED]

The name of the knowledge base.

type renderingConfiguration

dict

param renderingConfiguration

Information about how to render the content.

  • templateUri (string) --

    A URI template containing exactly one variable in ${variableName} format. This can only be set for EXTERNAL knowledge bases. For Salesforce, ServiceNow, and Zendesk, the variable must be one of the following:

    • Salesforce: Id , ArticleNumber , VersionNumber , Title , PublishStatus , or IsDeleted

    • ServiceNow: number , short_description , sys_mod_count , workflow_state , or active

    • Zendesk: id , title , updated_at , or draft

    The variable is replaced with the actual value for a piece of content when calling GetContent .

type serverSideEncryptionConfiguration

dict

param serverSideEncryptionConfiguration

The configuration information for the customer managed key used for encryption.

This KMS key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q.

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

type sourceConfiguration

dict

param sourceConfiguration

The source of the knowledge base content. Only set this argument for EXTERNAL knowledge bases.

  • appIntegrations (dict) --

    Configuration information for Amazon AppIntegrations to automatically ingest content.

    • appIntegrationArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

      • For Salesforce , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted as source fields.

      • For ServiceNow , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least number , short_description , sys_mod_count , workflow_state , and active as source fields.

      • For Zendesk , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least id , title , updated_at , and draft as source fields.

      • For SharePoint , your AppIntegrations DataIntegration must have a FileConfiguration, including only file extensions that are among docx , pdf , html , htm , and txt .

      • For Amazon S3 , the ObjectConfiguration and FileConfiguration of your AppIntegrations DataIntegration must be null. The SourceURI of your DataIntegration must use the following format: s3://your_s3_bucket_name .

      Warning

      The bucket policy of the corresponding S3 bucket must allow the Amazon Web Services principal app-integrations.amazonaws.com to perform s3:ListBucket , s3:GetObject , and s3:GetBucketLocation against the bucket.

    • objectFields (list) --

      The fields from the source that are made available to your agents in Amazon Q. Optional if ObjectConfiguration is included in the provided DataIntegration.

      • For Salesforce , you must include at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted .

      • For ServiceNow , you must include at least number , short_description , sys_mod_count , workflow_state , and active .

      • For Zendesk , you must include at least id , title , updated_at , and draft .

      Make sure to include additional fields. These fields are indexed and used to source recommendations.

      • (string) --

type tags

dict

param tags

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'knowledgeBase': {
        'description': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'knowledgeBaseType': 'EXTERNAL'|'CUSTOM'|'QUICK_RESPONSES',
        'lastContentModificationTime': datetime(2015, 1, 1),
        'name': 'string',
        'renderingConfiguration': {
            'templateUri': 'string'
        },
        'serverSideEncryptionConfiguration': {
            'kmsKeyId': 'string'
        },
        'sourceConfiguration': {
            'appIntegrations': {
                'appIntegrationArn': 'string',
                'objectFields': [
                    'string',
                ]
            }
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • knowledgeBase (dict) --

      The knowledge base.

      • description (string) --

        The description.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • knowledgeBaseType (string) --

        The type of knowledge base.

      • lastContentModificationTime (datetime) --

        An epoch timestamp indicating the most recent content modification inside the knowledge base. If no content exists in a knowledge base, this value is unset.

      • name (string) --

        The name of the knowledge base.

      • renderingConfiguration (dict) --

        Information about how to render the content.

        • templateUri (string) --

          A URI template containing exactly one variable in ${variableName} format. This can only be set for EXTERNAL knowledge bases. For Salesforce, ServiceNow, and Zendesk, the variable must be one of the following:

          • Salesforce: Id , ArticleNumber , VersionNumber , Title , PublishStatus , or IsDeleted

          • ServiceNow: number , short_description , sys_mod_count , workflow_state , or active

          • Zendesk: id , title , updated_at , or draft

          The variable is replaced with the actual value for a piece of content when calling GetContent .

      • serverSideEncryptionConfiguration (dict) --

        The configuration information for the customer managed key used for encryption.

        This KMS key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q.

        For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

      • sourceConfiguration (dict) --

        Source configuration information about the knowledge base.

        • appIntegrations (dict) --

          Configuration information for Amazon AppIntegrations to automatically ingest content.

          • appIntegrationArn (string) --

            The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

            • For Salesforce , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted as source fields.

            • For ServiceNow , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least number , short_description , sys_mod_count , workflow_state , and active as source fields.

            • For Zendesk , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least id , title , updated_at , and draft as source fields.

            • For SharePoint , your AppIntegrations DataIntegration must have a FileConfiguration, including only file extensions that are among docx , pdf , html , htm , and txt .

            • For Amazon S3 , the ObjectConfiguration and FileConfiguration of your AppIntegrations DataIntegration must be null. The SourceURI of your DataIntegration must use the following format: s3://your_s3_bucket_name .

            Warning

            The bucket policy of the corresponding S3 bucket must allow the Amazon Web Services principal app-integrations.amazonaws.com to perform s3:ListBucket , s3:GetObject , and s3:GetBucketLocation against the bucket.

          • objectFields (list) --

            The fields from the source that are made available to your agents in Amazon Q. Optional if ObjectConfiguration is included in the provided DataIntegration.

            • For Salesforce , you must include at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted .

            • For ServiceNow , you must include at least number , short_description , sys_mod_count , workflow_state , and active .

            • For Zendesk , you must include at least id , title , updated_at , and draft .

            Make sure to include additional fields. These fields are indexed and used to source recommendations.

            • (string) --

      • status (string) --

        The status of the knowledge base.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

StartImportJob (new) Link ¶

Start an asynchronous job to import Amazon Q resources from an uploaded source file. Before calling this API, use StartContentUpload to upload an asset that contains the resource data.

  • For importing Amazon Q quick responses, you need to upload a csv file including the quick responses. For information about how to format the csv file for importing quick responses, see Import quick responses .

See also: AWS API Documentation

Request Syntax

client.start_import_job(
    clientToken='string',
    externalSourceConfiguration={
        'configuration': {
            'connectConfiguration': {
                'instanceId': 'string'
            }
        },
        'source': 'AMAZON_CONNECT'
    },
    importJobType='QUICK_RESPONSES',
    knowledgeBaseId='string',
    metadata={
        'string': 'string'
    },
    uploadId='string'
)
type clientToken

string

param clientToken

The tags used to organize, track, or control access for this resource.

This field is autopopulated if not provided.

type externalSourceConfiguration

dict

param externalSourceConfiguration

The configuration information of the external source that the resource data are imported from.

  • configuration (dict) -- [REQUIRED]

    The configuration information of the external data source.

    • connectConfiguration (dict) --

      The configuration information of the Amazon Connect data source.

      • instanceId (string) --

        The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

  • source (string) -- [REQUIRED]

    The type of the external data source.

type importJobType

string

param importJobType

[REQUIRED]

The type of the import job.

  • For importing quick response resource, set the value to QUICK_RESPONSES .

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

  • For importing Amazon Q quick responses, this should be a QUICK_RESPONSES type knowledge base.

type metadata

dict

param metadata

The metadata fields of the imported Amazon Q resources.

  • (string) --

    • (string) --

type uploadId

string

param uploadId

[REQUIRED]

A pointer to the uploaded asset. This value is returned by StartContentUpload .

rtype

dict

returns

Response Syntax

{
    'importJob': {
        'createdTime': datetime(2015, 1, 1),
        'externalSourceConfiguration': {
            'configuration': {
                'connectConfiguration': {
                    'instanceId': 'string'
                }
            },
            'source': 'AMAZON_CONNECT'
        },
        'failedRecordReport': 'string',
        'importJobId': 'string',
        'importJobType': 'QUICK_RESPONSES',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'lastModifiedTime': datetime(2015, 1, 1),
        'metadata': {
            'string': 'string'
        },
        'status': 'START_IN_PROGRESS'|'FAILED'|'COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'uploadId': 'string',
        'url': 'string',
        'urlExpiry': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • importJob (dict) --

      The import job.

      • createdTime (datetime) --

        The timestamp when the import job was created.

      • externalSourceConfiguration (dict) --

        The configuration information of the external data source.

        • configuration (dict) --

          The configuration information of the external data source.

          • connectConfiguration (dict) --

            The configuration information of the Amazon Connect data source.

            • instanceId (string) --

              The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

        • source (string) --

          The type of the external data source.

      • failedRecordReport (string) --

        The link to donwload the information of resource data that failed to be imported.

      • importJobId (string) --

        The identifier of the import job.

      • importJobType (string) --

        The type of the import job.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • lastModifiedTime (datetime) --

        The timestamp when the import job data was last modified.

      • metadata (dict) --

        The metadata fields of the imported Amazon Q resources.

        • (string) --

          • (string) --

      • status (string) --

        The status of the import job.

      • uploadId (string) --

        A pointer to the uploaded asset. This value is returned by StartContentUpload .

      • url (string) --

        The download link to the resource file that is uploaded to the import job.

      • urlExpiry (datetime) --

        The expiration time of the URL as an epoch timestamp.

DeleteAssistant (new) Link ¶

Deletes an assistant.

See also: AWS API Documentation

Request Syntax

client.delete_assistant(
    assistantId='string'
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetKnowledgeBase (new) Link ¶

Retrieves information about the knowledge base.

See also: AWS API Documentation

Request Syntax

client.get_knowledge_base(
    knowledgeBaseId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{
    'knowledgeBase': {
        'description': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'knowledgeBaseType': 'EXTERNAL'|'CUSTOM'|'QUICK_RESPONSES',
        'lastContentModificationTime': datetime(2015, 1, 1),
        'name': 'string',
        'renderingConfiguration': {
            'templateUri': 'string'
        },
        'serverSideEncryptionConfiguration': {
            'kmsKeyId': 'string'
        },
        'sourceConfiguration': {
            'appIntegrations': {
                'appIntegrationArn': 'string',
                'objectFields': [
                    'string',
                ]
            }
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • knowledgeBase (dict) --

      The knowledge base.

      • description (string) --

        The description.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • knowledgeBaseType (string) --

        The type of knowledge base.

      • lastContentModificationTime (datetime) --

        An epoch timestamp indicating the most recent content modification inside the knowledge base. If no content exists in a knowledge base, this value is unset.

      • name (string) --

        The name of the knowledge base.

      • renderingConfiguration (dict) --

        Information about how to render the content.

        • templateUri (string) --

          A URI template containing exactly one variable in ${variableName} format. This can only be set for EXTERNAL knowledge bases. For Salesforce, ServiceNow, and Zendesk, the variable must be one of the following:

          • Salesforce: Id , ArticleNumber , VersionNumber , Title , PublishStatus , or IsDeleted

          • ServiceNow: number , short_description , sys_mod_count , workflow_state , or active

          • Zendesk: id , title , updated_at , or draft

          The variable is replaced with the actual value for a piece of content when calling GetContent .

      • serverSideEncryptionConfiguration (dict) --

        The configuration information for the customer managed key used for encryption.

        This KMS key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q.

        For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

      • sourceConfiguration (dict) --

        Source configuration information about the knowledge base.

        • appIntegrations (dict) --

          Configuration information for Amazon AppIntegrations to automatically ingest content.

          • appIntegrationArn (string) --

            The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

            • For Salesforce , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted as source fields.

            • For ServiceNow , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least number , short_description , sys_mod_count , workflow_state , and active as source fields.

            • For Zendesk , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least id , title , updated_at , and draft as source fields.

            • For SharePoint , your AppIntegrations DataIntegration must have a FileConfiguration, including only file extensions that are among docx , pdf , html , htm , and txt .

            • For Amazon S3 , the ObjectConfiguration and FileConfiguration of your AppIntegrations DataIntegration must be null. The SourceURI of your DataIntegration must use the following format: s3://your_s3_bucket_name .

            Warning

            The bucket policy of the corresponding S3 bucket must allow the Amazon Web Services principal app-integrations.amazonaws.com to perform s3:ListBucket , s3:GetObject , and s3:GetBucketLocation against the bucket.

          • objectFields (list) --

            The fields from the source that are made available to your agents in Amazon Q. Optional if ObjectConfiguration is included in the provided DataIntegration.

            • For Salesforce , you must include at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted .

            • For ServiceNow , you must include at least number , short_description , sys_mod_count , workflow_state , and active .

            • For Zendesk , you must include at least id , title , updated_at , and draft .

            Make sure to include additional fields. These fields are indexed and used to source recommendations.

            • (string) --

      • status (string) --

        The status of the knowledge base.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

GetRecommendations (new) Link ¶

Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived . This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant .

See also: AWS API Documentation

Request Syntax

client.get_recommendations(
    assistantId='string',
    maxResults=123,
    sessionId='string',
    waitTimeSeconds=123
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type sessionId

string

param sessionId

[REQUIRED]

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

type waitTimeSeconds

integer

param waitTimeSeconds

The duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than WaitTimeSeconds . If no messages are available and the wait time expires, the call returns successfully with an empty list.

rtype

dict

returns

Response Syntax

{
    'recommendations': [
        {
            'data': {
                'details': {
                    'contentData': {
                        'rankingData': {
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW',
                            'relevanceScore': 123.0
                        },
                        'textData': {
                            'excerpt': {
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ],
                                'text': 'string'
                            },
                            'title': {
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ],
                                'text': 'string'
                            }
                        }
                    },
                    'generativeData': {
                        'completion': 'string',
                        'rankingData': {
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW',
                            'relevanceScore': 123.0
                        },
                        'references': [
                            {'... recursive ...'},
                        ]
                    },
                    'sourceContentData': {
                        'id': 'string',
                        'rankingData': {
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW',
                            'relevanceScore': 123.0
                        },
                        'textData': {
                            'excerpt': {
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ],
                                'text': 'string'
                            },
                            'title': {
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ],
                                'text': 'string'
                            }
                        },
                        'type': 'KNOWLEDGE_CONTENT'
                    }
                },
                'reference': {
                    'contentReference': {
                        'contentArn': 'string',
                        'contentId': 'string',
                        'knowledgeBaseArn': 'string',
                        'knowledgeBaseId': 'string'
                    },
                    'generativeReference': {
                        'generationId': 'string',
                        'modelId': 'string'
                    }
                }
            },
            'document': {
                'contentReference': {
                    'contentArn': 'string',
                    'contentId': 'string',
                    'knowledgeBaseArn': 'string',
                    'knowledgeBaseId': 'string'
                },
                'excerpt': {
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ],
                    'text': 'string'
                },
                'title': {
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ],
                    'text': 'string'
                }
            },
            'recommendationId': 'string',
            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW',
            'relevanceScore': 123.0,
            'type': 'KNOWLEDGE_CONTENT'|'GENERATIVE_RESPONSE'|'GENERATIVE_ANSWER'
        },
    ],
    'triggers': [
        {
            'data': {
                'query': {
                    'text': 'string'
                }
            },
            'id': 'string',
            'recommendationIds': [
                'string',
            ],
            'source': 'ISSUE_DETECTION'|'RULE_EVALUATION'|'OTHER',
            'type': 'QUERY'|'GENERATIVE'
        },
    ]
}

Response Structure

  • (dict) --

    • recommendations (list) --

      The recommendations.

      • (dict) --

        Information about the recommendation.

        • data (dict) --

          Summary of the recommended content.

          • details (dict) --

            Details about the data.

            • contentData (dict) --

              Details about the content data.

              • rankingData (dict) --

                Details about the content ranking data.

                • relevanceLevel (string) --

                  The relevance score of the content.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

              • textData (dict) --

                Details about the content text data.

                • excerpt (dict) --

                  The text of the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                  • text (string) --

                    Text in the document.

                • title (dict) --

                  The text of the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                  • text (string) --

                    Text in the document.

            • generativeData (dict) --

              Details about the generative data.

              • completion (string) --

                The LLM response.

              • rankingData (dict) --

                Details about the generative content ranking data.

                • relevanceLevel (string) --

                  The relevance score of the content.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

              • references (list) --

                The references used to generative the LLM response.

                • (dict) --

                  Summary of the data.

            • sourceContentData (dict) --

              Details about the content data.

              • id (string) --

                The identifier of the source content.

              • rankingData (dict) --

                Details about the source content ranking data.

                • relevanceLevel (string) --

                  The relevance score of the content.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

              • textData (dict) --

                Details about the source content text data.

                • excerpt (dict) --

                  The text of the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                  • text (string) --

                    Text in the document.

                • title (dict) --

                  The text of the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                  • text (string) --

                    Text in the document.

              • type (string) --

                The type of the source content.

          • reference (dict) --

            Reference information about the content.

            • contentReference (dict) --

              Reference information about the content.

              • contentArn (string) --

                The Amazon Resource Name (ARN) of the content.

              • contentId (string) --

                The identifier of the content.

              • knowledgeBaseArn (string) --

                The Amazon Resource Name (ARN) of the knowledge base.

              • knowledgeBaseId (string) --

                The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

            • generativeReference (dict) --

              Reference information about the generative content.

              • generationId (string) --

                The identifier of the LLM model.

              • modelId (string) --

                The identifier of the LLM model.

        • document (dict) --

          The recommended document.

          • contentReference (dict) --

            A reference to the content resource.

            • contentArn (string) --

              The Amazon Resource Name (ARN) of the content.

            • contentId (string) --

              The identifier of the content.

            • knowledgeBaseArn (string) --

              The Amazon Resource Name (ARN) of the knowledge base.

            • knowledgeBaseId (string) --

              The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

          • excerpt (dict) --

            The excerpt from the document.

            • highlights (list) --

              Highlights in the document text.

              • (dict) --

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) --

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) --

                  The offset for the end of the highlight.

            • text (string) --

              Text in the document.

          • title (dict) --

            The title of the document.

            • highlights (list) --

              Highlights in the document text.

              • (dict) --

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) --

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) --

                  The offset for the end of the highlight.

            • text (string) --

              Text in the document.

        • recommendationId (string) --

          The identifier of the recommendation.

        • relevanceLevel (string) --

          The relevance level of the recommendation.

        • relevanceScore (float) --

          The relevance score of the recommendation.

        • type (string) --

          The type of recommendation.

    • triggers (list) --

      The triggers corresponding to recommendations.

      • (dict) --

        A recommendation trigger provides context on the event that produced the referenced recommendations. Recommendations are only referenced in recommendationIds by a single RecommendationTrigger.

        • data (dict) --

          A union type containing information related to the trigger.

          • query (dict) --

            Data associated with the QUERY RecommendationTriggerType.

            • text (string) --

              The text associated with the recommendation trigger.

        • id (string) --

          The identifier of the recommendation trigger.

        • recommendationIds (list) --

          The identifiers of the recommendations.

          • (string) --

        • source (string) --

          The source of the recommendation trigger.

          • ISSUE_DETECTION: The corresponding recommendations were triggered by a Contact Lens issue.

          • RULE_EVALUATION: The corresponding recommendations were triggered by a Contact Lens rule.

        • type (string) --

          The type of recommendation trigger.

GetSession (new) Link ¶

Retrieves information for a specified session.

See also: AWS API Documentation

Request Syntax

client.get_session(
    assistantId='string',
    sessionId='string'
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type sessionId

string

param sessionId

[REQUIRED]

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{
    'session': {
        'description': 'string',
        'integrationConfiguration': {
            'topicIntegrationArn': 'string'
        },
        'name': 'string',
        'sessionArn': 'string',
        'sessionId': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • session (dict) --

      The session.

      • description (string) --

        The description of the session.

      • integrationConfiguration (dict) --

        The configuration information for the session integration.

        • topicIntegrationArn (string) --

          The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

      • name (string) --

        The name of the session.

      • sessionArn (string) --

        The Amazon Resource Name (ARN) of the session.

      • sessionId (string) --

        The identifier of the session.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

GetQuickResponse (new) Link ¶

Retrieves the quick response.

See also: AWS API Documentation

Request Syntax

client.get_quick_response(
    knowledgeBaseId='string',
    quickResponseId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should be a QUICK_RESPONSES type knowledge base.

type quickResponseId

string

param quickResponseId

[REQUIRED]

The identifier of the quick response.

rtype

dict

returns

Response Syntax

{
    'quickResponse': {
        'channels': [
            'string',
        ],
        'contentType': 'string',
        'contents': {
            'markdown': {
                'content': 'string'
            },
            'plainText': {
                'content': 'string'
            }
        },
        'createdTime': datetime(2015, 1, 1),
        'description': 'string',
        'groupingConfiguration': {
            'criteria': 'string',
            'values': [
                'string',
            ]
        },
        'isActive': True|False,
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'language': 'string',
        'lastModifiedBy': 'string',
        'lastModifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'quickResponseArn': 'string',
        'quickResponseId': 'string',
        'shortcutKey': 'string',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • quickResponse (dict) --

      The quick response.

      • channels (list) --

        The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat .

        • (string) --

      • contentType (string) --

        The media type of the quick response content.

        • Use application/x.quickresponse;format=plain for quick response written in plain text.

        • Use application/x.quickresponse;format=markdown for quick response written in richtext.

      • contents (dict) --

        The contents of the quick response.

        • markdown (dict) --

          The container quick response content.

          • content (string) --

            The content of the quick response.

        • plainText (dict) --

          The container quick response content.

          • content (string) --

            The content of the quick response.

      • createdTime (datetime) --

        The timestamp when the quick response was created.

      • description (string) --

        The description of the quick response.

      • groupingConfiguration (dict) --

        The configuration information of the user groups that the quick response is accessible to.

        • criteria (string) --

          The criteria used for grouping Amazon Q users.

          The following is the list of supported criteria values.

        • values (list) --

          The list of values that define different groups of Amazon Q users.

          • (string) --

      • isActive (boolean) --

        Whether the quick response is active.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • language (string) --

        The language code value for the language in which the quick response is written.

      • lastModifiedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the quick response data.

      • lastModifiedTime (datetime) --

        The timestamp when the quick response data was last modified.

      • name (string) --

        The name of the quick response.

      • quickResponseArn (string) --

        The Amazon Resource Name (ARN) of the quick response.

      • quickResponseId (string) --

        The identifier of the quick response.

      • shortcutKey (string) --

        The shortcut key of the quick response. The value should be unique across the knowledge base.

      • status (string) --

        The status of the quick response data.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

ListAssistantAssociations (new) Link ¶

Lists information about assistant associations.

See also: AWS API Documentation

Request Syntax

client.list_assistant_associations(
    assistantId='string',
    maxResults=123,
    nextToken='string'
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'assistantAssociationSummaries': [
        {
            'assistantArn': 'string',
            'assistantAssociationArn': 'string',
            'assistantAssociationId': 'string',
            'assistantId': 'string',
            'associationData': {
                'knowledgeBaseAssociation': {
                    'knowledgeBaseArn': 'string',
                    'knowledgeBaseId': 'string'
                }
            },
            'associationType': 'KNOWLEDGE_BASE',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assistantAssociationSummaries (list) --

      Summary information about assistant associations.

      • (dict) --

        Summary information about the assistant association.

        • assistantArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Q assistant.

        • assistantAssociationArn (string) --

          The Amazon Resource Name (ARN) of the assistant association.

        • assistantAssociationId (string) --

          The identifier of the assistant association.

        • assistantId (string) --

          The identifier of the Amazon Q assistant.

        • associationData (dict) --

          The association data.

          • knowledgeBaseAssociation (dict) --

            The knowledge base where output data is sent.

            • knowledgeBaseArn (string) --

              The Amazon Resource Name (ARN) of the knowledge base.

            • knowledgeBaseId (string) --

              The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

        • associationType (string) --

          The type of association.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

CreateQuickResponse (new) Link ¶

Creates a Amazon Q quick response.

See also: AWS API Documentation

Request Syntax

client.create_quick_response(
    channels=[
        'string',
    ],
    clientToken='string',
    content={
        'content': 'string'
    },
    contentType='string',
    description='string',
    groupingConfiguration={
        'criteria': 'string',
        'values': [
            'string',
        ]
    },
    isActive=True|False,
    knowledgeBaseId='string',
    language='string',
    name='string',
    shortcutKey='string',
    tags={
        'string': 'string'
    }
)
type channels

list

param channels

The Amazon Connect channels this quick response applies to.

  • (string) --

type clientToken

string

param clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .

This field is autopopulated if not provided.

type content

dict

param content

[REQUIRED]

The content of the quick response.

  • content (string) --

    The content of the quick response.

type contentType

string

param contentType

The media type of the quick response content.

  • Use application/x.quickresponse;format=plain for a quick response written in plain text.

  • Use application/x.quickresponse;format=markdown for a quick response written in richtext.

type description

string

param description

The description of the quick response.

type groupingConfiguration

dict

param groupingConfiguration

The configuration information of the user groups that the quick response is accessible to.

  • criteria (string) --

    The criteria used for grouping Amazon Q users.

    The following is the list of supported criteria values.

  • values (list) --

    The list of values that define different groups of Amazon Q users.

    • (string) --

type isActive

boolean

param isActive

Whether the quick response is active.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type language

string

param language

The language code value for the language in which the quick response is written. The supported language codes include de_DE , en_US , es_ES , fr_FR , id_ID , it_IT , ja_JP , ko_KR , pt_BR , zh_CN , zh_TW

type name

string

param name

[REQUIRED]

The name of the quick response.

type shortcutKey

string

param shortcutKey

The shortcut key of the quick response. The value should be unique across the knowledge base.

type tags

dict

param tags

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'quickResponse': {
        'channels': [
            'string',
        ],
        'contentType': 'string',
        'contents': {
            'markdown': {
                'content': 'string'
            },
            'plainText': {
                'content': 'string'
            }
        },
        'createdTime': datetime(2015, 1, 1),
        'description': 'string',
        'groupingConfiguration': {
            'criteria': 'string',
            'values': [
                'string',
            ]
        },
        'isActive': True|False,
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'language': 'string',
        'lastModifiedBy': 'string',
        'lastModifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'quickResponseArn': 'string',
        'quickResponseId': 'string',
        'shortcutKey': 'string',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • quickResponse (dict) --

      The quick response.

      • channels (list) --

        The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat .

        • (string) --

      • contentType (string) --

        The media type of the quick response content.

        • Use application/x.quickresponse;format=plain for quick response written in plain text.

        • Use application/x.quickresponse;format=markdown for quick response written in richtext.

      • contents (dict) --

        The contents of the quick response.

        • markdown (dict) --

          The container quick response content.

          • content (string) --

            The content of the quick response.

        • plainText (dict) --

          The container quick response content.

          • content (string) --

            The content of the quick response.

      • createdTime (datetime) --

        The timestamp when the quick response was created.

      • description (string) --

        The description of the quick response.

      • groupingConfiguration (dict) --

        The configuration information of the user groups that the quick response is accessible to.

        • criteria (string) --

          The criteria used for grouping Amazon Q users.

          The following is the list of supported criteria values.

        • values (list) --

          The list of values that define different groups of Amazon Q users.

          • (string) --

      • isActive (boolean) --

        Whether the quick response is active.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • language (string) --

        The language code value for the language in which the quick response is written.

      • lastModifiedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the quick response data.

      • lastModifiedTime (datetime) --

        The timestamp when the quick response data was last modified.

      • name (string) --

        The name of the quick response.

      • quickResponseArn (string) --

        The Amazon Resource Name (ARN) of the quick response.

      • quickResponseId (string) --

        The identifier of the quick response.

      • shortcutKey (string) --

        The shortcut key of the quick response. The value should be unique across the knowledge base.

      • status (string) --

        The status of the quick response data.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

DeleteQuickResponse (new) Link ¶

Deletes a quick response.

See also: AWS API Documentation

Request Syntax

client.delete_quick_response(
    knowledgeBaseId='string',
    quickResponseId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The knowledge base from which the quick response is deleted. The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

type quickResponseId

string

param quickResponseId

[REQUIRED]

The identifier of the quick response to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateSession (new) Link ¶

Creates a session. A session is a contextual container used for generating recommendations. Amazon Connect creates a new Amazon Q session for each contact on which Amazon Q is enabled.

See also: AWS API Documentation

Request Syntax

client.create_session(
    assistantId='string',
    clientToken='string',
    description='string',
    name='string',
    tags={
        'string': 'string'
    }
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type clientToken

string

param clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .

This field is autopopulated if not provided.

type description

string

param description

The description.

type name

string

param name

[REQUIRED]

The name of the session.

type tags

dict

param tags

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'session': {
        'description': 'string',
        'integrationConfiguration': {
            'topicIntegrationArn': 'string'
        },
        'name': 'string',
        'sessionArn': 'string',
        'sessionId': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • session (dict) --

      The session.

      • description (string) --

        The description of the session.

      • integrationConfiguration (dict) --

        The configuration information for the session integration.

        • topicIntegrationArn (string) --

          The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

      • name (string) --

        The name of the session.

      • sessionArn (string) --

        The Amazon Resource Name (ARN) of the session.

      • sessionId (string) --

        The identifier of the session.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

UpdateKnowledgeBaseTemplateUri (new) Link ¶

Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in ${variable} format; this interpolated by Amazon Q using ingested content. For example, if you ingest a Salesforce article, it has an Id value, and you can set the template URI to https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view .

See also: AWS API Documentation

Request Syntax

client.update_knowledge_base_template_uri(
    knowledgeBaseId='string',
    templateUri='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type templateUri

string

param templateUri

[REQUIRED]

The template URI to update.

rtype

dict

returns

Response Syntax

{
    'knowledgeBase': {
        'description': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'knowledgeBaseType': 'EXTERNAL'|'CUSTOM'|'QUICK_RESPONSES',
        'lastContentModificationTime': datetime(2015, 1, 1),
        'name': 'string',
        'renderingConfiguration': {
            'templateUri': 'string'
        },
        'serverSideEncryptionConfiguration': {
            'kmsKeyId': 'string'
        },
        'sourceConfiguration': {
            'appIntegrations': {
                'appIntegrationArn': 'string',
                'objectFields': [
                    'string',
                ]
            }
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • knowledgeBase (dict) --

      The knowledge base to update.

      • description (string) --

        The description.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • knowledgeBaseType (string) --

        The type of knowledge base.

      • lastContentModificationTime (datetime) --

        An epoch timestamp indicating the most recent content modification inside the knowledge base. If no content exists in a knowledge base, this value is unset.

      • name (string) --

        The name of the knowledge base.

      • renderingConfiguration (dict) --

        Information about how to render the content.

        • templateUri (string) --

          A URI template containing exactly one variable in ${variableName} format. This can only be set for EXTERNAL knowledge bases. For Salesforce, ServiceNow, and Zendesk, the variable must be one of the following:

          • Salesforce: Id , ArticleNumber , VersionNumber , Title , PublishStatus , or IsDeleted

          • ServiceNow: number , short_description , sys_mod_count , workflow_state , or active

          • Zendesk: id , title , updated_at , or draft

          The variable is replaced with the actual value for a piece of content when calling GetContent .

      • serverSideEncryptionConfiguration (dict) --

        The configuration information for the customer managed key used for encryption.

        This KMS key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q.

        For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

      • sourceConfiguration (dict) --

        Source configuration information about the knowledge base.

        • appIntegrations (dict) --

          Configuration information for Amazon AppIntegrations to automatically ingest content.

          • appIntegrationArn (string) --

            The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

            • For Salesforce , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted as source fields.

            • For ServiceNow , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least number , short_description , sys_mod_count , workflow_state , and active as source fields.

            • For Zendesk , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least id , title , updated_at , and draft as source fields.

            • For SharePoint , your AppIntegrations DataIntegration must have a FileConfiguration, including only file extensions that are among docx , pdf , html , htm , and txt .

            • For Amazon S3 , the ObjectConfiguration and FileConfiguration of your AppIntegrations DataIntegration must be null. The SourceURI of your DataIntegration must use the following format: s3://your_s3_bucket_name .

            Warning

            The bucket policy of the corresponding S3 bucket must allow the Amazon Web Services principal app-integrations.amazonaws.com to perform s3:ListBucket , s3:GetObject , and s3:GetBucketLocation against the bucket.

          • objectFields (list) --

            The fields from the source that are made available to your agents in Amazon Q. Optional if ObjectConfiguration is included in the provided DataIntegration.

            • For Salesforce , you must include at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted .

            • For ServiceNow , you must include at least number , short_description , sys_mod_count , workflow_state , and active .

            • For Zendesk , you must include at least id , title , updated_at , and draft .

            Make sure to include additional fields. These fields are indexed and used to source recommendations.

            • (string) --

      • status (string) --

        The status of the knowledge base.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

DeleteAssistantAssociation (new) Link ¶

Deletes an assistant association.

See also: AWS API Documentation

Request Syntax

client.delete_assistant_association(
    assistantAssociationId='string',
    assistantId='string'
)
type assistantAssociationId

string

param assistantAssociationId

[REQUIRED]

The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListTagsForResource (new) Link ¶

Lists the tags for the specified resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string'
)
type resourceArn

string

param resourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • tags (dict) --

      The tags used to organize, track, or control access for this resource.

      • (string) --

        • (string) --

StartContentUpload (new) Link ¶

Get a URL to upload content to a knowledge base. To upload content, first make a PUT request to the returned URL with your file, making sure to include the required headers. Then use CreateContent to finalize the content creation process or UpdateContent to modify an existing resource. You can only upload content to a knowledge base of type CUSTOM.

See also: AWS API Documentation

Request Syntax

client.start_content_upload(
    contentType='string',
    knowledgeBaseId='string',
    presignedUrlTimeToLive=123
)
type contentType

string

param contentType

[REQUIRED]

The type of content to upload.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type presignedUrlTimeToLive

integer

param presignedUrlTimeToLive

The expected expiration time of the generated presigned URL, specified in minutes.

rtype

dict

returns

Response Syntax

{
    'headersToInclude': {
        'string': 'string'
    },
    'uploadId': 'string',
    'url': 'string',
    'urlExpiry': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • headersToInclude (dict) --

      The headers to include in the upload.

      • (string) --

        • (string) --

    • uploadId (string) --

      The identifier of the upload.

    • url (string) --

      The URL of the upload.

    • urlExpiry (datetime) --

      The expiration time of the URL as an epoch timestamp.

CreateAssistant (new) Link ¶

Creates an Amazon Q in Connect assistant.

See also: AWS API Documentation

Request Syntax

client.create_assistant(
    clientToken='string',
    description='string',
    name='string',
    serverSideEncryptionConfiguration={
        'kmsKeyId': 'string'
    },
    tags={
        'string': 'string'
    },
    type='AGENT'
)
type clientToken

string

param clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .

This field is autopopulated if not provided.

type description

string

param description

The description of the assistant.

type name

string

param name

[REQUIRED]

The name of the assistant.

type serverSideEncryptionConfiguration

dict

param serverSideEncryptionConfiguration

The configuration information for the customer managed key used for encryption.

The customer managed key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow kms:Decrypt , kms:GenerateDataKey* , and kms:DescribeKey permissions to the connect.amazonaws.com service principal.

For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

type tags

dict

param tags

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

type type

string

param type

[REQUIRED]

The type of assistant.

rtype

dict

returns

Response Syntax

{
    'assistant': {
        'assistantArn': 'string',
        'assistantId': 'string',
        'capabilityConfiguration': {
            'type': 'V1'|'V2'
        },
        'description': 'string',
        'integrationConfiguration': {
            'topicIntegrationArn': 'string'
        },
        'name': 'string',
        'serverSideEncryptionConfiguration': {
            'kmsKeyId': 'string'
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'type': 'AGENT'
    }
}

Response Structure

  • (dict) --

    • assistant (dict) --

      Information about the assistant.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q assistant.

      • assistantId (string) --

        The identifier of the Amazon Q assistant.

      • capabilityConfiguration (dict) --

        The configuration information for the Amazon Q assistant capability.

        • type (string) --

          The type of Amazon Q assistant capability.

      • description (string) --

        The description.

      • integrationConfiguration (dict) --

        The configuration information for the Amazon Q assistant integration.

        • topicIntegrationArn (string) --

          The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

      • name (string) --

        The name.

      • serverSideEncryptionConfiguration (dict) --

        The configuration information for the customer managed key used for encryption.

        This KMS key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow kms:Decrypt , kms:GenerateDataKey* , and kms:DescribeKey permissions to the connect.amazonaws.com service principal.

        For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

      • status (string) --

        The status of the assistant.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • type (string) --

        The type of assistant.

DeleteImportJob (new) Link ¶

Deletes the quick response import job.

See also: AWS API Documentation

Request Syntax

client.delete_import_job(
    importJobId='string',
    knowledgeBaseId='string'
)
type importJobId

string

param importJobId

[REQUIRED]

The identifier of the import job to be deleted.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

RemoveKnowledgeBaseTemplateUri (new) Link ¶

Removes a URI template from a knowledge base.

See also: AWS API Documentation

Request Syntax

client.remove_knowledge_base_template_uri(
    knowledgeBaseId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateAssistantAssociation (new) Link ¶

Creates an association between an Amazon Q in Connect assistant and another resource. Currently, the only supported association is with a knowledge base. An assistant can have only a single association.

See also: AWS API Documentation

Request Syntax

client.create_assistant_association(
    assistantId='string',
    association={
        'knowledgeBaseId': 'string'
    },
    associationType='KNOWLEDGE_BASE',
    clientToken='string',
    tags={
        'string': 'string'
    }
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type association

dict

param association

[REQUIRED]

The identifier of the associated resource.

  • knowledgeBaseId (string) --

    The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

type associationType

string

param associationType

[REQUIRED]

The type of association.

type clientToken

string

param clientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs .

This field is autopopulated if not provided.

type tags

dict

param tags

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'assistantAssociation': {
        'assistantArn': 'string',
        'assistantAssociationArn': 'string',
        'assistantAssociationId': 'string',
        'assistantId': 'string',
        'associationData': {
            'knowledgeBaseAssociation': {
                'knowledgeBaseArn': 'string',
                'knowledgeBaseId': 'string'
            }
        },
        'associationType': 'KNOWLEDGE_BASE',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • assistantAssociation (dict) --

      The assistant association.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q assistant.

      • assistantAssociationArn (string) --

        The Amazon Resource Name (ARN) of the assistant association.

      • assistantAssociationId (string) --

        The identifier of the assistant association.

      • assistantId (string) --

        The identifier of the Amazon Q assistant.

      • associationData (dict) --

        A union type that currently has a single argument, the knowledge base ID.

        • knowledgeBaseAssociation (dict) --

          The knowledge base where output data is sent.

          • knowledgeBaseArn (string) --

            The Amazon Resource Name (ARN) of the knowledge base.

          • knowledgeBaseId (string) --

            The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • associationType (string) --

        The type of association.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

TagResource (new) Link ¶

Adds the specified tags to the specified resource.

See also: AWS API Documentation

Request Syntax

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

string

param resourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource.

type tags

dict

param tags

[REQUIRED]

The tags used to organize, track, or control access for this resource.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateQuickResponse (new) Link ¶

Updates an existing Amazon Q quick response.

See also: AWS API Documentation

Request Syntax

client.update_quick_response(
    channels=[
        'string',
    ],
    content={
        'content': 'string'
    },
    contentType='string',
    description='string',
    groupingConfiguration={
        'criteria': 'string',
        'values': [
            'string',
        ]
    },
    isActive=True|False,
    knowledgeBaseId='string',
    language='string',
    name='string',
    quickResponseId='string',
    removeDescription=True|False,
    removeGroupingConfiguration=True|False,
    removeShortcutKey=True|False,
    shortcutKey='string'
)
type channels

list

param channels

The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat .

  • (string) --

type content

dict

param content

The updated content of the quick response.

  • content (string) --

    The content of the quick response.

type contentType

string

param contentType

The media type of the quick response content.

  • Use application/x.quickresponse;format=plain for quick response written in plain text.

  • Use application/x.quickresponse;format=markdown for quick response written in richtext.

type description

string

param description

The updated description of the quick response.

type groupingConfiguration

dict

param groupingConfiguration

The updated grouping configuration of the quick response.

  • criteria (string) --

    The criteria used for grouping Amazon Q users.

    The following is the list of supported criteria values.

  • values (list) --

    The list of values that define different groups of Amazon Q users.

    • (string) --

type isActive

boolean

param isActive

Whether the quick response is active.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type language

string

param language

The language code value for the language in which the quick response is written. The supported language codes include de_DE , en_US , es_ES , fr_FR , id_ID , it_IT , ja_JP , ko_KR , pt_BR , zh_CN , zh_TW

type name

string

param name

The name of the quick response.

type quickResponseId

string

param quickResponseId

[REQUIRED]

The identifier of the quick response.

type removeDescription

boolean

param removeDescription

Whether to remove the description from the quick response.

type removeGroupingConfiguration

boolean

param removeGroupingConfiguration

Whether to remove the grouping configuration of the quick response.

type removeShortcutKey

boolean

param removeShortcutKey

Whether to remove the shortcut key of the quick response.

type shortcutKey

string

param shortcutKey

The shortcut key of the quick response. The value should be unique across the knowledge base.

rtype

dict

returns

Response Syntax

{
    'quickResponse': {
        'channels': [
            'string',
        ],
        'contentType': 'string',
        'contents': {
            'markdown': {
                'content': 'string'
            },
            'plainText': {
                'content': 'string'
            }
        },
        'createdTime': datetime(2015, 1, 1),
        'description': 'string',
        'groupingConfiguration': {
            'criteria': 'string',
            'values': [
                'string',
            ]
        },
        'isActive': True|False,
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'language': 'string',
        'lastModifiedBy': 'string',
        'lastModifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'quickResponseArn': 'string',
        'quickResponseId': 'string',
        'shortcutKey': 'string',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'CREATED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • quickResponse (dict) --

      The quick response.

      • channels (list) --

        The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat .

        • (string) --

      • contentType (string) --

        The media type of the quick response content.

        • Use application/x.quickresponse;format=plain for quick response written in plain text.

        • Use application/x.quickresponse;format=markdown for quick response written in richtext.

      • contents (dict) --

        The contents of the quick response.

        • markdown (dict) --

          The container quick response content.

          • content (string) --

            The content of the quick response.

        • plainText (dict) --

          The container quick response content.

          • content (string) --

            The content of the quick response.

      • createdTime (datetime) --

        The timestamp when the quick response was created.

      • description (string) --

        The description of the quick response.

      • groupingConfiguration (dict) --

        The configuration information of the user groups that the quick response is accessible to.

        • criteria (string) --

          The criteria used for grouping Amazon Q users.

          The following is the list of supported criteria values.

        • values (list) --

          The list of values that define different groups of Amazon Q users.

          • (string) --

      • isActive (boolean) --

        Whether the quick response is active.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

      • language (string) --

        The language code value for the language in which the quick response is written.

      • lastModifiedBy (string) --

        The Amazon Resource Name (ARN) of the user who last updated the quick response data.

      • lastModifiedTime (datetime) --

        The timestamp when the quick response data was last modified.

      • name (string) --

        The name of the quick response.

      • quickResponseArn (string) --

        The Amazon Resource Name (ARN) of the quick response.

      • quickResponseId (string) --

        The identifier of the quick response.

      • shortcutKey (string) --

        The shortcut key of the quick response. The value should be unique across the knowledge base.

      • status (string) --

        The status of the quick response data.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

SearchContent (new) Link ¶

Searches for content in a specified knowledge base. Can be used to get a specific content resource by its name.

See also: AWS API Documentation

Request Syntax

client.search_content(
    knowledgeBaseId='string',
    maxResults=123,
    nextToken='string',
    searchExpression={
        'filters': [
            {
                'field': 'NAME',
                'operator': 'EQUALS',
                'value': 'string'
            },
        ]
    }
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type searchExpression

dict

param searchExpression

[REQUIRED]

The search expression to filter results.

  • filters (list) -- [REQUIRED]

    The search expression filters.

    • (dict) --

      A search filter.

      • field (string) -- [REQUIRED]

        The field on which to filter.

      • operator (string) -- [REQUIRED]

        The operator to use for comparing the field’s value with the provided value.

      • value (string) -- [REQUIRED]

        The desired field value on which to filter.

rtype

dict

returns

Response Syntax

{
    'contentSummaries': [
        {
            'contentArn': 'string',
            'contentId': 'string',
            'contentType': 'string',
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'metadata': {
                'string': 'string'
            },
            'name': 'string',
            'revisionId': 'string',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_FAILED',
            'tags': {
                'string': 'string'
            },
            'title': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • contentSummaries (list) --

      Summary information about the content.

      • (dict) --

        Summary information about the content.

        • contentArn (string) --

          The Amazon Resource Name (ARN) of the content.

        • contentId (string) --

          The identifier of the content.

        • contentType (string) --

          The media type of the content.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

        • metadata (dict) --

          A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

          • (string) --

            • (string) --

        • name (string) --

          The name of the content.

        • revisionId (string) --

          The identifier of the revision of the content.

        • status (string) --

          The status of the content.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

        • title (string) --

          The title of the content.

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

UntagResource (new) Link ¶

Removes the specified tags from the specified resource.

See also: AWS API Documentation

Request Syntax

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

string

param resourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource.

type tagKeys

list

param tagKeys

[REQUIRED]

The tag keys.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateContent (new) Link ¶

Updates information about the content.

See also: AWS API Documentation

Request Syntax

client.update_content(
    contentId='string',
    knowledgeBaseId='string',
    metadata={
        'string': 'string'
    },
    overrideLinkOutUri='string',
    removeOverrideLinkOutUri=True|False,
    revisionId='string',
    title='string',
    uploadId='string'
)
type contentId

string

param contentId

[REQUIRED]

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN

type metadata

dict

param metadata

A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

  • (string) --

    • (string) --

type overrideLinkOutUri

string

param overrideLinkOutUri

The URI for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content. To remove an existing overrideLinkOurUri , exclude this argument and set removeOverrideLinkOutUri to true.

type removeOverrideLinkOutUri

boolean

param removeOverrideLinkOutUri

Unset the existing overrideLinkOutUri if it exists.

type revisionId

string

param revisionId

The revisionId of the content resource to update, taken from an earlier call to GetContent , GetContentSummary , SearchContent , or ListContents . If included, this argument acts as an optimistic lock to ensure content was not modified since it was last read. If it has been modified, this API throws a PreconditionFailedException .

type title

string

param title

The title of the content.

type uploadId

string

param uploadId

A pointer to the uploaded asset. This value is returned by StartContentUpload .

rtype

dict

returns

Response Syntax

{
    'content': {
        'contentArn': 'string',
        'contentId': 'string',
        'contentType': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'linkOutUri': 'string',
        'metadata': {
            'string': 'string'
        },
        'name': 'string',
        'revisionId': 'string',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_FAILED',
        'tags': {
            'string': 'string'
        },
        'title': 'string',
        'url': 'string',
        'urlExpiry': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • content (dict) --

      The content.

      • contentArn (string) --

        The Amazon Resource Name (ARN) of the content.

      • contentId (string) --

        The identifier of the content.

      • contentType (string) --

        The media type of the content.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • linkOutUri (string) --

        The URI of the content.

      • metadata (dict) --

        A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

        • (string) --

          • (string) --

      • name (string) --

        The name of the content.

      • revisionId (string) --

        The identifier of the content revision.

      • status (string) --

        The status of the content.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • title (string) --

        The title of the content.

      • url (string) --

        The URL of the content.

      • urlExpiry (datetime) --

        The expiration time of the URL as an epoch timestamp.

NotifyRecommendationsReceived (new) Link ¶

Removes the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with GetRecommendations and a waitTimeSeconds input for long-polling behavior and avoiding duplicate recommendations.

See also: AWS API Documentation

Request Syntax

client.notify_recommendations_received(
    assistantId='string',
    recommendationIds=[
        'string',
    ],
    sessionId='string'
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type recommendationIds

list

param recommendationIds

[REQUIRED]

The identifiers of the recommendations.

  • (string) --

type sessionId

string

param sessionId

[REQUIRED]

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{
    'errors': [
        {
            'message': 'string',
            'recommendationId': 'string'
        },
    ],
    'recommendationIds': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • errors (list) --

      The identifiers of recommendations that are causing errors.

      • (dict) --

        An error occurred when creating a recommendation.

        • message (string) --

          A recommendation is causing an error.

        • recommendationId (string) --

          The identifier of the recommendation that is in error.

    • recommendationIds (list) --

      The identifiers of the recommendations.

      • (string) --

DeleteContent (new) Link ¶

Deletes the content.

See also: AWS API Documentation

Request Syntax

client.delete_content(
    contentId='string',
    knowledgeBaseId='string'
)
type contentId

string

param contentId

[REQUIRED]

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetAssistantAssociation (new) Link ¶

Retrieves information about an assistant association.

See also: AWS API Documentation

Request Syntax

client.get_assistant_association(
    assistantAssociationId='string',
    assistantId='string'
)
type assistantAssociationId

string

param assistantAssociationId

[REQUIRED]

The identifier of the assistant association. Can be either the ID or the ARN. URLs cannot contain the ARN.

type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{
    'assistantAssociation': {
        'assistantArn': 'string',
        'assistantAssociationArn': 'string',
        'assistantAssociationId': 'string',
        'assistantId': 'string',
        'associationData': {
            'knowledgeBaseAssociation': {
                'knowledgeBaseArn': 'string',
                'knowledgeBaseId': 'string'
            }
        },
        'associationType': 'KNOWLEDGE_BASE',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • assistantAssociation (dict) --

      The assistant association.

      • assistantArn (string) --

        The Amazon Resource Name (ARN) of the Amazon Q assistant.

      • assistantAssociationArn (string) --

        The Amazon Resource Name (ARN) of the assistant association.

      • assistantAssociationId (string) --

        The identifier of the assistant association.

      • assistantId (string) --

        The identifier of the Amazon Q assistant.

      • associationData (dict) --

        A union type that currently has a single argument, the knowledge base ID.

        • knowledgeBaseAssociation (dict) --

          The knowledge base where output data is sent.

          • knowledgeBaseArn (string) --

            The Amazon Resource Name (ARN) of the knowledge base.

          • knowledgeBaseId (string) --

            The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • associationType (string) --

        The type of association.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

ListKnowledgeBases (new) Link ¶

Lists the knowledge bases.

See also: AWS API Documentation

Request Syntax

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

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'knowledgeBaseSummaries': [
        {
            'description': 'string',
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'knowledgeBaseType': 'EXTERNAL'|'CUSTOM'|'QUICK_RESPONSES',
            'name': 'string',
            'renderingConfiguration': {
                'templateUri': 'string'
            },
            'serverSideEncryptionConfiguration': {
                'kmsKeyId': 'string'
            },
            'sourceConfiguration': {
                'appIntegrations': {
                    'appIntegrationArn': 'string',
                    'objectFields': [
                        'string',
                    ]
                }
            },
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • knowledgeBaseSummaries (list) --

      Information about the knowledge bases.

      • (dict) --

        Summary information about the knowledge base.

        • description (string) --

          The description of the knowledge base.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

        • knowledgeBaseType (string) --

          The type of knowledge base.

        • name (string) --

          The name of the knowledge base.

        • renderingConfiguration (dict) --

          Information about how to render the content.

          • templateUri (string) --

            A URI template containing exactly one variable in ${variableName} format. This can only be set for EXTERNAL knowledge bases. For Salesforce, ServiceNow, and Zendesk, the variable must be one of the following:

            • Salesforce: Id , ArticleNumber , VersionNumber , Title , PublishStatus , or IsDeleted

            • ServiceNow: number , short_description , sys_mod_count , workflow_state , or active

            • Zendesk: id , title , updated_at , or draft

            The variable is replaced with the actual value for a piece of content when calling GetContent .

        • serverSideEncryptionConfiguration (dict) --

          The configuration information for the customer managed key used for encryption.

          This KMS key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q.

          For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

        • sourceConfiguration (dict) --

          Configuration information about the external data source.

          • appIntegrations (dict) --

            Configuration information for Amazon AppIntegrations to automatically ingest content.

            • appIntegrationArn (string) --

              The Amazon Resource Name (ARN) of the AppIntegrations DataIntegration to use for ingesting content.

              • For Salesforce , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted as source fields.

              • For ServiceNow , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least number , short_description , sys_mod_count , workflow_state , and active as source fields.

              • For Zendesk , your AppIntegrations DataIntegration must have an ObjectConfiguration if objectFields is not provided, including at least id , title , updated_at , and draft as source fields.

              • For SharePoint , your AppIntegrations DataIntegration must have a FileConfiguration, including only file extensions that are among docx , pdf , html , htm , and txt .

              • For Amazon S3 , the ObjectConfiguration and FileConfiguration of your AppIntegrations DataIntegration must be null. The SourceURI of your DataIntegration must use the following format: s3://your_s3_bucket_name .

              Warning

              The bucket policy of the corresponding S3 bucket must allow the Amazon Web Services principal app-integrations.amazonaws.com to perform s3:ListBucket , s3:GetObject , and s3:GetBucketLocation against the bucket.

            • objectFields (list) --

              The fields from the source that are made available to your agents in Amazon Q. Optional if ObjectConfiguration is included in the provided DataIntegration.

              • For Salesforce , you must include at least Id , ArticleNumber , VersionNumber , Title , PublishStatus , and IsDeleted .

              • For ServiceNow , you must include at least number , short_description , sys_mod_count , workflow_state , and active .

              • For Zendesk , you must include at least id , title , updated_at , and draft .

              Make sure to include additional fields. These fields are indexed and used to source recommendations.

              • (string) --

        • status (string) --

          The status of the knowledge base summary.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

ListAssistants (new) Link ¶

Lists information about assistants.

See also: AWS API Documentation

Request Syntax

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

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'assistantSummaries': [
        {
            'assistantArn': 'string',
            'assistantId': 'string',
            'capabilityConfiguration': {
                'type': 'V1'|'V2'
            },
            'description': 'string',
            'integrationConfiguration': {
                'topicIntegrationArn': 'string'
            },
            'name': 'string',
            'serverSideEncryptionConfiguration': {
                'kmsKeyId': 'string'
            },
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
            'tags': {
                'string': 'string'
            },
            'type': 'AGENT'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • assistantSummaries (list) --

      Information about the assistants.

      • (dict) --

        Summary information about the assistant.

        • assistantArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Q assistant.

        • assistantId (string) --

          The identifier of the Amazon Q assistant.

        • capabilityConfiguration (dict) --

          The configuration information for the Amazon Q assistant capability.

          • type (string) --

            The type of Amazon Q assistant capability.

        • description (string) --

          The description of the assistant.

        • integrationConfiguration (dict) --

          The configuration information for the Amazon Q assistant integration.

          • topicIntegrationArn (string) --

            The Amazon Resource Name (ARN) of the integrated Amazon SNS topic used for streaming chat messages.

        • name (string) --

          The name of the assistant.

        • serverSideEncryptionConfiguration (dict) --

          The configuration information for the customer managed key used for encryption.

          This KMS key must have a policy that allows kms:CreateGrant , kms:DescribeKey , kms:Decrypt , and kms:GenerateDataKey* permissions to the IAM identity using the key to invoke Amazon Q. To use Amazon Q with chat, the key policy must also allow kms:Decrypt , kms:GenerateDataKey* , and kms:DescribeKey permissions to the connect.amazonaws.com service principal.

          For more information about setting up a customer managed key for Amazon Q, see Enable Amazon Q in Connect for your instance .

        • status (string) --

          The status of the assistant.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

        • type (string) --

          The type of the assistant.

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

GetContent (new) Link ¶

Retrieves content, including a pre-signed URL to download the content.

See also: AWS API Documentation

Request Syntax

client.get_content(
    contentId='string',
    knowledgeBaseId='string'
)
type contentId

string

param contentId

[REQUIRED]

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{
    'content': {
        'contentArn': 'string',
        'contentId': 'string',
        'contentType': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'linkOutUri': 'string',
        'metadata': {
            'string': 'string'
        },
        'name': 'string',
        'revisionId': 'string',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_FAILED',
        'tags': {
            'string': 'string'
        },
        'title': 'string',
        'url': 'string',
        'urlExpiry': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • content (dict) --

      The content.

      • contentArn (string) --

        The Amazon Resource Name (ARN) of the content.

      • contentId (string) --

        The identifier of the content.

      • contentType (string) --

        The media type of the content.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • linkOutUri (string) --

        The URI of the content.

      • metadata (dict) --

        A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

        • (string) --

          • (string) --

      • name (string) --

        The name of the content.

      • revisionId (string) --

        The identifier of the content revision.

      • status (string) --

        The status of the content.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • title (string) --

        The title of the content.

      • url (string) --

        The URL of the content.

      • urlExpiry (datetime) --

        The expiration time of the URL as an epoch timestamp.

ListImportJobs (new) Link ¶

Lists information about import jobs.

See also: AWS API Documentation

Request Syntax

client.list_import_jobs(
    knowledgeBaseId='string',
    maxResults=123,
    nextToken='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'importJobSummaries': [
        {
            'createdTime': datetime(2015, 1, 1),
            'externalSourceConfiguration': {
                'configuration': {
                    'connectConfiguration': {
                        'instanceId': 'string'
                    }
                },
                'source': 'AMAZON_CONNECT'
            },
            'importJobId': 'string',
            'importJobType': 'QUICK_RESPONSES',
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'lastModifiedTime': datetime(2015, 1, 1),
            'metadata': {
                'string': 'string'
            },
            'status': 'START_IN_PROGRESS'|'FAILED'|'COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
            'uploadId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • importJobSummaries (list) --

      Summary information about the import jobs.

      • (dict) --

        Summary information about the import job.

        • createdTime (datetime) --

          The timestamp when the import job was created.

        • externalSourceConfiguration (dict) --

          The configuration information of the external source that the resource data are imported from.

          • configuration (dict) --

            The configuration information of the external data source.

            • connectConfiguration (dict) --

              The configuration information of the Amazon Connect data source.

              • instanceId (string) --

                The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

          • source (string) --

            The type of the external data source.

        • importJobId (string) --

          The identifier of the import job.

        • importJobType (string) --

          The type of import job.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

        • lastModifiedTime (datetime) --

          The timestamp when the import job was last modified.

        • metadata (dict) --

          The metadata fields of the imported Amazon Q resources.

          • (string) --

            • (string) --

        • status (string) --

          The status of the import job.

        • uploadId (string) --

          A pointer to the uploaded asset. This value is returned by StartContentUpload .

    • nextToken (string) --

      The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

SearchSessions (new) Link ¶

Searches for sessions.

See also: AWS API Documentation

Request Syntax

client.search_sessions(
    assistantId='string',
    maxResults=123,
    nextToken='string',
    searchExpression={
        'filters': [
            {
                'field': 'NAME',
                'operator': 'EQUALS',
                'value': 'string'
            },
        ]
    }
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type searchExpression

dict

param searchExpression

[REQUIRED]

The search expression to filter results.

  • filters (list) -- [REQUIRED]

    The search expression filters.

    • (dict) --

      A search filter.

      • field (string) -- [REQUIRED]

        The field on which to filter.

      • operator (string) -- [REQUIRED]

        The operator to use for comparing the field’s value with the provided value.

      • value (string) -- [REQUIRED]

        The desired field value on which to filter.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'sessionSummaries': [
        {
            'assistantArn': 'string',
            'assistantId': 'string',
            'sessionArn': 'string',
            'sessionId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

    • sessionSummaries (list) --

      Summary information about the sessions.

      • (dict) --

        Summary information about the session.

        • assistantArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Q assistant.

        • assistantId (string) --

          The identifier of the Amazon Q assistant.

        • sessionArn (string) --

          The Amazon Resource Name (ARN) of the session.

        • sessionId (string) --

          The identifier of the session.

DeleteKnowledgeBase (new) Link ¶

Deletes the knowledge base.

Note

When you use this API to delete an external knowledge base such as Salesforce or ServiceNow, you must also delete the Amazon AppIntegrations DataIntegration. This is because you can't reuse the DataIntegration after it's been associated with an external knowledge base. However, you can delete and recreate it. See DeleteDataIntegration and CreateDataIntegration in the Amazon AppIntegrations API Reference .

See also: AWS API Documentation

Request Syntax

client.delete_knowledge_base(
    knowledgeBaseId='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The knowledge base to delete content from. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetImportJob (new) Link ¶

Retrieves the started import job.

See also: AWS API Documentation

Request Syntax

client.get_import_job(
    importJobId='string',
    knowledgeBaseId='string'
)
type importJobId

string

param importJobId

[REQUIRED]

The identifier of the import job to retrieve.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base that the import job belongs to.

rtype

dict

returns

Response Syntax

{
    'importJob': {
        'createdTime': datetime(2015, 1, 1),
        'externalSourceConfiguration': {
            'configuration': {
                'connectConfiguration': {
                    'instanceId': 'string'
                }
            },
            'source': 'AMAZON_CONNECT'
        },
        'failedRecordReport': 'string',
        'importJobId': 'string',
        'importJobType': 'QUICK_RESPONSES',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'lastModifiedTime': datetime(2015, 1, 1),
        'metadata': {
            'string': 'string'
        },
        'status': 'START_IN_PROGRESS'|'FAILED'|'COMPLETE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'uploadId': 'string',
        'url': 'string',
        'urlExpiry': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • importJob (dict) --

      The import job.

      • createdTime (datetime) --

        The timestamp when the import job was created.

      • externalSourceConfiguration (dict) --

        The configuration information of the external data source.

        • configuration (dict) --

          The configuration information of the external data source.

          • connectConfiguration (dict) --

            The configuration information of the Amazon Connect data source.

            • instanceId (string) --

              The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

        • source (string) --

          The type of the external data source.

      • failedRecordReport (string) --

        The link to donwload the information of resource data that failed to be imported.

      • importJobId (string) --

        The identifier of the import job.

      • importJobType (string) --

        The type of the import job.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • lastModifiedTime (datetime) --

        The timestamp when the import job data was last modified.

      • metadata (dict) --

        The metadata fields of the imported Amazon Q resources.

        • (string) --

          • (string) --

      • status (string) --

        The status of the import job.

      • uploadId (string) --

        A pointer to the uploaded asset. This value is returned by StartContentUpload .

      • url (string) --

        The download link to the resource file that is uploaded to the import job.

      • urlExpiry (datetime) --

        The expiration time of the URL as an epoch timestamp.

ListContents (new) Link ¶

Lists the content.

See also: AWS API Documentation

Request Syntax

client.list_contents(
    knowledgeBaseId='string',
    maxResults=123,
    nextToken='string'
)
type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

rtype

dict

returns

Response Syntax

{
    'contentSummaries': [
        {
            'contentArn': 'string',
            'contentId': 'string',
            'contentType': 'string',
            'knowledgeBaseArn': 'string',
            'knowledgeBaseId': 'string',
            'metadata': {
                'string': 'string'
            },
            'name': 'string',
            'revisionId': 'string',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_FAILED',
            'tags': {
                'string': 'string'
            },
            'title': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • contentSummaries (list) --

      Information about the content.

      • (dict) --

        Summary information about the content.

        • contentArn (string) --

          The Amazon Resource Name (ARN) of the content.

        • contentId (string) --

          The identifier of the content.

        • contentType (string) --

          The media type of the content.

        • knowledgeBaseArn (string) --

          The Amazon Resource Name (ARN) of the knowledge base.

        • knowledgeBaseId (string) --

          The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

        • metadata (dict) --

          A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

          • (string) --

            • (string) --

        • name (string) --

          The name of the content.

        • revisionId (string) --

          The identifier of the revision of the content.

        • status (string) --

          The status of the content.

        • tags (dict) --

          The tags used to organize, track, or control access for this resource.

          • (string) --

            • (string) --

        • title (string) --

          The title of the content.

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

QueryAssistant (new) Link ¶

Performs a manual search against the specified assistant. To retrieve recommendations for an assistant, use GetRecommendations .

See also: AWS API Documentation

Request Syntax

client.query_assistant(
    assistantId='string',
    maxResults=123,
    nextToken='string',
    queryCondition=[
        {
            'single': {
                'comparator': 'EQUALS',
                'field': 'RESULT_TYPE',
                'value': 'string'
            }
        },
    ],
    queryText='string',
    sessionId='string'
)
type assistantId

string

param assistantId

[REQUIRED]

The identifier of the Amazon Q assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

type maxResults

integer

param maxResults

The maximum number of results to return per page.

type nextToken

string

param nextToken

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

type queryCondition

list

param queryCondition

Information about how to query content.

  • (dict) --

    Information about how to query content.

    • single (dict) --

      The condition for the query.

      • comparator (string) -- [REQUIRED]

        The comparison operator for query condition to query on.

      • field (string) -- [REQUIRED]

        The name of the field for query condition to query on.

      • value (string) -- [REQUIRED]

        The value for the query condition to query on.

type queryText

string

param queryText

[REQUIRED]

The text to search for.

type sessionId

string

param sessionId

The identifier of the Amazon Q session. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'results': [
        {
            'data': {
                'details': {
                    'contentData': {
                        'rankingData': {
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW',
                            'relevanceScore': 123.0
                        },
                        'textData': {
                            'excerpt': {
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ],
                                'text': 'string'
                            },
                            'title': {
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ],
                                'text': 'string'
                            }
                        }
                    },
                    'generativeData': {
                        'completion': 'string',
                        'rankingData': {
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW',
                            'relevanceScore': 123.0
                        },
                        'references': [
                            {'... recursive ...'},
                        ]
                    },
                    'sourceContentData': {
                        'id': 'string',
                        'rankingData': {
                            'relevanceLevel': 'HIGH'|'MEDIUM'|'LOW',
                            'relevanceScore': 123.0
                        },
                        'textData': {
                            'excerpt': {
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ],
                                'text': 'string'
                            },
                            'title': {
                                'highlights': [
                                    {
                                        'beginOffsetInclusive': 123,
                                        'endOffsetExclusive': 123
                                    },
                                ],
                                'text': 'string'
                            }
                        },
                        'type': 'KNOWLEDGE_CONTENT'
                    }
                },
                'reference': {
                    'contentReference': {
                        'contentArn': 'string',
                        'contentId': 'string',
                        'knowledgeBaseArn': 'string',
                        'knowledgeBaseId': 'string'
                    },
                    'generativeReference': {
                        'generationId': 'string',
                        'modelId': 'string'
                    }
                }
            },
            'document': {
                'contentReference': {
                    'contentArn': 'string',
                    'contentId': 'string',
                    'knowledgeBaseArn': 'string',
                    'knowledgeBaseId': 'string'
                },
                'excerpt': {
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ],
                    'text': 'string'
                },
                'title': {
                    'highlights': [
                        {
                            'beginOffsetInclusive': 123,
                            'endOffsetExclusive': 123
                        },
                    ],
                    'text': 'string'
                }
            },
            'relevanceScore': 123.0,
            'resultId': 'string',
            'type': 'KNOWLEDGE_CONTENT'|'GENERATIVE_ANSWER'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      If there are additional results, this is the token for the next set of results.

    • results (list) --

      The results of the query.

      • (dict) --

        Information about the result.

        • data (dict) --

          Summary of the recommended content.

          • details (dict) --

            Details about the data.

            • contentData (dict) --

              Details about the content data.

              • rankingData (dict) --

                Details about the content ranking data.

                • relevanceLevel (string) --

                  The relevance score of the content.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

              • textData (dict) --

                Details about the content text data.

                • excerpt (dict) --

                  The text of the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                  • text (string) --

                    Text in the document.

                • title (dict) --

                  The text of the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                  • text (string) --

                    Text in the document.

            • generativeData (dict) --

              Details about the generative data.

              • completion (string) --

                The LLM response.

              • rankingData (dict) --

                Details about the generative content ranking data.

                • relevanceLevel (string) --

                  The relevance score of the content.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

              • references (list) --

                The references used to generative the LLM response.

                • (dict) --

                  Summary of the data.

            • sourceContentData (dict) --

              Details about the content data.

              • id (string) --

                The identifier of the source content.

              • rankingData (dict) --

                Details about the source content ranking data.

                • relevanceLevel (string) --

                  The relevance score of the content.

                • relevanceScore (float) --

                  The relevance level of the recommendation.

              • textData (dict) --

                Details about the source content text data.

                • excerpt (dict) --

                  The text of the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                  • text (string) --

                    Text in the document.

                • title (dict) --

                  The text of the document.

                  • highlights (list) --

                    Highlights in the document text.

                    • (dict) --

                      Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                      • beginOffsetInclusive (integer) --

                        The offset for the start of the highlight.

                      • endOffsetExclusive (integer) --

                        The offset for the end of the highlight.

                  • text (string) --

                    Text in the document.

              • type (string) --

                The type of the source content.

          • reference (dict) --

            Reference information about the content.

            • contentReference (dict) --

              Reference information about the content.

              • contentArn (string) --

                The Amazon Resource Name (ARN) of the content.

              • contentId (string) --

                The identifier of the content.

              • knowledgeBaseArn (string) --

                The Amazon Resource Name (ARN) of the knowledge base.

              • knowledgeBaseId (string) --

                The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

            • generativeReference (dict) --

              Reference information about the generative content.

              • generationId (string) --

                The identifier of the LLM model.

              • modelId (string) --

                The identifier of the LLM model.

        • document (dict) --

          The document.

          • contentReference (dict) --

            A reference to the content resource.

            • contentArn (string) --

              The Amazon Resource Name (ARN) of the content.

            • contentId (string) --

              The identifier of the content.

            • knowledgeBaseArn (string) --

              The Amazon Resource Name (ARN) of the knowledge base.

            • knowledgeBaseId (string) --

              The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

          • excerpt (dict) --

            The excerpt from the document.

            • highlights (list) --

              Highlights in the document text.

              • (dict) --

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) --

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) --

                  The offset for the end of the highlight.

            • text (string) --

              Text in the document.

          • title (dict) --

            The title of the document.

            • highlights (list) --

              Highlights in the document text.

              • (dict) --

                Offset specification to describe highlighting of document excerpts for rendering search results and recommendations.

                • beginOffsetInclusive (integer) --

                  The offset for the start of the highlight.

                • endOffsetExclusive (integer) --

                  The offset for the end of the highlight.

            • text (string) --

              Text in the document.

        • relevanceScore (float) --

          The relevance score of the results.

        • resultId (string) --

          The identifier of the result data.

        • type (string) --

          The type of the query result.

GetContentSummary (new) Link ¶

Retrieves summary information about the content.

See also: AWS API Documentation

Request Syntax

client.get_content_summary(
    contentId='string',
    knowledgeBaseId='string'
)
type contentId

string

param contentId

[REQUIRED]

The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.

type knowledgeBaseId

string

param knowledgeBaseId

[REQUIRED]

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype

dict

returns

Response Syntax

{
    'contentSummary': {
        'contentArn': 'string',
        'contentId': 'string',
        'contentType': 'string',
        'knowledgeBaseArn': 'string',
        'knowledgeBaseId': 'string',
        'metadata': {
            'string': 'string'
        },
        'name': 'string',
        'revisionId': 'string',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED'|'UPDATE_FAILED',
        'tags': {
            'string': 'string'
        },
        'title': 'string'
    }
}

Response Structure

  • (dict) --

    • contentSummary (dict) --

      The content summary.

      • contentArn (string) --

        The Amazon Resource Name (ARN) of the content.

      • contentId (string) --

        The identifier of the content.

      • contentType (string) --

        The media type of the content.

      • knowledgeBaseArn (string) --

        The Amazon Resource Name (ARN) of the knowledge base.

      • knowledgeBaseId (string) --

        The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Amazon Q Content resource to it.

      • metadata (dict) --

        A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Amazon Q, you can store an external version identifier as metadata to utilize for determining drift.

        • (string) --

          • (string) --

      • name (string) --

        The name of the content.

      • revisionId (string) --

        The identifier of the revision of the content.

      • status (string) --

        The status of the content.

      • tags (dict) --

        The tags used to organize, track, or control access for this resource.

        • (string) --

          • (string) --

      • title (string) --

        The title of the content.