Amazon Q Connect

2024/12/02 - Amazon Q Connect - 11 new14 updated api methods

Changes  This release adds following capabilities: Configuring safeguards via AIGuardrails for Q in Connect inferencing, and APIs to support Q&A self-service use cases

CreateAIGuardrail (new) Link ¶

Creates an Amazon Q in Connect AI Guardrail.

See also: AWS API Documentation

Request Syntax

client.create_ai_guardrail(
    assistantId='string',
    blockedInputMessaging='string',
    blockedOutputsMessaging='string',
    clientToken='string',
    contentPolicyConfig={
        'filtersConfig': [
            {
                'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK'
            },
        ]
    },
    contextualGroundingPolicyConfig={
        'filtersConfig': [
            {
                'threshold': 123.0,
                'type': 'GROUNDING'|'RELEVANCE'
            },
        ]
    },
    description='string',
    name='string',
    sensitiveInformationPolicyConfig={
        'piiEntitiesConfig': [
            {
                'action': 'BLOCK'|'ANONYMIZE',
                'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER'
            },
        ],
        'regexesConfig': [
            {
                'action': 'BLOCK'|'ANONYMIZE',
                'description': 'string',
                'name': 'string',
                'pattern': 'string'
            },
        ]
    },
    tags={
        'string': 'string'
    },
    topicPolicyConfig={
        'topicsConfig': [
            {
                'definition': 'string',
                'examples': [
                    'string',
                ],
                'name': 'string',
                'type': 'DENY'
            },
        ]
    },
    visibilityStatus='SAVED'|'PUBLISHED',
    wordPolicyConfig={
        'managedWordListsConfig': [
            {
                'type': 'PROFANITY'
            },
        ],
        'wordsConfig': [
            {
                'text': 'string'
            },
        ]
    }
)
type assistantId:

string

param assistantId:

[REQUIRED]

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

type blockedInputMessaging:

string

param blockedInputMessaging:

[REQUIRED]

The message to return when the AI Guardrail blocks a prompt.

type blockedOutputsMessaging:

string

param blockedOutputsMessaging:

[REQUIRED]

The message to return when the AI Guardrail blocks a model response.

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 contentPolicyConfig:

dict

param contentPolicyConfig:

The content filter policies to configure for the AI Guardrail.

  • filtersConfig (list) -- [REQUIRED]

    Contains the type of the content filter and how strongly it should apply to prompts and model responses.

    • (dict) --

      Contains filter strengths for harmful content. AI Guardrail's support the following content filters to detect and filter harmful user inputs and FM-generated outputs.

      • Hate: Describes input prompts and model responses that discriminate, criticize, insult, denounce, or dehumanize a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).

      • Insults: Describes input prompts and model responses that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.

      • Sexual: Describes input prompts and model responses that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.

      • Violence: Describes input prompts and model responses that includes glorification of, or threats to inflict physical pain, hurt, or injury toward a person, group, or thing.

      Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as Hate with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as Hate with HIGH confidence, Insults with LOW confidence, Sexual with NONE confidence, and Violence with MEDIUM confidence.

      • inputStrength (string) -- [REQUIRED]

        The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

      • outputStrength (string) -- [REQUIRED]

        The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

      • type (string) -- [REQUIRED]

        The harmful category that the content filter is applied to.

type contextualGroundingPolicyConfig:

dict

param contextualGroundingPolicyConfig:

The contextual grounding policy configuration used to create an AI Guardrail.

  • filtersConfig (list) -- [REQUIRED]

    The filter configuration details for the AI Guardrails contextual grounding policy.

    • (dict) --

      The filter configuration details for the AI Guardrail's contextual grounding filter.

      • threshold (float) -- [REQUIRED]

        The threshold details for the AI Guardrail's contextual grounding filter.

      • type (string) -- [REQUIRED]

        The filter type for the AI Guardrail's contextual grounding filter.

type description:

string

param description:

A description of the AI Guardrail.

type name:

string

param name:

[REQUIRED]

The name of the AI Guardrail.

type sensitiveInformationPolicyConfig:

dict

param sensitiveInformationPolicyConfig:

The sensitive information policy to configure for the AI Guardrail.

  • piiEntitiesConfig (list) --

    A list of PII entities to configure to the AI Guardrail.

    • (dict) --

      The PII entity to configure for the AI Guardrail.

      • action (string) -- [REQUIRED]

        Configure AI Guardrail's action when the PII entity is detected.

      • type (string) -- [REQUIRED]

        Configure AI Guardrail type when the PII entity is detected.

        The following PIIs are used to block or mask sensitive information:

        • General

          • ADDRESS A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood.

          • AGE An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guarrails recognizes "40 years" as an age.

          • NAME An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. AI Guardrail doesn't apply this entity type to names that are part of organizations or addresses. For example, AI Guardrail recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address.

          • EMAIL An email address, such as marymajor@email.com.

          • PHONE A phone number. This entity type also includes fax and pager numbers.

          • USERNAME A user name that identifies an account, such as a login name, screen name, nick name, or handle.

          • PASSWORD An alphanumeric string that is used as a password, such as "** very20special#pass**".

          • DRIVER_ID The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters.

          • LICENSE_PLATE A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper-case letters and numbers. The format varies depending on the location of the issuing state or country.

          • VEHICLE_IDENTIFICATION_NUMBER A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the ISO 3779 specification. Each country has specific codes and formats for VINs.

        • Finance

          • REDIT_DEBIT_CARD_CVV A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code.

          • CREDIT_DEBIT_CARD_EXPIRY The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as month/year or MM/YY. AI Guardrail recognizes expiration dates such as 01/21, 01/2021, and Jan 2021.

          • CREDIT_DEBIT_CARD_NUMBER The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present.

          • PIN A four-digit personal identification number (PIN) with which you can access your bank account.

          • INTERNATIONAL_BANK_ACCOUNT_NUMBER An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure.

          • SWIFT_CODE A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office.

        • IT

          • IP_ADDRESS An IPv4 address, such as 198.51.100.0.

          • MAC_ADDRESS A media access control (MAC) address is a unique identifier assigned to a network interface controller (NIC).

          • URL A web address, such as www.example.com.

          • AWS_ACCESS_KEY A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

          • AWS_SECRET_KEY A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

        • USA specific

          • US_BANK_ACCOUNT_NUMBER A US bank account number, which is typically 10 to 12 digits long.

          • US_BANK_ROUTING_NUMBER A US bank account routing number. These are typically nine digits long,

          • US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits.

          • US_PASSPORT_NUMBER A US passport number. Passport numbers range from six to nine alphanumeric characters.

          • US_SOCIAL_SECURITY_NUMBER A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents.

        • Canada specific

          • CA_HEALTH_NUMBER A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits.

          • CA_SOCIAL_INSURANCE_NUMBER A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits. The SIN is formatted as three groups of three digits, such as 123-456-789. A SIN can be validated through a simple check-digit process called the Luhn algorithm .

        • UK Specific

          • UK_NATIONAL_HEALTH_SERVICE_NUMBER A UK National Health Service Number is a 10-17 digit number, such as 485 555 3456. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum.

          • UK_NATIONAL_INSURANCE_NUMBER A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system. The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits.

          • UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business.

        • Custom

          • Regex filter - You can use a regular expressions to define patterns for an AI Guardrail to recognize and act upon such as serial number, booking ID etc..

  • regexesConfig (list) --

    A list of regular expressions to configure to the AI Guardrail.

    • (dict) --

      The regular expression to configure for the AI Guardrail.

      • action (string) -- [REQUIRED]

        The AI Guardrail action to configure when matching regular expression is detected.

      • description (string) --

        The description of the regular expression to configure for the AI Guardrail.

      • name (string) -- [REQUIRED]

        The name of the regular expression to configure for the AI Guardrail.

      • pattern (string) -- [REQUIRED]

        The regular expression pattern to configure for the AI Guardrail.

type tags:

dict

param tags:

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

  • (string) --

    • (string) --

type topicPolicyConfig:

dict

param topicPolicyConfig:

The topic policies to configure for the AI Guardrail.

  • topicsConfig (list) -- [REQUIRED]

    A list of policies related to topics that the AI Guardrail should deny.

    • (dict) --

      Details about topics for the AI Guardrail to identify and deny.

      • definition (string) -- [REQUIRED]

        A definition of the topic to deny.

      • examples (list) --

        A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.

        • (string) --

          Text example in topic policy

      • name (string) -- [REQUIRED]

        The name of the topic to deny.

      • type (string) -- [REQUIRED]

        Specifies to deny the topic.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visibility status of the AI Guardrail.

type wordPolicyConfig:

dict

param wordPolicyConfig:

The word policy you configure for the AI Guardrail.

  • managedWordListsConfig (list) --

    A list of managed words to configure for the AI Guardrail.

    • (dict) --

      The managed word list to configure for the AI Guardrail.

      • type (string) -- [REQUIRED]

        The managed word type to configure for the AI Guardrail.

  • wordsConfig (list) --

    A list of words to configure for the AI Guardrail.

    • (dict) --

      A word to configure for the AI Guardrail.

      • text (string) -- [REQUIRED]

        Text of the word configured for the AI Guardrail to block.

rtype:

dict

returns:

Response Syntax

{
    'aiGuardrail': {
        'aiGuardrailArn': 'string',
        'aiGuardrailId': 'string',
        'assistantArn': 'string',
        'assistantId': 'string',
        'blockedInputMessaging': 'string',
        'blockedOutputsMessaging': 'string',
        'contentPolicyConfig': {
            'filtersConfig': [
                {
                    'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                    'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                    'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK'
                },
            ]
        },
        'contextualGroundingPolicyConfig': {
            'filtersConfig': [
                {
                    'threshold': 123.0,
                    'type': 'GROUNDING'|'RELEVANCE'
                },
            ]
        },
        'description': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'sensitiveInformationPolicyConfig': {
            'piiEntitiesConfig': [
                {
                    'action': 'BLOCK'|'ANONYMIZE',
                    'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER'
                },
            ],
            'regexesConfig': [
                {
                    'action': 'BLOCK'|'ANONYMIZE',
                    'description': 'string',
                    'name': 'string',
                    'pattern': 'string'
                },
            ]
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'topicPolicyConfig': {
            'topicsConfig': [
                {
                    'definition': 'string',
                    'examples': [
                        'string',
                    ],
                    'name': 'string',
                    'type': 'DENY'
                },
            ]
        },
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'wordPolicyConfig': {
            'managedWordListsConfig': [
                {
                    'type': 'PROFANITY'
                },
            ],
            'wordsConfig': [
                {
                    'text': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • aiGuardrail (dict) --

      The data of the AI Guardrail.

      • aiGuardrailArn (string) --

        The Amazon Resource Name (ARN) of the AI Guardrail.

      • aiGuardrailId (string) --

        The identifier of the Amazon Q in Connect AI Guardrail.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • blockedInputMessaging (string) --

        The message to return when the AI Guardrail blocks a prompt.

      • blockedOutputsMessaging (string) --

        The message to return when the AI Guardrail blocks a model response.

      • contentPolicyConfig (dict) --

        Contains details about how to handle harmful content.

        • filtersConfig (list) --

          Contains the type of the content filter and how strongly it should apply to prompts and model responses.

          • (dict) --

            Contains filter strengths for harmful content. AI Guardrail's support the following content filters to detect and filter harmful user inputs and FM-generated outputs.

            • Hate: Describes input prompts and model responses that discriminate, criticize, insult, denounce, or dehumanize a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).

            • Insults: Describes input prompts and model responses that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.

            • Sexual: Describes input prompts and model responses that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.

            • Violence: Describes input prompts and model responses that includes glorification of, or threats to inflict physical pain, hurt, or injury toward a person, group, or thing.

            Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as Hate with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as Hate with HIGH confidence, Insults with LOW confidence, Sexual with NONE confidence, and Violence with MEDIUM confidence.

            • inputStrength (string) --

              The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

            • outputStrength (string) --

              The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

            • type (string) --

              The harmful category that the content filter is applied to.

      • contextualGroundingPolicyConfig (dict) --

        The policy configuration details for the AI Guardrail's contextual grounding policy.

        • filtersConfig (list) --

          The filter configuration details for the AI Guardrails contextual grounding policy.

          • (dict) --

            The filter configuration details for the AI Guardrail's contextual grounding filter.

            • threshold (float) --

              The threshold details for the AI Guardrail's contextual grounding filter.

            • type (string) --

              The filter type for the AI Guardrail's contextual grounding filter.

      • description (string) --

        A description of the AI Guardrail.

      • modifiedTime (datetime) --

        The time the AI Guardrail was last modified.

      • name (string) --

        The name of the AI Guardrail.

      • sensitiveInformationPolicyConfig (dict) --

        Contains details about PII entities and regular expressions to configure for the AI Guardrail.

        • piiEntitiesConfig (list) --

          A list of PII entities to configure to the AI Guardrail.

          • (dict) --

            The PII entity to configure for the AI Guardrail.

            • action (string) --

              Configure AI Guardrail's action when the PII entity is detected.

            • type (string) --

              Configure AI Guardrail type when the PII entity is detected.

              The following PIIs are used to block or mask sensitive information:

              • General

                • ADDRESS A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood.

                • AGE An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guarrails recognizes "40 years" as an age.

                • NAME An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. AI Guardrail doesn't apply this entity type to names that are part of organizations or addresses. For example, AI Guardrail recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address.

                • EMAIL An email address, such as marymajor@email.com.

                • PHONE A phone number. This entity type also includes fax and pager numbers.

                • USERNAME A user name that identifies an account, such as a login name, screen name, nick name, or handle.

                • PASSWORD An alphanumeric string that is used as a password, such as "** very20special#pass**".

                • DRIVER_ID The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters.

                • LICENSE_PLATE A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper-case letters and numbers. The format varies depending on the location of the issuing state or country.

                • VEHICLE_IDENTIFICATION_NUMBER A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the ISO 3779 specification. Each country has specific codes and formats for VINs.

              • Finance

                • REDIT_DEBIT_CARD_CVV A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code.

                • CREDIT_DEBIT_CARD_EXPIRY The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as month/year or MM/YY. AI Guardrail recognizes expiration dates such as 01/21, 01/2021, and Jan 2021.

                • CREDIT_DEBIT_CARD_NUMBER The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present.

                • PIN A four-digit personal identification number (PIN) with which you can access your bank account.

                • INTERNATIONAL_BANK_ACCOUNT_NUMBER An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure.

                • SWIFT_CODE A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office.

              • IT

                • IP_ADDRESS An IPv4 address, such as 198.51.100.0.

                • MAC_ADDRESS A media access control (MAC) address is a unique identifier assigned to a network interface controller (NIC).

                • URL A web address, such as www.example.com.

                • AWS_ACCESS_KEY A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

                • AWS_SECRET_KEY A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

              • USA specific

                • US_BANK_ACCOUNT_NUMBER A US bank account number, which is typically 10 to 12 digits long.

                • US_BANK_ROUTING_NUMBER A US bank account routing number. These are typically nine digits long,

                • US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits.

                • US_PASSPORT_NUMBER A US passport number. Passport numbers range from six to nine alphanumeric characters.

                • US_SOCIAL_SECURITY_NUMBER A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents.

              • Canada specific

                • CA_HEALTH_NUMBER A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits.

                • CA_SOCIAL_INSURANCE_NUMBER A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits. The SIN is formatted as three groups of three digits, such as 123-456-789. A SIN can be validated through a simple check-digit process called the Luhn algorithm .

              • UK Specific

                • UK_NATIONAL_HEALTH_SERVICE_NUMBER A UK National Health Service Number is a 10-17 digit number, such as 485 555 3456. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum.

                • UK_NATIONAL_INSURANCE_NUMBER A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system. The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits.

                • UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business.

              • Custom

                • Regex filter - You can use a regular expressions to define patterns for an AI Guardrail to recognize and act upon such as serial number, booking ID etc..

        • regexesConfig (list) --

          A list of regular expressions to configure to the AI Guardrail.

          • (dict) --

            The regular expression to configure for the AI Guardrail.

            • action (string) --

              The AI Guardrail action to configure when matching regular expression is detected.

            • description (string) --

              The description of the regular expression to configure for the AI Guardrail.

            • name (string) --

              The name of the regular expression to configure for the AI Guardrail.

            • pattern (string) --

              The regular expression pattern to configure for the AI Guardrail.

      • status (string) --

        The status of the AI Guardrail.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • topicPolicyConfig (dict) --

        Contains details about topics that the AI Guardrail should identify and deny.

        • topicsConfig (list) --

          A list of policies related to topics that the AI Guardrail should deny.

          • (dict) --

            Details about topics for the AI Guardrail to identify and deny.

            • definition (string) --

              A definition of the topic to deny.

            • examples (list) --

              A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.

              • (string) --

                Text example in topic policy

            • name (string) --

              The name of the topic to deny.

            • type (string) --

              Specifies to deny the topic.

      • visibilityStatus (string) --

        The visibility status of the AI Guardrail.

      • wordPolicyConfig (dict) --

        Contains details about the word policy to configured for the AI Guardrail.

        • managedWordListsConfig (list) --

          A list of managed words to configure for the AI Guardrail.

          • (dict) --

            The managed word list to configure for the AI Guardrail.

            • type (string) --

              The managed word type to configure for the AI Guardrail.

        • wordsConfig (list) --

          A list of words to configure for the AI Guardrail.

          • (dict) --

            A word to configure for the AI Guardrail.

            • text (string) --

              Text of the word configured for the AI Guardrail to block.

GetNextMessage (new) Link ¶

Retrieves next message on an Amazon Q in Connect session.

See also: AWS API Documentation

Request Syntax

client.get_next_message(
    assistantId='string',
    nextMessageToken='string',
    sessionId='string'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant.

type nextMessageToken:

string

param nextMessageToken:

[REQUIRED]

The token for the next message. Use the value returned in the SendMessage or previous response in the next request to retrieve the next message.

type sessionId:

string

param sessionId:

[REQUIRED]

The identifier of the Amazon Q in Connect session.

rtype:

dict

returns:

Response Syntax

{
    'conversationSessionData': [
        {
            'key': 'string',
            'value': {
                'stringValue': 'string'
            }
        },
    ],
    'conversationState': {
        'reason': 'SUCCESS'|'FAILED'|'REJECTED',
        'status': 'CLOSED'|'READY'|'PROCESSING'
    },
    'nextMessageToken': 'string',
    'requestMessageId': 'string',
    'response': {
        'messageId': 'string',
        'participant': 'CUSTOMER'|'AGENT'|'BOT',
        'timestamp': datetime(2015, 1, 1),
        'value': {
            'text': {
                'value': 'string'
            }
        }
    },
    'type': 'TEXT'
}

Response Structure

  • (dict) --

    • conversationSessionData (list) --

      The conversation data stored on an Amazon Q in Connect Session.

      • (dict) --

        The list of key-value pairs that are stored on the session.

        • key (string) --

          The key of the data stored on the session.

        • value (dict) --

          The value of the data stored on the session.

          • stringValue (string) --

            The string value of the data stored on the session.

    • conversationState (dict) --

      The state of current conversation.

      • reason (string) --

        The reason of the conversation state.

      • status (string) --

        The status of the conversation state.

    • nextMessageToken (string) --

      The token for the next message.

    • requestMessageId (string) --

      The identifier of the submitted message.

    • response (dict) --

      The message response to the requested message.

      • messageId (string) --

        The identifier of a message.

      • participant (string) --

        The participant of a message.

      • timestamp (datetime) --

        The timestamp of a message.

      • value (dict) --

        The value of a message data.

        • text (dict) --

          The message data in text type.

          • value (string) --

            The value of the message data in text type.

    • type (string) --

      The type of message response.

ListAIGuardrailVersions (new) Link ¶

Lists AI Guardrail versions.

See also: AWS API Documentation

Request Syntax

client.list_ai_guardrail_versions(
    aiGuardrailId='string',
    assistantId='string',
    maxResults=123,
    nextToken='string'
)
type aiGuardrailId:

string

param aiGuardrailId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Guardrail for which versions are to be listed.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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

{
    'aiGuardrailVersionSummaries': [
        {
            'aiGuardrailSummary': {
                'aiGuardrailArn': 'string',
                'aiGuardrailId': 'string',
                'assistantArn': 'string',
                'assistantId': 'string',
                'description': 'string',
                'modifiedTime': datetime(2015, 1, 1),
                'name': 'string',
                'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
                'tags': {
                    'string': 'string'
                },
                'visibilityStatus': 'SAVED'|'PUBLISHED'
            },
            'versionNumber': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiGuardrailVersionSummaries (list) --

      The summaries of the AI Guardrail versions.

      • (dict) --

        The summary of the AI Guardrail version.

        • aiGuardrailSummary (dict) --

          The data for the summary of the AI Guardrail version.

          • aiGuardrailArn (string) --

            The Amazon Resource Name (ARN) of the AI Guardrail.

          • aiGuardrailId (string) --

            The identifier of the Amazon Q in Connect AI Guardrail.

          • assistantArn (string) --

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

          • assistantId (string) --

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

          • description (string) --

            A description of the AI Guardrail.

          • modifiedTime (datetime) --

            The time the AI Guardrail was last modified.

          • name (string) --

            The name of the AI Guardrail.

          • status (string) --

            The status of the AI Guardrail.

          • tags (dict) --

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

            • (string) --

              • (string) --

          • visibilityStatus (string) --

            The visibility status of the AI Guardrail.

        • versionNumber (integer) --

          The version number for this AI Guardrail version.

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

GetAIGuardrail (new) Link ¶

Gets the Amazon Q in Connect AI Guardrail.

See also: AWS API Documentation

Request Syntax

client.get_ai_guardrail(
    aiGuardrailId='string',
    assistantId='string'
)
type aiGuardrailId:

string

param aiGuardrailId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Guardrail.

type assistantId:

string

param assistantId:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

{
    'aiGuardrail': {
        'aiGuardrailArn': 'string',
        'aiGuardrailId': 'string',
        'assistantArn': 'string',
        'assistantId': 'string',
        'blockedInputMessaging': 'string',
        'blockedOutputsMessaging': 'string',
        'contentPolicyConfig': {
            'filtersConfig': [
                {
                    'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                    'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                    'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK'
                },
            ]
        },
        'contextualGroundingPolicyConfig': {
            'filtersConfig': [
                {
                    'threshold': 123.0,
                    'type': 'GROUNDING'|'RELEVANCE'
                },
            ]
        },
        'description': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'sensitiveInformationPolicyConfig': {
            'piiEntitiesConfig': [
                {
                    'action': 'BLOCK'|'ANONYMIZE',
                    'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER'
                },
            ],
            'regexesConfig': [
                {
                    'action': 'BLOCK'|'ANONYMIZE',
                    'description': 'string',
                    'name': 'string',
                    'pattern': 'string'
                },
            ]
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'topicPolicyConfig': {
            'topicsConfig': [
                {
                    'definition': 'string',
                    'examples': [
                        'string',
                    ],
                    'name': 'string',
                    'type': 'DENY'
                },
            ]
        },
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'wordPolicyConfig': {
            'managedWordListsConfig': [
                {
                    'type': 'PROFANITY'
                },
            ],
            'wordsConfig': [
                {
                    'text': 'string'
                },
            ]
        }
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiGuardrail (dict) --

      The data of the AI Guardrail.

      • aiGuardrailArn (string) --

        The Amazon Resource Name (ARN) of the AI Guardrail.

      • aiGuardrailId (string) --

        The identifier of the Amazon Q in Connect AI Guardrail.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • blockedInputMessaging (string) --

        The message to return when the AI Guardrail blocks a prompt.

      • blockedOutputsMessaging (string) --

        The message to return when the AI Guardrail blocks a model response.

      • contentPolicyConfig (dict) --

        Contains details about how to handle harmful content.

        • filtersConfig (list) --

          Contains the type of the content filter and how strongly it should apply to prompts and model responses.

          • (dict) --

            Contains filter strengths for harmful content. AI Guardrail's support the following content filters to detect and filter harmful user inputs and FM-generated outputs.

            • Hate: Describes input prompts and model responses that discriminate, criticize, insult, denounce, or dehumanize a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).

            • Insults: Describes input prompts and model responses that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.

            • Sexual: Describes input prompts and model responses that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.

            • Violence: Describes input prompts and model responses that includes glorification of, or threats to inflict physical pain, hurt, or injury toward a person, group, or thing.

            Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as Hate with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as Hate with HIGH confidence, Insults with LOW confidence, Sexual with NONE confidence, and Violence with MEDIUM confidence.

            • inputStrength (string) --

              The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

            • outputStrength (string) --

              The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

            • type (string) --

              The harmful category that the content filter is applied to.

      • contextualGroundingPolicyConfig (dict) --

        The policy configuration details for the AI Guardrail's contextual grounding policy.

        • filtersConfig (list) --

          The filter configuration details for the AI Guardrails contextual grounding policy.

          • (dict) --

            The filter configuration details for the AI Guardrail's contextual grounding filter.

            • threshold (float) --

              The threshold details for the AI Guardrail's contextual grounding filter.

            • type (string) --

              The filter type for the AI Guardrail's contextual grounding filter.

      • description (string) --

        A description of the AI Guardrail.

      • modifiedTime (datetime) --

        The time the AI Guardrail was last modified.

      • name (string) --

        The name of the AI Guardrail.

      • sensitiveInformationPolicyConfig (dict) --

        Contains details about PII entities and regular expressions to configure for the AI Guardrail.

        • piiEntitiesConfig (list) --

          A list of PII entities to configure to the AI Guardrail.

          • (dict) --

            The PII entity to configure for the AI Guardrail.

            • action (string) --

              Configure AI Guardrail's action when the PII entity is detected.

            • type (string) --

              Configure AI Guardrail type when the PII entity is detected.

              The following PIIs are used to block or mask sensitive information:

              • General

                • ADDRESS A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood.

                • AGE An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guarrails recognizes "40 years" as an age.

                • NAME An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. AI Guardrail doesn't apply this entity type to names that are part of organizations or addresses. For example, AI Guardrail recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address.

                • EMAIL An email address, such as marymajor@email.com.

                • PHONE A phone number. This entity type also includes fax and pager numbers.

                • USERNAME A user name that identifies an account, such as a login name, screen name, nick name, or handle.

                • PASSWORD An alphanumeric string that is used as a password, such as "** very20special#pass**".

                • DRIVER_ID The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters.

                • LICENSE_PLATE A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper-case letters and numbers. The format varies depending on the location of the issuing state or country.

                • VEHICLE_IDENTIFICATION_NUMBER A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the ISO 3779 specification. Each country has specific codes and formats for VINs.

              • Finance

                • REDIT_DEBIT_CARD_CVV A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code.

                • CREDIT_DEBIT_CARD_EXPIRY The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as month/year or MM/YY. AI Guardrail recognizes expiration dates such as 01/21, 01/2021, and Jan 2021.

                • CREDIT_DEBIT_CARD_NUMBER The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present.

                • PIN A four-digit personal identification number (PIN) with which you can access your bank account.

                • INTERNATIONAL_BANK_ACCOUNT_NUMBER An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure.

                • SWIFT_CODE A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office.

              • IT

                • IP_ADDRESS An IPv4 address, such as 198.51.100.0.

                • MAC_ADDRESS A media access control (MAC) address is a unique identifier assigned to a network interface controller (NIC).

                • URL A web address, such as www.example.com.

                • AWS_ACCESS_KEY A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

                • AWS_SECRET_KEY A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

              • USA specific

                • US_BANK_ACCOUNT_NUMBER A US bank account number, which is typically 10 to 12 digits long.

                • US_BANK_ROUTING_NUMBER A US bank account routing number. These are typically nine digits long,

                • US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits.

                • US_PASSPORT_NUMBER A US passport number. Passport numbers range from six to nine alphanumeric characters.

                • US_SOCIAL_SECURITY_NUMBER A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents.

              • Canada specific

                • CA_HEALTH_NUMBER A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits.

                • CA_SOCIAL_INSURANCE_NUMBER A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits. The SIN is formatted as three groups of three digits, such as 123-456-789. A SIN can be validated through a simple check-digit process called the Luhn algorithm .

              • UK Specific

                • UK_NATIONAL_HEALTH_SERVICE_NUMBER A UK National Health Service Number is a 10-17 digit number, such as 485 555 3456. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum.

                • UK_NATIONAL_INSURANCE_NUMBER A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system. The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits.

                • UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business.

              • Custom

                • Regex filter - You can use a regular expressions to define patterns for an AI Guardrail to recognize and act upon such as serial number, booking ID etc..

        • regexesConfig (list) --

          A list of regular expressions to configure to the AI Guardrail.

          • (dict) --

            The regular expression to configure for the AI Guardrail.

            • action (string) --

              The AI Guardrail action to configure when matching regular expression is detected.

            • description (string) --

              The description of the regular expression to configure for the AI Guardrail.

            • name (string) --

              The name of the regular expression to configure for the AI Guardrail.

            • pattern (string) --

              The regular expression pattern to configure for the AI Guardrail.

      • status (string) --

        The status of the AI Guardrail.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • topicPolicyConfig (dict) --

        Contains details about topics that the AI Guardrail should identify and deny.

        • topicsConfig (list) --

          A list of policies related to topics that the AI Guardrail should deny.

          • (dict) --

            Details about topics for the AI Guardrail to identify and deny.

            • definition (string) --

              A definition of the topic to deny.

            • examples (list) --

              A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.

              • (string) --

                Text example in topic policy

            • name (string) --

              The name of the topic to deny.

            • type (string) --

              Specifies to deny the topic.

      • visibilityStatus (string) --

        The visibility status of the AI Guardrail.

      • wordPolicyConfig (dict) --

        Contains details about the word policy to configured for the AI Guardrail.

        • managedWordListsConfig (list) --

          A list of managed words to configure for the AI Guardrail.

          • (dict) --

            The managed word list to configure for the AI Guardrail.

            • type (string) --

              The managed word type to configure for the AI Guardrail.

        • wordsConfig (list) --

          A list of words to configure for the AI Guardrail.

          • (dict) --

            A word to configure for the AI Guardrail.

            • text (string) --

              Text of the word configured for the AI Guardrail to block.

    • versionNumber (integer) --

      The version number of the AI Guardrail version (returned if an AI Guardrail version was specified via use of a qualifier for the aiGuardrailId on the request).

SendMessage (new) Link ¶

Submits a message to the Amazon Q in Connect session.

See also: AWS API Documentation

Request Syntax

client.send_message(
    assistantId='string',
    clientToken='string',
    conversationContext={
        'selfServiceConversationHistory': [
            {
                'botResponse': 'string',
                'inputTranscript': 'string',
                'turnNumber': 123
            },
        ]
    },
    message={
        'value': {
            'text': {
                'value': 'string'
            }
        }
    },
    sessionId='string',
    type='TEXT'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant.

type clientToken:

string

param clientToken:

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

This field is autopopulated if not provided.

type conversationContext:

dict

param conversationContext:

The conversation context before the Amazon Q in Connect session.

  • selfServiceConversationHistory (list) -- [REQUIRED]

    The self service conversation history before the Amazon Q in Connect session.

    • (dict) --

      The conversation history data to included in conversation context data before the the Amazon Q in Connect session..

      • botResponse (string) --

        The bot response of the conversation history data.

      • inputTranscript (string) --

        The input transcript of the conversation history data.

      • turnNumber (integer) -- [REQUIRED]

        The number of turn of the conversation history data.

type message:

dict

param message:

[REQUIRED]

The message data to submit to the Amazon Q in Connect session.

  • value (dict) -- [REQUIRED]

    The message input value.

    • text (dict) --

      The message data in text type.

      • value (string) --

        The value of the message data in text type.

type sessionId:

string

param sessionId:

[REQUIRED]

The identifier of the Amazon Q in Connect session.

type type:

string

param type:

[REQUIRED]

The message type.

rtype:

dict

returns:

Response Syntax

{
    'nextMessageToken': 'string',
    'requestMessageId': 'string'
}

Response Structure

  • (dict) --

    • nextMessageToken (string) --

      The token for the next message, used by GetNextMessage.

    • requestMessageId (string) --

      The identifier of the submitted message.

UpdateAIGuardrail (new) Link ¶

Updates an AI Guardrail.

See also: AWS API Documentation

Request Syntax

client.update_ai_guardrail(
    aiGuardrailId='string',
    assistantId='string',
    blockedInputMessaging='string',
    blockedOutputsMessaging='string',
    clientToken='string',
    contentPolicyConfig={
        'filtersConfig': [
            {
                'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK'
            },
        ]
    },
    contextualGroundingPolicyConfig={
        'filtersConfig': [
            {
                'threshold': 123.0,
                'type': 'GROUNDING'|'RELEVANCE'
            },
        ]
    },
    description='string',
    sensitiveInformationPolicyConfig={
        'piiEntitiesConfig': [
            {
                'action': 'BLOCK'|'ANONYMIZE',
                'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER'
            },
        ],
        'regexesConfig': [
            {
                'action': 'BLOCK'|'ANONYMIZE',
                'description': 'string',
                'name': 'string',
                'pattern': 'string'
            },
        ]
    },
    topicPolicyConfig={
        'topicsConfig': [
            {
                'definition': 'string',
                'examples': [
                    'string',
                ],
                'name': 'string',
                'type': 'DENY'
            },
        ]
    },
    visibilityStatus='SAVED'|'PUBLISHED',
    wordPolicyConfig={
        'managedWordListsConfig': [
            {
                'type': 'PROFANITY'
            },
        ],
        'wordsConfig': [
            {
                'text': 'string'
            },
        ]
    }
)
type aiGuardrailId:

string

param aiGuardrailId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Guardrail.

type assistantId:

string

param assistantId:

[REQUIRED]

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

type blockedInputMessaging:

string

param blockedInputMessaging:

[REQUIRED]

The message to return when the AI Guardrail blocks a prompt.

type blockedOutputsMessaging:

string

param blockedOutputsMessaging:

[REQUIRED]

The message to return when the AI Guardrail blocks a model response.

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 contentPolicyConfig:

dict

param contentPolicyConfig:

The content filter policies to configure for the AI Guardrail.

  • filtersConfig (list) -- [REQUIRED]

    Contains the type of the content filter and how strongly it should apply to prompts and model responses.

    • (dict) --

      Contains filter strengths for harmful content. AI Guardrail's support the following content filters to detect and filter harmful user inputs and FM-generated outputs.

      • Hate: Describes input prompts and model responses that discriminate, criticize, insult, denounce, or dehumanize a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).

      • Insults: Describes input prompts and model responses that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.

      • Sexual: Describes input prompts and model responses that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.

      • Violence: Describes input prompts and model responses that includes glorification of, or threats to inflict physical pain, hurt, or injury toward a person, group, or thing.

      Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as Hate with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as Hate with HIGH confidence, Insults with LOW confidence, Sexual with NONE confidence, and Violence with MEDIUM confidence.

      • inputStrength (string) -- [REQUIRED]

        The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

      • outputStrength (string) -- [REQUIRED]

        The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

      • type (string) -- [REQUIRED]

        The harmful category that the content filter is applied to.

type contextualGroundingPolicyConfig:

dict

param contextualGroundingPolicyConfig:

The contextual grounding policy configuration used to create an AI Guardrail.

  • filtersConfig (list) -- [REQUIRED]

    The filter configuration details for the AI Guardrails contextual grounding policy.

    • (dict) --

      The filter configuration details for the AI Guardrail's contextual grounding filter.

      • threshold (float) -- [REQUIRED]

        The threshold details for the AI Guardrail's contextual grounding filter.

      • type (string) -- [REQUIRED]

        The filter type for the AI Guardrail's contextual grounding filter.

type description:

string

param description:

A description of the AI Guardrail.

type sensitiveInformationPolicyConfig:

dict

param sensitiveInformationPolicyConfig:

The sensitive information policy to configure for the AI Guardrail.

  • piiEntitiesConfig (list) --

    A list of PII entities to configure to the AI Guardrail.

    • (dict) --

      The PII entity to configure for the AI Guardrail.

      • action (string) -- [REQUIRED]

        Configure AI Guardrail's action when the PII entity is detected.

      • type (string) -- [REQUIRED]

        Configure AI Guardrail type when the PII entity is detected.

        The following PIIs are used to block or mask sensitive information:

        • General

          • ADDRESS A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood.

          • AGE An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guarrails recognizes "40 years" as an age.

          • NAME An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. AI Guardrail doesn't apply this entity type to names that are part of organizations or addresses. For example, AI Guardrail recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address.

          • EMAIL An email address, such as marymajor@email.com.

          • PHONE A phone number. This entity type also includes fax and pager numbers.

          • USERNAME A user name that identifies an account, such as a login name, screen name, nick name, or handle.

          • PASSWORD An alphanumeric string that is used as a password, such as "** very20special#pass**".

          • DRIVER_ID The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters.

          • LICENSE_PLATE A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper-case letters and numbers. The format varies depending on the location of the issuing state or country.

          • VEHICLE_IDENTIFICATION_NUMBER A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the ISO 3779 specification. Each country has specific codes and formats for VINs.

        • Finance

          • REDIT_DEBIT_CARD_CVV A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code.

          • CREDIT_DEBIT_CARD_EXPIRY The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as month/year or MM/YY. AI Guardrail recognizes expiration dates such as 01/21, 01/2021, and Jan 2021.

          • CREDIT_DEBIT_CARD_NUMBER The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present.

          • PIN A four-digit personal identification number (PIN) with which you can access your bank account.

          • INTERNATIONAL_BANK_ACCOUNT_NUMBER An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure.

          • SWIFT_CODE A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office.

        • IT

          • IP_ADDRESS An IPv4 address, such as 198.51.100.0.

          • MAC_ADDRESS A media access control (MAC) address is a unique identifier assigned to a network interface controller (NIC).

          • URL A web address, such as www.example.com.

          • AWS_ACCESS_KEY A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

          • AWS_SECRET_KEY A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

        • USA specific

          • US_BANK_ACCOUNT_NUMBER A US bank account number, which is typically 10 to 12 digits long.

          • US_BANK_ROUTING_NUMBER A US bank account routing number. These are typically nine digits long,

          • US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits.

          • US_PASSPORT_NUMBER A US passport number. Passport numbers range from six to nine alphanumeric characters.

          • US_SOCIAL_SECURITY_NUMBER A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents.

        • Canada specific

          • CA_HEALTH_NUMBER A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits.

          • CA_SOCIAL_INSURANCE_NUMBER A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits. The SIN is formatted as three groups of three digits, such as 123-456-789. A SIN can be validated through a simple check-digit process called the Luhn algorithm .

        • UK Specific

          • UK_NATIONAL_HEALTH_SERVICE_NUMBER A UK National Health Service Number is a 10-17 digit number, such as 485 555 3456. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum.

          • UK_NATIONAL_INSURANCE_NUMBER A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system. The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits.

          • UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business.

        • Custom

          • Regex filter - You can use a regular expressions to define patterns for an AI Guardrail to recognize and act upon such as serial number, booking ID etc..

  • regexesConfig (list) --

    A list of regular expressions to configure to the AI Guardrail.

    • (dict) --

      The regular expression to configure for the AI Guardrail.

      • action (string) -- [REQUIRED]

        The AI Guardrail action to configure when matching regular expression is detected.

      • description (string) --

        The description of the regular expression to configure for the AI Guardrail.

      • name (string) -- [REQUIRED]

        The name of the regular expression to configure for the AI Guardrail.

      • pattern (string) -- [REQUIRED]

        The regular expression pattern to configure for the AI Guardrail.

type topicPolicyConfig:

dict

param topicPolicyConfig:

The topic policies to configure for the AI Guardrail.

  • topicsConfig (list) -- [REQUIRED]

    A list of policies related to topics that the AI Guardrail should deny.

    • (dict) --

      Details about topics for the AI Guardrail to identify and deny.

      • definition (string) -- [REQUIRED]

        A definition of the topic to deny.

      • examples (list) --

        A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.

        • (string) --

          Text example in topic policy

      • name (string) -- [REQUIRED]

        The name of the topic to deny.

      • type (string) -- [REQUIRED]

        Specifies to deny the topic.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visibility status of the Amazon Q in Connect AI Guardrail.

type wordPolicyConfig:

dict

param wordPolicyConfig:

The word policy you configure for the AI Guardrail.

  • managedWordListsConfig (list) --

    A list of managed words to configure for the AI Guardrail.

    • (dict) --

      The managed word list to configure for the AI Guardrail.

      • type (string) -- [REQUIRED]

        The managed word type to configure for the AI Guardrail.

  • wordsConfig (list) --

    A list of words to configure for the AI Guardrail.

    • (dict) --

      A word to configure for the AI Guardrail.

      • text (string) -- [REQUIRED]

        Text of the word configured for the AI Guardrail to block.

rtype:

dict

returns:

Response Syntax

{
    'aiGuardrail': {
        'aiGuardrailArn': 'string',
        'aiGuardrailId': 'string',
        'assistantArn': 'string',
        'assistantId': 'string',
        'blockedInputMessaging': 'string',
        'blockedOutputsMessaging': 'string',
        'contentPolicyConfig': {
            'filtersConfig': [
                {
                    'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                    'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                    'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK'
                },
            ]
        },
        'contextualGroundingPolicyConfig': {
            'filtersConfig': [
                {
                    'threshold': 123.0,
                    'type': 'GROUNDING'|'RELEVANCE'
                },
            ]
        },
        'description': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'sensitiveInformationPolicyConfig': {
            'piiEntitiesConfig': [
                {
                    'action': 'BLOCK'|'ANONYMIZE',
                    'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER'
                },
            ],
            'regexesConfig': [
                {
                    'action': 'BLOCK'|'ANONYMIZE',
                    'description': 'string',
                    'name': 'string',
                    'pattern': 'string'
                },
            ]
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'topicPolicyConfig': {
            'topicsConfig': [
                {
                    'definition': 'string',
                    'examples': [
                        'string',
                    ],
                    'name': 'string',
                    'type': 'DENY'
                },
            ]
        },
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'wordPolicyConfig': {
            'managedWordListsConfig': [
                {
                    'type': 'PROFANITY'
                },
            ],
            'wordsConfig': [
                {
                    'text': 'string'
                },
            ]
        }
    }
}

Response Structure

  • (dict) --

    • aiGuardrail (dict) --

      The data of the updated Amazon Q in Connect AI Guardrail.

      • aiGuardrailArn (string) --

        The Amazon Resource Name (ARN) of the AI Guardrail.

      • aiGuardrailId (string) --

        The identifier of the Amazon Q in Connect AI Guardrail.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • blockedInputMessaging (string) --

        The message to return when the AI Guardrail blocks a prompt.

      • blockedOutputsMessaging (string) --

        The message to return when the AI Guardrail blocks a model response.

      • contentPolicyConfig (dict) --

        Contains details about how to handle harmful content.

        • filtersConfig (list) --

          Contains the type of the content filter and how strongly it should apply to prompts and model responses.

          • (dict) --

            Contains filter strengths for harmful content. AI Guardrail's support the following content filters to detect and filter harmful user inputs and FM-generated outputs.

            • Hate: Describes input prompts and model responses that discriminate, criticize, insult, denounce, or dehumanize a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).

            • Insults: Describes input prompts and model responses that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.

            • Sexual: Describes input prompts and model responses that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.

            • Violence: Describes input prompts and model responses that includes glorification of, or threats to inflict physical pain, hurt, or injury toward a person, group, or thing.

            Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as Hate with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as Hate with HIGH confidence, Insults with LOW confidence, Sexual with NONE confidence, and Violence with MEDIUM confidence.

            • inputStrength (string) --

              The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

            • outputStrength (string) --

              The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

            • type (string) --

              The harmful category that the content filter is applied to.

      • contextualGroundingPolicyConfig (dict) --

        The policy configuration details for the AI Guardrail's contextual grounding policy.

        • filtersConfig (list) --

          The filter configuration details for the AI Guardrails contextual grounding policy.

          • (dict) --

            The filter configuration details for the AI Guardrail's contextual grounding filter.

            • threshold (float) --

              The threshold details for the AI Guardrail's contextual grounding filter.

            • type (string) --

              The filter type for the AI Guardrail's contextual grounding filter.

      • description (string) --

        A description of the AI Guardrail.

      • modifiedTime (datetime) --

        The time the AI Guardrail was last modified.

      • name (string) --

        The name of the AI Guardrail.

      • sensitiveInformationPolicyConfig (dict) --

        Contains details about PII entities and regular expressions to configure for the AI Guardrail.

        • piiEntitiesConfig (list) --

          A list of PII entities to configure to the AI Guardrail.

          • (dict) --

            The PII entity to configure for the AI Guardrail.

            • action (string) --

              Configure AI Guardrail's action when the PII entity is detected.

            • type (string) --

              Configure AI Guardrail type when the PII entity is detected.

              The following PIIs are used to block or mask sensitive information:

              • General

                • ADDRESS A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood.

                • AGE An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guarrails recognizes "40 years" as an age.

                • NAME An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. AI Guardrail doesn't apply this entity type to names that are part of organizations or addresses. For example, AI Guardrail recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address.

                • EMAIL An email address, such as marymajor@email.com.

                • PHONE A phone number. This entity type also includes fax and pager numbers.

                • USERNAME A user name that identifies an account, such as a login name, screen name, nick name, or handle.

                • PASSWORD An alphanumeric string that is used as a password, such as "** very20special#pass**".

                • DRIVER_ID The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters.

                • LICENSE_PLATE A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper-case letters and numbers. The format varies depending on the location of the issuing state or country.

                • VEHICLE_IDENTIFICATION_NUMBER A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the ISO 3779 specification. Each country has specific codes and formats for VINs.

              • Finance

                • REDIT_DEBIT_CARD_CVV A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code.

                • CREDIT_DEBIT_CARD_EXPIRY The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as month/year or MM/YY. AI Guardrail recognizes expiration dates such as 01/21, 01/2021, and Jan 2021.

                • CREDIT_DEBIT_CARD_NUMBER The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present.

                • PIN A four-digit personal identification number (PIN) with which you can access your bank account.

                • INTERNATIONAL_BANK_ACCOUNT_NUMBER An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure.

                • SWIFT_CODE A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office.

              • IT

                • IP_ADDRESS An IPv4 address, such as 198.51.100.0.

                • MAC_ADDRESS A media access control (MAC) address is a unique identifier assigned to a network interface controller (NIC).

                • URL A web address, such as www.example.com.

                • AWS_ACCESS_KEY A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

                • AWS_SECRET_KEY A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

              • USA specific

                • US_BANK_ACCOUNT_NUMBER A US bank account number, which is typically 10 to 12 digits long.

                • US_BANK_ROUTING_NUMBER A US bank account routing number. These are typically nine digits long,

                • US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits.

                • US_PASSPORT_NUMBER A US passport number. Passport numbers range from six to nine alphanumeric characters.

                • US_SOCIAL_SECURITY_NUMBER A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents.

              • Canada specific

                • CA_HEALTH_NUMBER A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits.

                • CA_SOCIAL_INSURANCE_NUMBER A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits. The SIN is formatted as three groups of three digits, such as 123-456-789. A SIN can be validated through a simple check-digit process called the Luhn algorithm .

              • UK Specific

                • UK_NATIONAL_HEALTH_SERVICE_NUMBER A UK National Health Service Number is a 10-17 digit number, such as 485 555 3456. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum.

                • UK_NATIONAL_INSURANCE_NUMBER A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system. The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits.

                • UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business.

              • Custom

                • Regex filter - You can use a regular expressions to define patterns for an AI Guardrail to recognize and act upon such as serial number, booking ID etc..

        • regexesConfig (list) --

          A list of regular expressions to configure to the AI Guardrail.

          • (dict) --

            The regular expression to configure for the AI Guardrail.

            • action (string) --

              The AI Guardrail action to configure when matching regular expression is detected.

            • description (string) --

              The description of the regular expression to configure for the AI Guardrail.

            • name (string) --

              The name of the regular expression to configure for the AI Guardrail.

            • pattern (string) --

              The regular expression pattern to configure for the AI Guardrail.

      • status (string) --

        The status of the AI Guardrail.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • topicPolicyConfig (dict) --

        Contains details about topics that the AI Guardrail should identify and deny.

        • topicsConfig (list) --

          A list of policies related to topics that the AI Guardrail should deny.

          • (dict) --

            Details about topics for the AI Guardrail to identify and deny.

            • definition (string) --

              A definition of the topic to deny.

            • examples (list) --

              A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.

              • (string) --

                Text example in topic policy

            • name (string) --

              The name of the topic to deny.

            • type (string) --

              Specifies to deny the topic.

      • visibilityStatus (string) --

        The visibility status of the AI Guardrail.

      • wordPolicyConfig (dict) --

        Contains details about the word policy to configured for the AI Guardrail.

        • managedWordListsConfig (list) --

          A list of managed words to configure for the AI Guardrail.

          • (dict) --

            The managed word list to configure for the AI Guardrail.

            • type (string) --

              The managed word type to configure for the AI Guardrail.

        • wordsConfig (list) --

          A list of words to configure for the AI Guardrail.

          • (dict) --

            A word to configure for the AI Guardrail.

            • text (string) --

              Text of the word configured for the AI Guardrail to block.

DeleteAIGuardrailVersion (new) Link ¶

Delete and Amazon Q in Connect AI Guardrail version.

See also: AWS API Documentation

Request Syntax

client.delete_ai_guardrail_version(
    aiGuardrailId='string',
    assistantId='string',
    versionNumber=123
)
type aiGuardrailId:

string

param aiGuardrailId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Guardrail.

type assistantId:

string

param assistantId:

[REQUIRED]

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

type versionNumber:

integer

param versionNumber:

[REQUIRED]

The version number of the AI Guardrail version to be deleted.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListMessages (new) Link ¶

Lists messages on an Amazon Q in Connect session.

See also: AWS API Documentation

Request Syntax

client.list_messages(
    assistantId='string',
    maxResults=123,
    nextToken='string',
    sessionId='string'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect assistant.

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 sessionId:

string

param sessionId:

[REQUIRED]

The identifier of the Amazon Q in Connect session.

rtype:

dict

returns:

Response Syntax

{
    'messages': [
        {
            'messageId': 'string',
            'participant': 'CUSTOMER'|'AGENT'|'BOT',
            'timestamp': datetime(2015, 1, 1),
            'value': {
                'text': {
                    'value': 'string'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • messages (list) --

      The message information.

      • (dict) --

        The message output.

        • messageId (string) --

          The identifier of a message.

        • participant (string) --

          The participant of a message.

        • timestamp (datetime) --

          The timestamp of a message.

        • value (dict) --

          The value of a message data.

          • text (dict) --

            The message data in text type.

            • value (string) --

              The value of the message data in text type.

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

ListAIGuardrails (new) Link ¶

Lists the AI Guardrails available on the Amazon Q in Connect assistant.

See also: AWS API Documentation

Request Syntax

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

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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

{
    'aiGuardrailSummaries': [
        {
            'aiGuardrailArn': 'string',
            'aiGuardrailId': 'string',
            'assistantArn': 'string',
            'assistantId': 'string',
            'description': 'string',
            'modifiedTime': datetime(2015, 1, 1),
            'name': 'string',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
            'tags': {
                'string': 'string'
            },
            'visibilityStatus': 'SAVED'|'PUBLISHED'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiGuardrailSummaries (list) --

      The summaries of the AI Guardrails.

      • (dict) --

        The summary of the AI Guardrail.

        • aiGuardrailArn (string) --

          The Amazon Resource Name (ARN) of the AI Guardrail.

        • aiGuardrailId (string) --

          The identifier of the Amazon Q in Connect AI Guardrail.

        • assistantArn (string) --

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

        • assistantId (string) --

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

        • description (string) --

          A description of the AI Guardrail.

        • modifiedTime (datetime) --

          The time the AI Guardrail was last modified.

        • name (string) --

          The name of the AI Guardrail.

        • status (string) --

          The status of the AI Guardrail.

        • tags (dict) --

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

          • (string) --

            • (string) --

        • visibilityStatus (string) --

          The visibility status of the AI Guardrail.

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

DeleteAIGuardrail (new) Link ¶

Deletes an Amazon Q in Connect AI Guardrail.

See also: AWS API Documentation

Request Syntax

client.delete_ai_guardrail(
    aiGuardrailId='string',
    assistantId='string'
)
type aiGuardrailId:

string

param aiGuardrailId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Guardrail. 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 in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

CreateAIGuardrailVersion (new) Link ¶

Creates an Amazon Q in Connect AI Guardrail version.

See also: AWS API Documentation

Request Syntax

client.create_ai_guardrail_version(
    aiGuardrailId='string',
    assistantId='string',
    clientToken='string',
    modifiedTime=datetime(2015, 1, 1)
)
type aiGuardrailId:

string

param aiGuardrailId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Guardrail.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 modifiedTime:

datetime

param modifiedTime:

The time the AI Guardrail was last modified.

rtype:

dict

returns:

Response Syntax

{
    'aiGuardrail': {
        'aiGuardrailArn': 'string',
        'aiGuardrailId': 'string',
        'assistantArn': 'string',
        'assistantId': 'string',
        'blockedInputMessaging': 'string',
        'blockedOutputsMessaging': 'string',
        'contentPolicyConfig': {
            'filtersConfig': [
                {
                    'inputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                    'outputStrength': 'NONE'|'LOW'|'MEDIUM'|'HIGH',
                    'type': 'SEXUAL'|'VIOLENCE'|'HATE'|'INSULTS'|'MISCONDUCT'|'PROMPT_ATTACK'
                },
            ]
        },
        'contextualGroundingPolicyConfig': {
            'filtersConfig': [
                {
                    'threshold': 123.0,
                    'type': 'GROUNDING'|'RELEVANCE'
                },
            ]
        },
        'description': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'sensitiveInformationPolicyConfig': {
            'piiEntitiesConfig': [
                {
                    'action': 'BLOCK'|'ANONYMIZE',
                    'type': 'ADDRESS'|'AGE'|'AWS_ACCESS_KEY'|'AWS_SECRET_KEY'|'CA_HEALTH_NUMBER'|'CA_SOCIAL_INSURANCE_NUMBER'|'CREDIT_DEBIT_CARD_CVV'|'CREDIT_DEBIT_CARD_EXPIRY'|'CREDIT_DEBIT_CARD_NUMBER'|'DRIVER_ID'|'EMAIL'|'INTERNATIONAL_BANK_ACCOUNT_NUMBER'|'IP_ADDRESS'|'LICENSE_PLATE'|'MAC_ADDRESS'|'NAME'|'PASSWORD'|'PHONE'|'PIN'|'SWIFT_CODE'|'UK_NATIONAL_HEALTH_SERVICE_NUMBER'|'UK_NATIONAL_INSURANCE_NUMBER'|'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER'|'URL'|'USERNAME'|'US_BANK_ACCOUNT_NUMBER'|'US_BANK_ROUTING_NUMBER'|'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER'|'US_PASSPORT_NUMBER'|'US_SOCIAL_SECURITY_NUMBER'|'VEHICLE_IDENTIFICATION_NUMBER'
                },
            ],
            'regexesConfig': [
                {
                    'action': 'BLOCK'|'ANONYMIZE',
                    'description': 'string',
                    'name': 'string',
                    'pattern': 'string'
                },
            ]
        },
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'topicPolicyConfig': {
            'topicsConfig': [
                {
                    'definition': 'string',
                    'examples': [
                        'string',
                    ],
                    'name': 'string',
                    'type': 'DENY'
                },
            ]
        },
        'visibilityStatus': 'SAVED'|'PUBLISHED',
        'wordPolicyConfig': {
            'managedWordListsConfig': [
                {
                    'type': 'PROFANITY'
                },
            ],
            'wordsConfig': [
                {
                    'text': 'string'
                },
            ]
        }
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiGuardrail (dict) --

      The data of the AI Guardrail version.

      • aiGuardrailArn (string) --

        The Amazon Resource Name (ARN) of the AI Guardrail.

      • aiGuardrailId (string) --

        The identifier of the Amazon Q in Connect AI Guardrail.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • blockedInputMessaging (string) --

        The message to return when the AI Guardrail blocks a prompt.

      • blockedOutputsMessaging (string) --

        The message to return when the AI Guardrail blocks a model response.

      • contentPolicyConfig (dict) --

        Contains details about how to handle harmful content.

        • filtersConfig (list) --

          Contains the type of the content filter and how strongly it should apply to prompts and model responses.

          • (dict) --

            Contains filter strengths for harmful content. AI Guardrail's support the following content filters to detect and filter harmful user inputs and FM-generated outputs.

            • Hate: Describes input prompts and model responses that discriminate, criticize, insult, denounce, or dehumanize a person or group on the basis of an identity (such as race, ethnicity, gender, religion, sexual orientation, ability, and national origin).

            • Insults: Describes input prompts and model responses that includes demeaning, humiliating, mocking, insulting, or belittling language. This type of language is also labeled as bullying.

            • Sexual: Describes input prompts and model responses that indicates sexual interest, activity, or arousal using direct or indirect references to body parts, physical traits, or sex.

            • Violence: Describes input prompts and model responses that includes glorification of, or threats to inflict physical pain, hurt, or injury toward a person, group, or thing.

            Content filtering depends on the confidence classification of user inputs and FM responses across each of the four harmful categories. All input and output statements are classified into one of four confidence levels (NONE, LOW, MEDIUM, HIGH) for each harmful category. For example, if a statement is classified as Hate with HIGH confidence, the likelihood of the statement representing hateful content is high. A single statement can be classified across multiple categories with varying confidence levels. For example, a single statement can be classified as Hate with HIGH confidence, Insults with LOW confidence, Sexual with NONE confidence, and Violence with MEDIUM confidence.

            • inputStrength (string) --

              The strength of the content filter to apply to prompts. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

            • outputStrength (string) --

              The strength of the content filter to apply to model responses. As you increase the filter strength, the likelihood of filtering harmful content increases and the probability of seeing harmful content in your application reduces.

            • type (string) --

              The harmful category that the content filter is applied to.

      • contextualGroundingPolicyConfig (dict) --

        The policy configuration details for the AI Guardrail's contextual grounding policy.

        • filtersConfig (list) --

          The filter configuration details for the AI Guardrails contextual grounding policy.

          • (dict) --

            The filter configuration details for the AI Guardrail's contextual grounding filter.

            • threshold (float) --

              The threshold details for the AI Guardrail's contextual grounding filter.

            • type (string) --

              The filter type for the AI Guardrail's contextual grounding filter.

      • description (string) --

        A description of the AI Guardrail.

      • modifiedTime (datetime) --

        The time the AI Guardrail was last modified.

      • name (string) --

        The name of the AI Guardrail.

      • sensitiveInformationPolicyConfig (dict) --

        Contains details about PII entities and regular expressions to configure for the AI Guardrail.

        • piiEntitiesConfig (list) --

          A list of PII entities to configure to the AI Guardrail.

          • (dict) --

            The PII entity to configure for the AI Guardrail.

            • action (string) --

              Configure AI Guardrail's action when the PII entity is detected.

            • type (string) --

              Configure AI Guardrail type when the PII entity is detected.

              The following PIIs are used to block or mask sensitive information:

              • General

                • ADDRESS A physical address, such as "100 Main Street, Anytown, USA" or "Suite #12, Building 123". An address can include information such as the street, building, location, city, state, country, county, zip code, precinct, and neighborhood.

                • AGE An individual's age, including the quantity and unit of time. For example, in the phrase "I am 40 years old," Guarrails recognizes "40 years" as an age.

                • NAME An individual's name. This entity type does not include titles, such as Dr., Mr., Mrs., or Miss. AI Guardrail doesn't apply this entity type to names that are part of organizations or addresses. For example, AI Guardrail recognizes the "John Doe Organization" as an organization, and it recognizes "Jane Doe Street" as an address.

                • EMAIL An email address, such as marymajor@email.com.

                • PHONE A phone number. This entity type also includes fax and pager numbers.

                • USERNAME A user name that identifies an account, such as a login name, screen name, nick name, or handle.

                • PASSWORD An alphanumeric string that is used as a password, such as "** very20special#pass**".

                • DRIVER_ID The number assigned to a driver's license, which is an official document permitting an individual to operate one or more motorized vehicles on a public road. A driver's license number consists of alphanumeric characters.

                • LICENSE_PLATE A license plate for a vehicle is issued by the state or country where the vehicle is registered. The format for passenger vehicles is typically five to eight digits, consisting of upper-case letters and numbers. The format varies depending on the location of the issuing state or country.

                • VEHICLE_IDENTIFICATION_NUMBER A Vehicle Identification Number (VIN) uniquely identifies a vehicle. VIN content and format are defined in the ISO 3779 specification. Each country has specific codes and formats for VINs.

              • Finance

                • REDIT_DEBIT_CARD_CVV A three-digit card verification code (CVV) that is present on VISA, MasterCard, and Discover credit and debit cards. For American Express credit or debit cards, the CVV is a four-digit numeric code.

                • CREDIT_DEBIT_CARD_EXPIRY The expiration date for a credit or debit card. This number is usually four digits long and is often formatted as month/year or MM/YY. AI Guardrail recognizes expiration dates such as 01/21, 01/2021, and Jan 2021.

                • CREDIT_DEBIT_CARD_NUMBER The number for a credit or debit card. These numbers can vary from 13 to 16 digits in length. However, Amazon Comprehend also recognizes credit or debit card numbers when only the last four digits are present.

                • PIN A four-digit personal identification number (PIN) with which you can access your bank account.

                • INTERNATIONAL_BANK_ACCOUNT_NUMBER An International Bank Account Number has specific formats in each country. For more information, see www.iban.com/structure.

                • SWIFT_CODE A SWIFT code is a standard format of Bank Identifier Code (BIC) used to specify a particular bank or branch. Banks use these codes for money transfers such as international wire transfers. SWIFT codes consist of eight or 11 characters. The 11-digit codes refer to specific branches, while eight-digit codes (or 11-digit codes ending in 'XXX') refer to the head or primary office.

              • IT

                • IP_ADDRESS An IPv4 address, such as 198.51.100.0.

                • MAC_ADDRESS A media access control (MAC) address is a unique identifier assigned to a network interface controller (NIC).

                • URL A web address, such as www.example.com.

                • AWS_ACCESS_KEY A unique identifier that's associated with a secret access key; you use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

                • AWS_SECRET_KEY A unique identifier that's associated with an access key. You use the access key ID and secret access key to sign programmatic Amazon Web Services requests cryptographically.

              • USA specific

                • US_BANK_ACCOUNT_NUMBER A US bank account number, which is typically 10 to 12 digits long.

                • US_BANK_ROUTING_NUMBER A US bank account routing number. These are typically nine digits long,

                • US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER A US Individual Taxpayer Identification Number (ITIN) is a nine-digit number that starts with a "9" and contain a "7" or "8" as the fourth digit. An ITIN can be formatted with a space or a dash after the third and forth digits.

                • US_PASSPORT_NUMBER A US passport number. Passport numbers range from six to nine alphanumeric characters.

                • US_SOCIAL_SECURITY_NUMBER A US Social Security Number (SSN) is a nine-digit number that is issued to US citizens, permanent residents, and temporary working residents.

              • Canada specific

                • CA_HEALTH_NUMBER A Canadian Health Service Number is a 10-digit unique identifier, required for individuals to access healthcare benefits.

                • CA_SOCIAL_INSURANCE_NUMBER A Canadian Social Insurance Number (SIN) is a nine-digit unique identifier, required for individuals to access government programs and benefits. The SIN is formatted as three groups of three digits, such as 123-456-789. A SIN can be validated through a simple check-digit process called the Luhn algorithm .

              • UK Specific

                • UK_NATIONAL_HEALTH_SERVICE_NUMBER A UK National Health Service Number is a 10-17 digit number, such as 485 555 3456. The current system formats the 10-digit number with spaces after the third and sixth digits. The final digit is an error-detecting checksum.

                • UK_NATIONAL_INSURANCE_NUMBER A UK National Insurance Number (NINO) provides individuals with access to National Insurance (social security) benefits. It is also used for some purposes in the UK tax system. The number is nine digits long and starts with two letters, followed by six numbers and one letter. A NINO can be formatted with a space or a dash after the two letters and after the second, forth, and sixth digits.

                • UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER A UK Unique Taxpayer Reference (UTR) is a 10-digit number that identifies a taxpayer or a business.

              • Custom

                • Regex filter - You can use a regular expressions to define patterns for an AI Guardrail to recognize and act upon such as serial number, booking ID etc..

        • regexesConfig (list) --

          A list of regular expressions to configure to the AI Guardrail.

          • (dict) --

            The regular expression to configure for the AI Guardrail.

            • action (string) --

              The AI Guardrail action to configure when matching regular expression is detected.

            • description (string) --

              The description of the regular expression to configure for the AI Guardrail.

            • name (string) --

              The name of the regular expression to configure for the AI Guardrail.

            • pattern (string) --

              The regular expression pattern to configure for the AI Guardrail.

      • status (string) --

        The status of the AI Guardrail.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • topicPolicyConfig (dict) --

        Contains details about topics that the AI Guardrail should identify and deny.

        • topicsConfig (list) --

          A list of policies related to topics that the AI Guardrail should deny.

          • (dict) --

            Details about topics for the AI Guardrail to identify and deny.

            • definition (string) --

              A definition of the topic to deny.

            • examples (list) --

              A list of prompts, each of which is an example of a prompt that can be categorized as belonging to the topic.

              • (string) --

                Text example in topic policy

            • name (string) --

              The name of the topic to deny.

            • type (string) --

              Specifies to deny the topic.

      • visibilityStatus (string) --

        The visibility status of the AI Guardrail.

      • wordPolicyConfig (dict) --

        Contains details about the word policy to configured for the AI Guardrail.

        • managedWordListsConfig (list) --

          A list of managed words to configure for the AI Guardrail.

          • (dict) --

            The managed word list to configure for the AI Guardrail.

            • type (string) --

              The managed word type to configure for the AI Guardrail.

        • wordsConfig (list) --

          A list of words to configure for the AI Guardrail.

          • (dict) --

            A word to configure for the AI Guardrail.

            • text (string) --

              Text of the word configured for the AI Guardrail to block.

    • versionNumber (integer) --

      The version number of the AI Guardrail version.

CreateAIAgent (updated) Link ¶
Changes (request, response)
Request
{'configuration': {'answerRecommendationAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                   'manualSearchAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                   'selfServiceAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                             'value': 'string'}],
                                                                                                                                                                                          'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                               'value': 'string'}],
                                                                                                                                                                                                            'tagCondition': {'key': 'string',
                                                                                                                                                                                                                             'value': 'string'}}],
                                                                                                                                                                                          'tagCondition': {'key': 'string',
                                                                                                                                                                                                           'value': 'string'}},
                                                                                                                                                                     'maxResults': 'integer',
                                                                                                                                                                     'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                        '| '
                                                                                                                                                                                                        'SEMANTIC'}},
                                                                                      'associationId': 'string',
                                                                                      'associationType': 'KNOWLEDGE_BASE'}],
                                                       'selfServiceAIGuardrailId': 'string',
                                                       'selfServiceAnswerGenerationAIPromptId': 'string',
                                                       'selfServicePreProcessingAIPromptId': 'string'}},
 'type': {'SELF_SERVICE'}}
Response
{'aiAgent': {'configuration': {'answerRecommendationAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                               'manualSearchAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                               'selfServiceAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                         'value': 'string'}],
                                                                                                                                                                                                      'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                           'value': 'string'}],
                                                                                                                                                                                                                        'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                         'value': 'string'}}],
                                                                                                                                                                                                      'tagCondition': {'key': 'string',
                                                                                                                                                                                                                       'value': 'string'}},
                                                                                                                                                                                 'maxResults': 'integer',
                                                                                                                                                                                 'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                    '| '
                                                                                                                                                                                                                    'SEMANTIC'}},
                                                                                                  'associationId': 'string',
                                                                                                  'associationType': 'KNOWLEDGE_BASE'}],
                                                                   'selfServiceAIGuardrailId': 'string',
                                                                   'selfServiceAnswerGenerationAIPromptId': 'string',
                                                                   'selfServicePreProcessingAIPromptId': 'string'}},
             'type': {'SELF_SERVICE'}}}

Creates an Amazon Q in Connect AI Agent.

See also: AWS API Documentation

Request Syntax

client.create_ai_agent(
    assistantId='string',
    clientToken='string',
    configuration={
        'answerRecommendationAIAgentConfiguration': {
            'answerGenerationAIGuardrailId': 'string',
            'answerGenerationAIPromptId': 'string',
            'associationConfigurations': [
                {
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ],
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                }
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    },
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE'
                },
            ],
            'intentLabelingGenerationAIPromptId': 'string',
            'queryReformulationAIPromptId': 'string'
        },
        'manualSearchAIAgentConfiguration': {
            'answerGenerationAIGuardrailId': 'string',
            'answerGenerationAIPromptId': 'string',
            'associationConfigurations': [
                {
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ],
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                }
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    },
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE'
                },
            ]
        },
        'selfServiceAIAgentConfiguration': {
            'associationConfigurations': [
                {
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ],
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                }
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    },
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE'
                },
            ],
            'selfServiceAIGuardrailId': 'string',
            'selfServiceAnswerGenerationAIPromptId': 'string',
            'selfServicePreProcessingAIPromptId': 'string'
        }
    },
    description='string',
    name='string',
    tags={
        'string': 'string'
    },
    type='MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
    visibilityStatus='SAVED'|'PUBLISHED'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 configuration:

dict

param configuration:

[REQUIRED]

The configuration of the AI Agent.

  • answerRecommendationAIAgentConfiguration (dict) --

    The configuration for AI Agents of type ANSWER_RECOMMENDATION.

    • answerGenerationAIGuardrailId (string) --

      The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

    • answerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

    • intentLabelingGenerationAIPromptId (string) --

      The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • queryReformulationAIPromptId (string) --

      The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

  • manualSearchAIAgentConfiguration (dict) --

    The configuration for AI Agents of type MANUAL_SEARCH.

    • answerGenerationAIGuardrailId (string) --

      The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

    • answerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

  • selfServiceAIAgentConfiguration (dict) --

    The configuration for AI Agents of type SELF_SERVICE.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

    • selfServiceAIGuardrailId (string) --

      The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

    • selfServiceAnswerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

    • selfServicePreProcessingAIPromptId (string) --

      The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

type description:

string

param description:

The description of the AI Agent.

type name:

string

param name:

[REQUIRED]

The name of the AI Agent.

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 the AI Agent.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visibility status of the AI Agent.

rtype:

dict

returns:

Response Syntax

{
    'aiAgent': {
        'aiAgentArn': 'string',
        'aiAgentId': 'string',
        'assistantArn': 'string',
        'assistantId': 'string',
        'configuration': {
            'answerRecommendationAIAgentConfiguration': {
                'answerGenerationAIGuardrailId': 'string',
                'answerGenerationAIPromptId': 'string',
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ],
                'intentLabelingGenerationAIPromptId': 'string',
                'queryReformulationAIPromptId': 'string'
            },
            'manualSearchAIAgentConfiguration': {
                'answerGenerationAIGuardrailId': 'string',
                'answerGenerationAIPromptId': 'string',
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ]
            },
            'selfServiceAIAgentConfiguration': {
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ],
                'selfServiceAIGuardrailId': 'string',
                'selfServiceAnswerGenerationAIPromptId': 'string',
                'selfServicePreProcessingAIPromptId': 'string'
            }
        },
        'description': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
        'visibilityStatus': 'SAVED'|'PUBLISHED'
    }
}

Response Structure

  • (dict) --

    • aiAgent (dict) --

      The data of the created AI Agent.

      • aiAgentArn (string) --

        The Amazon Resource Name (ARN) of the AI agent.

      • aiAgentId (string) --

        The identifier of the AI Agent.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • configuration (dict) --

        Configuration for the AI Agent.

        • answerRecommendationAIAgentConfiguration (dict) --

          The configuration for AI Agents of type ANSWER_RECOMMENDATION.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

          • intentLabelingGenerationAIPromptId (string) --

            The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • queryReformulationAIPromptId (string) --

            The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

        • manualSearchAIAgentConfiguration (dict) --

          The configuration for AI Agents of type MANUAL_SEARCH.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

        • selfServiceAIAgentConfiguration (dict) --

          The configuration for AI Agents of type SELF_SERVICE.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

          • selfServiceAIGuardrailId (string) --

            The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

          • selfServiceAnswerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

          • selfServicePreProcessingAIPromptId (string) --

            The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

      • description (string) --

        The description of the AI Agent.

      • modifiedTime (datetime) --

        The time the AI Agent was last modified.

      • name (string) --

        The name of the AI Agent.

      • origin (string) --

        Specifies the origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

      • status (string) --

        The status of the AI Agent.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • type (string) --

        The type of the AI Agent.

      • visibilityStatus (string) --

        The visibility status of the AI Agent.

CreateAIAgentVersion (updated) Link ¶
Changes (response)
{'aiAgent': {'configuration': {'answerRecommendationAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                               'manualSearchAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                               'selfServiceAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                         'value': 'string'}],
                                                                                                                                                                                                      'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                           'value': 'string'}],
                                                                                                                                                                                                                        'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                         'value': 'string'}}],
                                                                                                                                                                                                      'tagCondition': {'key': 'string',
                                                                                                                                                                                                                       'value': 'string'}},
                                                                                                                                                                                 'maxResults': 'integer',
                                                                                                                                                                                 'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                    '| '
                                                                                                                                                                                                                    'SEMANTIC'}},
                                                                                                  'associationId': 'string',
                                                                                                  'associationType': 'KNOWLEDGE_BASE'}],
                                                                   'selfServiceAIGuardrailId': 'string',
                                                                   'selfServiceAnswerGenerationAIPromptId': 'string',
                                                                   'selfServicePreProcessingAIPromptId': 'string'}},
             'type': {'SELF_SERVICE'}}}

Creates and Amazon Q in Connect AI Agent version.

See also: AWS API Documentation

Request Syntax

client.create_ai_agent_version(
    aiAgentId='string',
    assistantId='string',
    clientToken='string',
    modifiedTime=datetime(2015, 1, 1)
)
type aiAgentId:

string

param aiAgentId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Agent.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 modifiedTime:

datetime

param modifiedTime:

The modification time of the AI Agent should be tracked for version creation. This field should be specified to avoid version creation when simultaneous update to the underlying AI Agent are possible. The value should be the modifiedTime returned from the request to create or update an AI Agent so that version creation can fail if an update to the AI Agent post the specified modification time has been made.

rtype:

dict

returns:

Response Syntax

{
    'aiAgent': {
        'aiAgentArn': 'string',
        'aiAgentId': 'string',
        'assistantArn': 'string',
        'assistantId': 'string',
        'configuration': {
            'answerRecommendationAIAgentConfiguration': {
                'answerGenerationAIGuardrailId': 'string',
                'answerGenerationAIPromptId': 'string',
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ],
                'intentLabelingGenerationAIPromptId': 'string',
                'queryReformulationAIPromptId': 'string'
            },
            'manualSearchAIAgentConfiguration': {
                'answerGenerationAIGuardrailId': 'string',
                'answerGenerationAIPromptId': 'string',
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ]
            },
            'selfServiceAIAgentConfiguration': {
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ],
                'selfServiceAIGuardrailId': 'string',
                'selfServiceAnswerGenerationAIPromptId': 'string',
                'selfServicePreProcessingAIPromptId': 'string'
            }
        },
        'description': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
        'visibilityStatus': 'SAVED'|'PUBLISHED'
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiAgent (dict) --

      The data of the AI Agent version.

      • aiAgentArn (string) --

        The Amazon Resource Name (ARN) of the AI agent.

      • aiAgentId (string) --

        The identifier of the AI Agent.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • configuration (dict) --

        Configuration for the AI Agent.

        • answerRecommendationAIAgentConfiguration (dict) --

          The configuration for AI Agents of type ANSWER_RECOMMENDATION.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

          • intentLabelingGenerationAIPromptId (string) --

            The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • queryReformulationAIPromptId (string) --

            The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

        • manualSearchAIAgentConfiguration (dict) --

          The configuration for AI Agents of type MANUAL_SEARCH.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

        • selfServiceAIAgentConfiguration (dict) --

          The configuration for AI Agents of type SELF_SERVICE.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

          • selfServiceAIGuardrailId (string) --

            The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

          • selfServiceAnswerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

          • selfServicePreProcessingAIPromptId (string) --

            The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

      • description (string) --

        The description of the AI Agent.

      • modifiedTime (datetime) --

        The time the AI Agent was last modified.

      • name (string) --

        The name of the AI Agent.

      • origin (string) --

        Specifies the origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

      • status (string) --

        The status of the AI Agent.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • type (string) --

        The type of the AI Agent.

      • visibilityStatus (string) --

        The visibility status of the AI Agent.

    • versionNumber (integer) --

      The version number of the AI Agent version.

CreateAIPrompt (updated) Link ¶
Changes (request, response)
Request
{'type': {'SELF_SERVICE_PRE_PROCESSING', 'SELF_SERVICE_ANSWER_GENERATION'}}
Response
{'aiPrompt': {'type': {'SELF_SERVICE_ANSWER_GENERATION',
                       'SELF_SERVICE_PRE_PROCESSING'}}}

Creates an Amazon Q in Connect AI Prompt.

See also: AWS API Documentation

Request Syntax

client.create_ai_prompt(
    apiFormat='ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS',
    assistantId='string',
    clientToken='string',
    description='string',
    modelId='string',
    name='string',
    tags={
        'string': 'string'
    },
    templateConfiguration={
        'textFullAIPromptEditTemplateConfiguration': {
            'text': 'string'
        }
    },
    templateType='TEXT',
    type='ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION',
    visibilityStatus='SAVED'|'PUBLISHED'
)
type apiFormat:

string

param apiFormat:

[REQUIRED]

The API Format of the AI Prompt.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 of the AI Prompt.

type modelId:

string

param modelId:

[REQUIRED]

The identifier of the model used for this AI Prompt. Model Ids supported are: CLAUDE_3_HAIKU_20240307_V1

type name:

string

param name:

[REQUIRED]

The name of the AI Prompt.

type tags:

dict

param tags:

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

  • (string) --

    • (string) --

type templateConfiguration:

dict

param templateConfiguration:

[REQUIRED]

The configuration of the prompt template for this AI Prompt.

  • textFullAIPromptEditTemplateConfiguration (dict) --

    The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

    • text (string) -- [REQUIRED]

      The YAML text for the AI Prompt template.

type templateType:

string

param templateType:

[REQUIRED]

The type of the prompt template for this AI Prompt.

type type:

string

param type:

[REQUIRED]

The type of this AI Prompt.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visibility status of the AI Prompt.

rtype:

dict

returns:

Response Syntax

{
    'aiPrompt': {
        'aiPromptArn': 'string',
        'aiPromptId': 'string',
        'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS',
        'assistantArn': 'string',
        'assistantId': 'string',
        'description': 'string',
        'modelId': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'templateConfiguration': {
            'textFullAIPromptEditTemplateConfiguration': {
                'text': 'string'
            }
        },
        'templateType': 'TEXT',
        'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION',
        'visibilityStatus': 'SAVED'|'PUBLISHED'
    }
}

Response Structure

  • (dict) --

    • aiPrompt (dict) --

      The data of the AI Prompt.

      • aiPromptArn (string) --

        The Amazon Resource Name (ARN) of the AI Prompt.

      • aiPromptId (string) --

        The identifier of the Amazon Q in Connect AI prompt.

      • apiFormat (string) --

        The API format used for this AI Prompt.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • description (string) --

        The description of the AI Prompt.

      • modelId (string) --

        The identifier of the model used for this AI Prompt. Model Ids supported are: CLAUDE_3_HAIKU_20240307_V1.

      • modifiedTime (datetime) --

        The time the AI Prompt was last modified.

      • name (string) --

        The name of the AI Prompt

      • origin (string) --

        The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

      • status (string) --

        The status of the AI Prompt.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • templateConfiguration (dict) --

        The configuration of the prompt template for this AI Prompt.

        • textFullAIPromptEditTemplateConfiguration (dict) --

          The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

          • text (string) --

            The YAML text for the AI Prompt template.

      • templateType (string) --

        The type of the prompt template for this AI Prompt.

      • type (string) --

        The type of this AI Prompt.

      • visibilityStatus (string) --

        The visibility status of the AI Prompt.

CreateAIPromptVersion (updated) Link ¶
Changes (response)
{'aiPrompt': {'type': {'SELF_SERVICE_ANSWER_GENERATION',
                       'SELF_SERVICE_PRE_PROCESSING'}}}

Creates an Amazon Q in Connect AI Prompt version.

See also: AWS API Documentation

Request Syntax

client.create_ai_prompt_version(
    aiPromptId='string',
    assistantId='string',
    clientToken='string',
    modifiedTime=datetime(2015, 1, 1)
)
type aiPromptId:

string

param aiPromptId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI prompt.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 modifiedTime:

datetime

param modifiedTime:

The time the AI Prompt was last modified.

rtype:

dict

returns:

Response Syntax

{
    'aiPrompt': {
        'aiPromptArn': 'string',
        'aiPromptId': 'string',
        'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS',
        'assistantArn': 'string',
        'assistantId': 'string',
        'description': 'string',
        'modelId': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'templateConfiguration': {
            'textFullAIPromptEditTemplateConfiguration': {
                'text': 'string'
            }
        },
        'templateType': 'TEXT',
        'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION',
        'visibilityStatus': 'SAVED'|'PUBLISHED'
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiPrompt (dict) --

      The data of the AI Prompt version.

      • aiPromptArn (string) --

        The Amazon Resource Name (ARN) of the AI Prompt.

      • aiPromptId (string) --

        The identifier of the Amazon Q in Connect AI prompt.

      • apiFormat (string) --

        The API format used for this AI Prompt.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • description (string) --

        The description of the AI Prompt.

      • modelId (string) --

        The identifier of the model used for this AI Prompt. Model Ids supported are: CLAUDE_3_HAIKU_20240307_V1.

      • modifiedTime (datetime) --

        The time the AI Prompt was last modified.

      • name (string) --

        The name of the AI Prompt

      • origin (string) --

        The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

      • status (string) --

        The status of the AI Prompt.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • templateConfiguration (dict) --

        The configuration of the prompt template for this AI Prompt.

        • textFullAIPromptEditTemplateConfiguration (dict) --

          The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

          • text (string) --

            The YAML text for the AI Prompt template.

      • templateType (string) --

        The type of the prompt template for this AI Prompt.

      • type (string) --

        The type of this AI Prompt.

      • visibilityStatus (string) --

        The visibility status of the AI Prompt.

    • versionNumber (integer) --

      The version number of the AI Prompt version.

GetAIAgent (updated) Link ¶
Changes (response)
{'aiAgent': {'configuration': {'answerRecommendationAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                               'manualSearchAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                               'selfServiceAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                         'value': 'string'}],
                                                                                                                                                                                                      'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                           'value': 'string'}],
                                                                                                                                                                                                                        'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                         'value': 'string'}}],
                                                                                                                                                                                                      'tagCondition': {'key': 'string',
                                                                                                                                                                                                                       'value': 'string'}},
                                                                                                                                                                                 'maxResults': 'integer',
                                                                                                                                                                                 'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                    '| '
                                                                                                                                                                                                                    'SEMANTIC'}},
                                                                                                  'associationId': 'string',
                                                                                                  'associationType': 'KNOWLEDGE_BASE'}],
                                                                   'selfServiceAIGuardrailId': 'string',
                                                                   'selfServiceAnswerGenerationAIPromptId': 'string',
                                                                   'selfServicePreProcessingAIPromptId': 'string'}},
             'type': {'SELF_SERVICE'}}}

Gets an Amazon Q in Connect AI Agent.

See also: AWS API Documentation

Request Syntax

client.get_ai_agent(
    aiAgentId='string',
    assistantId='string'
)
type aiAgentId:

string

param aiAgentId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Agent (with or without a version qualifier). 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 in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

rtype:

dict

returns:

Response Syntax

{
    'aiAgent': {
        'aiAgentArn': 'string',
        'aiAgentId': 'string',
        'assistantArn': 'string',
        'assistantId': 'string',
        'configuration': {
            'answerRecommendationAIAgentConfiguration': {
                'answerGenerationAIGuardrailId': 'string',
                'answerGenerationAIPromptId': 'string',
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ],
                'intentLabelingGenerationAIPromptId': 'string',
                'queryReformulationAIPromptId': 'string'
            },
            'manualSearchAIAgentConfiguration': {
                'answerGenerationAIGuardrailId': 'string',
                'answerGenerationAIPromptId': 'string',
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ]
            },
            'selfServiceAIAgentConfiguration': {
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ],
                'selfServiceAIGuardrailId': 'string',
                'selfServiceAnswerGenerationAIPromptId': 'string',
                'selfServicePreProcessingAIPromptId': 'string'
            }
        },
        'description': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
        'visibilityStatus': 'SAVED'|'PUBLISHED'
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiAgent (dict) --

      The data of the AI Agent.

      • aiAgentArn (string) --

        The Amazon Resource Name (ARN) of the AI agent.

      • aiAgentId (string) --

        The identifier of the AI Agent.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • configuration (dict) --

        Configuration for the AI Agent.

        • answerRecommendationAIAgentConfiguration (dict) --

          The configuration for AI Agents of type ANSWER_RECOMMENDATION.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

          • intentLabelingGenerationAIPromptId (string) --

            The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • queryReformulationAIPromptId (string) --

            The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

        • manualSearchAIAgentConfiguration (dict) --

          The configuration for AI Agents of type MANUAL_SEARCH.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

        • selfServiceAIAgentConfiguration (dict) --

          The configuration for AI Agents of type SELF_SERVICE.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

          • selfServiceAIGuardrailId (string) --

            The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

          • selfServiceAnswerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

          • selfServicePreProcessingAIPromptId (string) --

            The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

      • description (string) --

        The description of the AI Agent.

      • modifiedTime (datetime) --

        The time the AI Agent was last modified.

      • name (string) --

        The name of the AI Agent.

      • origin (string) --

        Specifies the origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

      • status (string) --

        The status of the AI Agent.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • type (string) --

        The type of the AI Agent.

      • visibilityStatus (string) --

        The visibility status of the AI Agent.

    • versionNumber (integer) --

      The version number of the AI Agent version (returned if an AI Agent version was specified via use of a qualifier for the aiAgentId on the request).

GetAIPrompt (updated) Link ¶
Changes (response)
{'aiPrompt': {'type': {'SELF_SERVICE_ANSWER_GENERATION',
                       'SELF_SERVICE_PRE_PROCESSING'}}}

Gets and Amazon Q in Connect AI Prompt.

See also: AWS API Documentation

Request Syntax

client.get_ai_prompt(
    aiPromptId='string',
    assistantId='string'
)
type aiPromptId:

string

param aiPromptId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI prompt.

type assistantId:

string

param assistantId:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

{
    'aiPrompt': {
        'aiPromptArn': 'string',
        'aiPromptId': 'string',
        'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS',
        'assistantArn': 'string',
        'assistantId': 'string',
        'description': 'string',
        'modelId': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'templateConfiguration': {
            'textFullAIPromptEditTemplateConfiguration': {
                'text': 'string'
            }
        },
        'templateType': 'TEXT',
        'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION',
        'visibilityStatus': 'SAVED'|'PUBLISHED'
    },
    'versionNumber': 123
}

Response Structure

  • (dict) --

    • aiPrompt (dict) --

      The data of the AI Prompt.

      • aiPromptArn (string) --

        The Amazon Resource Name (ARN) of the AI Prompt.

      • aiPromptId (string) --

        The identifier of the Amazon Q in Connect AI prompt.

      • apiFormat (string) --

        The API format used for this AI Prompt.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • description (string) --

        The description of the AI Prompt.

      • modelId (string) --

        The identifier of the model used for this AI Prompt. Model Ids supported are: CLAUDE_3_HAIKU_20240307_V1.

      • modifiedTime (datetime) --

        The time the AI Prompt was last modified.

      • name (string) --

        The name of the AI Prompt

      • origin (string) --

        The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

      • status (string) --

        The status of the AI Prompt.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • templateConfiguration (dict) --

        The configuration of the prompt template for this AI Prompt.

        • textFullAIPromptEditTemplateConfiguration (dict) --

          The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

          • text (string) --

            The YAML text for the AI Prompt template.

      • templateType (string) --

        The type of the prompt template for this AI Prompt.

      • type (string) --

        The type of this AI Prompt.

      • visibilityStatus (string) --

        The visibility status of the AI Prompt.

    • versionNumber (integer) --

      The version number of the AI Prompt version (returned if an AI Prompt version was specified via use of a qualifier for the aiPromptId on the request).

ListAIAgentVersions (updated) Link ¶
Changes (response)
{'aiAgentVersionSummaries': {'aiAgentSummary': {'configuration': {'answerRecommendationAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                                                                  'manualSearchAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                                                                  'selfServiceAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                            'value': 'string'}],
                                                                                                                                                                                                                                         'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                                              'value': 'string'}],
                                                                                                                                                                                                                                                           'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                                            'value': 'string'}}],
                                                                                                                                                                                                                                         'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                          'value': 'string'}},
                                                                                                                                                                                                                    'maxResults': 'integer',
                                                                                                                                                                                                                    'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                                                       '| '
                                                                                                                                                                                                                                                       'SEMANTIC'}},
                                                                                                                                     'associationId': 'string',
                                                                                                                                     'associationType': 'KNOWLEDGE_BASE'}],
                                                                                                      'selfServiceAIGuardrailId': 'string',
                                                                                                      'selfServiceAnswerGenerationAIPromptId': 'string',
                                                                                                      'selfServicePreProcessingAIPromptId': 'string'}},
                                                'type': {'SELF_SERVICE'}}}}

List AI Agent versions.

See also: AWS API Documentation

Request Syntax

client.list_ai_agent_versions(
    aiAgentId='string',
    assistantId='string',
    maxResults=123,
    nextToken='string',
    origin='SYSTEM'|'CUSTOMER'
)
type aiAgentId:

string

param aiAgentId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Agent for which versions are to be listed.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 origin:

string

param origin:

The origin of the AI Agent versions to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

rtype:

dict

returns:

Response Syntax

{
    'aiAgentVersionSummaries': [
        {
            'aiAgentSummary': {
                'aiAgentArn': 'string',
                'aiAgentId': 'string',
                'assistantArn': 'string',
                'assistantId': 'string',
                'configuration': {
                    'answerRecommendationAIAgentConfiguration': {
                        'answerGenerationAIGuardrailId': 'string',
                        'answerGenerationAIPromptId': 'string',
                        'associationConfigurations': [
                            {
                                'associationConfigurationData': {
                                    'knowledgeBaseAssociationConfigurationData': {
                                        'contentTagFilter': {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'orConditions': [
                                                {
                                                    'andConditions': [
                                                        {
                                                            'key': 'string',
                                                            'value': 'string'
                                                        },
                                                    ],
                                                    'tagCondition': {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    }
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                        'maxResults': 123,
                                        'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                    }
                                },
                                'associationId': 'string',
                                'associationType': 'KNOWLEDGE_BASE'
                            },
                        ],
                        'intentLabelingGenerationAIPromptId': 'string',
                        'queryReformulationAIPromptId': 'string'
                    },
                    'manualSearchAIAgentConfiguration': {
                        'answerGenerationAIGuardrailId': 'string',
                        'answerGenerationAIPromptId': 'string',
                        'associationConfigurations': [
                            {
                                'associationConfigurationData': {
                                    'knowledgeBaseAssociationConfigurationData': {
                                        'contentTagFilter': {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'orConditions': [
                                                {
                                                    'andConditions': [
                                                        {
                                                            'key': 'string',
                                                            'value': 'string'
                                                        },
                                                    ],
                                                    'tagCondition': {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    }
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                        'maxResults': 123,
                                        'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                    }
                                },
                                'associationId': 'string',
                                'associationType': 'KNOWLEDGE_BASE'
                            },
                        ]
                    },
                    'selfServiceAIAgentConfiguration': {
                        'associationConfigurations': [
                            {
                                'associationConfigurationData': {
                                    'knowledgeBaseAssociationConfigurationData': {
                                        'contentTagFilter': {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'orConditions': [
                                                {
                                                    'andConditions': [
                                                        {
                                                            'key': 'string',
                                                            'value': 'string'
                                                        },
                                                    ],
                                                    'tagCondition': {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    }
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                        'maxResults': 123,
                                        'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                    }
                                },
                                'associationId': 'string',
                                'associationType': 'KNOWLEDGE_BASE'
                            },
                        ],
                        'selfServiceAIGuardrailId': 'string',
                        'selfServiceAnswerGenerationAIPromptId': 'string',
                        'selfServicePreProcessingAIPromptId': 'string'
                    }
                },
                'description': 'string',
                'modifiedTime': datetime(2015, 1, 1),
                'name': 'string',
                'origin': 'SYSTEM'|'CUSTOMER',
                'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
                'tags': {
                    'string': 'string'
                },
                'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
                'visibilityStatus': 'SAVED'|'PUBLISHED'
            },
            'versionNumber': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiAgentVersionSummaries (list) --

      The summaries of AI Agent versions.

      • (dict) --

        The summary of the AI Agent version.

        • aiAgentSummary (dict) --

          The data for the summary of the AI Agent version.

          • aiAgentArn (string) --

            The Amazon Resource Name (ARN) of the AI agent.

          • aiAgentId (string) --

            The identifier of the AI Agent.

          • assistantArn (string) --

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

          • assistantId (string) --

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

          • configuration (dict) --

            The configuration for the AI Agent.

            • answerRecommendationAIAgentConfiguration (dict) --

              The configuration for AI Agents of type ANSWER_RECOMMENDATION.

              • answerGenerationAIGuardrailId (string) --

                The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

              • answerGenerationAIPromptId (string) --

                The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

              • associationConfigurations (list) --

                The association configurations for overriding behavior on this AI Agent.

                • (dict) --

                  The configuration for an Amazon Q in Connect Assistant Association.

                  • associationConfigurationData (dict) --

                    The data of the configuration for an Amazon Q in Connect Assistant Association.

                    • knowledgeBaseAssociationConfigurationData (dict) --

                      The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                      • contentTagFilter (dict) --

                        An object that can be used to specify Tag conditions.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • orConditions (list) --

                          A list of conditions which would be applied together with an OR condition.

                          • (dict) --

                            A list of conditions which would be applied together with an OR condition.

                            • andConditions (list) --

                              A list of conditions which would be applied together with an AND condition.

                              • (dict) --

                                A leaf node condition which can be used to specify a tag condition.

                                • key (string) --

                                  The tag key in the tag condition.

                                • value (string) --

                                  The tag value in the tag condition.

                            • tagCondition (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • maxResults (integer) --

                        The maximum number of results to return per page.

                      • overrideKnowledgeBaseSearchType (string) --

                        The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

                  • associationId (string) --

                    The identifier of the association for this Association Configuration.

                  • associationType (string) --

                    The type of the association for this Association Configuration.

              • intentLabelingGenerationAIPromptId (string) --

                The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

              • queryReformulationAIPromptId (string) --

                The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

            • manualSearchAIAgentConfiguration (dict) --

              The configuration for AI Agents of type MANUAL_SEARCH.

              • answerGenerationAIGuardrailId (string) --

                The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

              • answerGenerationAIPromptId (string) --

                The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

              • associationConfigurations (list) --

                The association configurations for overriding behavior on this AI Agent.

                • (dict) --

                  The configuration for an Amazon Q in Connect Assistant Association.

                  • associationConfigurationData (dict) --

                    The data of the configuration for an Amazon Q in Connect Assistant Association.

                    • knowledgeBaseAssociationConfigurationData (dict) --

                      The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                      • contentTagFilter (dict) --

                        An object that can be used to specify Tag conditions.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • orConditions (list) --

                          A list of conditions which would be applied together with an OR condition.

                          • (dict) --

                            A list of conditions which would be applied together with an OR condition.

                            • andConditions (list) --

                              A list of conditions which would be applied together with an AND condition.

                              • (dict) --

                                A leaf node condition which can be used to specify a tag condition.

                                • key (string) --

                                  The tag key in the tag condition.

                                • value (string) --

                                  The tag value in the tag condition.

                            • tagCondition (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • maxResults (integer) --

                        The maximum number of results to return per page.

                      • overrideKnowledgeBaseSearchType (string) --

                        The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

                  • associationId (string) --

                    The identifier of the association for this Association Configuration.

                  • associationType (string) --

                    The type of the association for this Association Configuration.

            • selfServiceAIAgentConfiguration (dict) --

              The configuration for AI Agents of type SELF_SERVICE.

              • associationConfigurations (list) --

                The association configurations for overriding behavior on this AI Agent.

                • (dict) --

                  The configuration for an Amazon Q in Connect Assistant Association.

                  • associationConfigurationData (dict) --

                    The data of the configuration for an Amazon Q in Connect Assistant Association.

                    • knowledgeBaseAssociationConfigurationData (dict) --

                      The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                      • contentTagFilter (dict) --

                        An object that can be used to specify Tag conditions.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • orConditions (list) --

                          A list of conditions which would be applied together with an OR condition.

                          • (dict) --

                            A list of conditions which would be applied together with an OR condition.

                            • andConditions (list) --

                              A list of conditions which would be applied together with an AND condition.

                              • (dict) --

                                A leaf node condition which can be used to specify a tag condition.

                                • key (string) --

                                  The tag key in the tag condition.

                                • value (string) --

                                  The tag value in the tag condition.

                            • tagCondition (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • maxResults (integer) --

                        The maximum number of results to return per page.

                      • overrideKnowledgeBaseSearchType (string) --

                        The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

                  • associationId (string) --

                    The identifier of the association for this Association Configuration.

                  • associationType (string) --

                    The type of the association for this Association Configuration.

              • selfServiceAIGuardrailId (string) --

                The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

              • selfServiceAnswerGenerationAIPromptId (string) --

                The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

              • selfServicePreProcessingAIPromptId (string) --

                The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

          • description (string) --

            The description of the AI Agent.

          • modifiedTime (datetime) --

            The time the AI Agent was last modified.

          • name (string) --

            The name of the AI Agent.

          • origin (string) --

            The origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

          • status (string) --

            The status of the AI Agent.

          • tags (dict) --

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

            • (string) --

              • (string) --

          • type (string) --

            The type of the AI Agent.

          • visibilityStatus (string) --

            The visibility status of the AI Agent.

        • versionNumber (integer) --

          The version number for this AI Agent version.

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

ListAIAgents (updated) Link ¶
Changes (response)
{'aiAgentSummaries': {'configuration': {'answerRecommendationAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                                        'manualSearchAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                                        'selfServiceAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                  'value': 'string'}],
                                                                                                                                                                                                               'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                                    'value': 'string'}],
                                                                                                                                                                                                                                 'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                                  'value': 'string'}}],
                                                                                                                                                                                                               'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                'value': 'string'}},
                                                                                                                                                                                          'maxResults': 'integer',
                                                                                                                                                                                          'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                             '| '
                                                                                                                                                                                                                             'SEMANTIC'}},
                                                                                                           'associationId': 'string',
                                                                                                           'associationType': 'KNOWLEDGE_BASE'}],
                                                                            'selfServiceAIGuardrailId': 'string',
                                                                            'selfServiceAnswerGenerationAIPromptId': 'string',
                                                                            'selfServicePreProcessingAIPromptId': 'string'}},
                      'type': {'SELF_SERVICE'}}}

Lists AI Agents.

See also: AWS API Documentation

Request Syntax

client.list_ai_agents(
    assistantId='string',
    maxResults=123,
    nextToken='string',
    origin='SYSTEM'|'CUSTOMER'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 origin:

string

param origin:

The origin of the AI Agents to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

rtype:

dict

returns:

Response Syntax

{
    'aiAgentSummaries': [
        {
            'aiAgentArn': 'string',
            'aiAgentId': 'string',
            'assistantArn': 'string',
            'assistantId': 'string',
            'configuration': {
                'answerRecommendationAIAgentConfiguration': {
                    'answerGenerationAIGuardrailId': 'string',
                    'answerGenerationAIPromptId': 'string',
                    'associationConfigurations': [
                        {
                            'associationConfigurationData': {
                                'knowledgeBaseAssociationConfigurationData': {
                                    'contentTagFilter': {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'orConditions': [
                                            {
                                                'andConditions': [
                                                    {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    },
                                                ],
                                                'tagCondition': {
                                                    'key': 'string',
                                                    'value': 'string'
                                                }
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                    'maxResults': 123,
                                    'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                }
                            },
                            'associationId': 'string',
                            'associationType': 'KNOWLEDGE_BASE'
                        },
                    ],
                    'intentLabelingGenerationAIPromptId': 'string',
                    'queryReformulationAIPromptId': 'string'
                },
                'manualSearchAIAgentConfiguration': {
                    'answerGenerationAIGuardrailId': 'string',
                    'answerGenerationAIPromptId': 'string',
                    'associationConfigurations': [
                        {
                            'associationConfigurationData': {
                                'knowledgeBaseAssociationConfigurationData': {
                                    'contentTagFilter': {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'orConditions': [
                                            {
                                                'andConditions': [
                                                    {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    },
                                                ],
                                                'tagCondition': {
                                                    'key': 'string',
                                                    'value': 'string'
                                                }
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                    'maxResults': 123,
                                    'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                }
                            },
                            'associationId': 'string',
                            'associationType': 'KNOWLEDGE_BASE'
                        },
                    ]
                },
                'selfServiceAIAgentConfiguration': {
                    'associationConfigurations': [
                        {
                            'associationConfigurationData': {
                                'knowledgeBaseAssociationConfigurationData': {
                                    'contentTagFilter': {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'orConditions': [
                                            {
                                                'andConditions': [
                                                    {
                                                        'key': 'string',
                                                        'value': 'string'
                                                    },
                                                ],
                                                'tagCondition': {
                                                    'key': 'string',
                                                    'value': 'string'
                                                }
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                    'maxResults': 123,
                                    'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                                }
                            },
                            'associationId': 'string',
                            'associationType': 'KNOWLEDGE_BASE'
                        },
                    ],
                    'selfServiceAIGuardrailId': 'string',
                    'selfServiceAnswerGenerationAIPromptId': 'string',
                    'selfServicePreProcessingAIPromptId': 'string'
                }
            },
            'description': 'string',
            'modifiedTime': datetime(2015, 1, 1),
            'name': 'string',
            'origin': 'SYSTEM'|'CUSTOMER',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
            'tags': {
                'string': 'string'
            },
            'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
            'visibilityStatus': 'SAVED'|'PUBLISHED'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiAgentSummaries (list) --

      The summaries of AI Agents.

      • (dict) --

        The summary of the AI Agent.

        • aiAgentArn (string) --

          The Amazon Resource Name (ARN) of the AI agent.

        • aiAgentId (string) --

          The identifier of the AI Agent.

        • assistantArn (string) --

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

        • assistantId (string) --

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

        • configuration (dict) --

          The configuration for the AI Agent.

          • answerRecommendationAIAgentConfiguration (dict) --

            The configuration for AI Agents of type ANSWER_RECOMMENDATION.

            • answerGenerationAIGuardrailId (string) --

              The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

            • answerGenerationAIPromptId (string) --

              The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

            • associationConfigurations (list) --

              The association configurations for overriding behavior on this AI Agent.

              • (dict) --

                The configuration for an Amazon Q in Connect Assistant Association.

                • associationConfigurationData (dict) --

                  The data of the configuration for an Amazon Q in Connect Assistant Association.

                  • knowledgeBaseAssociationConfigurationData (dict) --

                    The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                    • contentTagFilter (dict) --

                      An object that can be used to specify Tag conditions.

                      • andConditions (list) --

                        A list of conditions which would be applied together with an AND condition.

                        • (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • orConditions (list) --

                        A list of conditions which would be applied together with an OR condition.

                        • (dict) --

                          A list of conditions which would be applied together with an OR condition.

                          • andConditions (list) --

                            A list of conditions which would be applied together with an AND condition.

                            • (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                          • tagCondition (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                      • tagCondition (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • maxResults (integer) --

                      The maximum number of results to return per page.

                    • overrideKnowledgeBaseSearchType (string) --

                      The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

                • associationId (string) --

                  The identifier of the association for this Association Configuration.

                • associationType (string) --

                  The type of the association for this Association Configuration.

            • intentLabelingGenerationAIPromptId (string) --

              The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

            • queryReformulationAIPromptId (string) --

              The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • manualSearchAIAgentConfiguration (dict) --

            The configuration for AI Agents of type MANUAL_SEARCH.

            • answerGenerationAIGuardrailId (string) --

              The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

            • answerGenerationAIPromptId (string) --

              The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

            • associationConfigurations (list) --

              The association configurations for overriding behavior on this AI Agent.

              • (dict) --

                The configuration for an Amazon Q in Connect Assistant Association.

                • associationConfigurationData (dict) --

                  The data of the configuration for an Amazon Q in Connect Assistant Association.

                  • knowledgeBaseAssociationConfigurationData (dict) --

                    The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                    • contentTagFilter (dict) --

                      An object that can be used to specify Tag conditions.

                      • andConditions (list) --

                        A list of conditions which would be applied together with an AND condition.

                        • (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • orConditions (list) --

                        A list of conditions which would be applied together with an OR condition.

                        • (dict) --

                          A list of conditions which would be applied together with an OR condition.

                          • andConditions (list) --

                            A list of conditions which would be applied together with an AND condition.

                            • (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                          • tagCondition (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                      • tagCondition (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • maxResults (integer) --

                      The maximum number of results to return per page.

                    • overrideKnowledgeBaseSearchType (string) --

                      The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

                • associationId (string) --

                  The identifier of the association for this Association Configuration.

                • associationType (string) --

                  The type of the association for this Association Configuration.

          • selfServiceAIAgentConfiguration (dict) --

            The configuration for AI Agents of type SELF_SERVICE.

            • associationConfigurations (list) --

              The association configurations for overriding behavior on this AI Agent.

              • (dict) --

                The configuration for an Amazon Q in Connect Assistant Association.

                • associationConfigurationData (dict) --

                  The data of the configuration for an Amazon Q in Connect Assistant Association.

                  • knowledgeBaseAssociationConfigurationData (dict) --

                    The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                    • contentTagFilter (dict) --

                      An object that can be used to specify Tag conditions.

                      • andConditions (list) --

                        A list of conditions which would be applied together with an AND condition.

                        • (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                      • orConditions (list) --

                        A list of conditions which would be applied together with an OR condition.

                        • (dict) --

                          A list of conditions which would be applied together with an OR condition.

                          • andConditions (list) --

                            A list of conditions which would be applied together with an AND condition.

                            • (dict) --

                              A leaf node condition which can be used to specify a tag condition.

                              • key (string) --

                                The tag key in the tag condition.

                              • value (string) --

                                The tag value in the tag condition.

                          • tagCondition (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                      • tagCondition (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • maxResults (integer) --

                      The maximum number of results to return per page.

                    • overrideKnowledgeBaseSearchType (string) --

                      The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

                • associationId (string) --

                  The identifier of the association for this Association Configuration.

                • associationType (string) --

                  The type of the association for this Association Configuration.

            • selfServiceAIGuardrailId (string) --

              The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

            • selfServiceAnswerGenerationAIPromptId (string) --

              The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

            • selfServicePreProcessingAIPromptId (string) --

              The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

        • description (string) --

          The description of the AI Agent.

        • modifiedTime (datetime) --

          The time the AI Agent was last modified.

        • name (string) --

          The name of the AI Agent.

        • origin (string) --

          The origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

        • status (string) --

          The status of the AI Agent.

        • tags (dict) --

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

          • (string) --

            • (string) --

        • type (string) --

          The type of the AI Agent.

        • visibilityStatus (string) --

          The visibility status of the AI Agent.

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

ListAIPromptVersions (updated) Link ¶
Changes (response)
{'aiPromptVersionSummaries': {'aiPromptSummary': {'type': {'SELF_SERVICE_ANSWER_GENERATION',
                                                           'SELF_SERVICE_PRE_PROCESSING'}}}}

Lists AI Prompt versions.

See also: AWS API Documentation

Request Syntax

client.list_ai_prompt_versions(
    aiPromptId='string',
    assistantId='string',
    maxResults=123,
    nextToken='string',
    origin='SYSTEM'|'CUSTOMER'
)
type aiPromptId:

string

param aiPromptId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI prompt for which versions are to be listed.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 origin:

string

param origin:

The origin of the AI Prompt versions to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

rtype:

dict

returns:

Response Syntax

{
    'aiPromptVersionSummaries': [
        {
            'aiPromptSummary': {
                'aiPromptArn': 'string',
                'aiPromptId': 'string',
                'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS',
                'assistantArn': 'string',
                'assistantId': 'string',
                'description': 'string',
                'modelId': 'string',
                'modifiedTime': datetime(2015, 1, 1),
                'name': 'string',
                'origin': 'SYSTEM'|'CUSTOMER',
                'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
                'tags': {
                    'string': 'string'
                },
                'templateType': 'TEXT',
                'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION',
                'visibilityStatus': 'SAVED'|'PUBLISHED'
            },
            'versionNumber': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiPromptVersionSummaries (list) --

      The summaries of the AI Prompt versions.

      • (dict) --

        The summary of the AI Prompt version.

        • aiPromptSummary (dict) --

          The date for the summary of the AI Prompt version.

          • aiPromptArn (string) --

            The Amazon Resource Name (ARN) of the AI Prompt.

          • aiPromptId (string) --

            The identifier of the Amazon Q in Connect AI prompt.

          • apiFormat (string) --

            The API format used for this AI Prompt.

          • assistantArn (string) --

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

          • assistantId (string) --

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

          • description (string) --

            The description of the AI Prompt.

          • modelId (string) --

            The identifier of the model used for this AI Prompt. Model Ids supported are: CLAUDE_3_HAIKU_20240307_V1.

          • modifiedTime (datetime) --

            The time the AI Prompt was last modified.

          • name (string) --

            The name of the AI Prompt.

          • origin (string) --

            The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

          • status (string) --

            The status of the AI Prompt.

          • tags (dict) --

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

            • (string) --

              • (string) --

          • templateType (string) --

            The type of the prompt template for this AI Prompt.

          • type (string) --

            The type of this AI Prompt.

          • visibilityStatus (string) --

            The visibility status of the AI Prompt.

        • versionNumber (integer) --

          The version number for this AI Prompt version.

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

ListAIPrompts (updated) Link ¶
Changes (response)
{'aiPromptSummaries': {'type': {'SELF_SERVICE_ANSWER_GENERATION',
                                'SELF_SERVICE_PRE_PROCESSING'}}}

Lists the AI Prompts available on the Amazon Q in Connect assistant.

See also: AWS API Documentation

Request Syntax

client.list_ai_prompts(
    assistantId='string',
    maxResults=123,
    nextToken='string',
    origin='SYSTEM'|'CUSTOMER'
)
type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 origin:

string

param origin:

The origin of the AI Prompts to be listed. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

rtype:

dict

returns:

Response Syntax

{
    'aiPromptSummaries': [
        {
            'aiPromptArn': 'string',
            'aiPromptId': 'string',
            'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS',
            'assistantArn': 'string',
            'assistantId': 'string',
            'description': 'string',
            'modelId': 'string',
            'modifiedTime': datetime(2015, 1, 1),
            'name': 'string',
            'origin': 'SYSTEM'|'CUSTOMER',
            'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
            'tags': {
                'string': 'string'
            },
            'templateType': 'TEXT',
            'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION',
            'visibilityStatus': 'SAVED'|'PUBLISHED'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • aiPromptSummaries (list) --

      The summaries of the AI Prompts.

      • (dict) --

        The summary of the AI Prompt.

        • aiPromptArn (string) --

          The Amazon Resource Name (ARN) of the AI Prompt.

        • aiPromptId (string) --

          The identifier of the Amazon Q in Connect AI prompt.

        • apiFormat (string) --

          The API format used for this AI Prompt.

        • assistantArn (string) --

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

        • assistantId (string) --

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

        • description (string) --

          The description of the AI Prompt.

        • modelId (string) --

          The identifier of the model used for this AI Prompt. Model Ids supported are: CLAUDE_3_HAIKU_20240307_V1.

        • modifiedTime (datetime) --

          The time the AI Prompt was last modified.

        • name (string) --

          The name of the AI Prompt.

        • origin (string) --

          The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

        • status (string) --

          The status of the AI Prompt.

        • tags (dict) --

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

          • (string) --

            • (string) --

        • templateType (string) --

          The type of the prompt template for this AI Prompt.

        • type (string) --

          The type of this AI Prompt.

        • visibilityStatus (string) --

          The visibility status of the AI Prompt.

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

RemoveAssistantAIAgent (updated) Link ¶
Changes (request)
{'aiAgentType': {'SELF_SERVICE'}}

Removes the AI Agent that is set for use by defafult on an Amazon Q in Connect Assistant.

See also: AWS API Documentation

Request Syntax

client.remove_assistant_ai_agent(
    aiAgentType='MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
    assistantId='string'
)
type aiAgentType:

string

param aiAgentType:

[REQUIRED]

The type of the AI Agent being removed for use by default from the Amazon Q in Connect Assistant.

type assistantId:

string

param assistantId:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

UpdateAIAgent (updated) Link ¶
Changes (request, response)
Request
{'configuration': {'answerRecommendationAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                   'manualSearchAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                   'selfServiceAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                             'value': 'string'}],
                                                                                                                                                                                          'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                               'value': 'string'}],
                                                                                                                                                                                                            'tagCondition': {'key': 'string',
                                                                                                                                                                                                                             'value': 'string'}}],
                                                                                                                                                                                          'tagCondition': {'key': 'string',
                                                                                                                                                                                                           'value': 'string'}},
                                                                                                                                                                     'maxResults': 'integer',
                                                                                                                                                                     'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                        '| '
                                                                                                                                                                                                        'SEMANTIC'}},
                                                                                      'associationId': 'string',
                                                                                      'associationType': 'KNOWLEDGE_BASE'}],
                                                       'selfServiceAIGuardrailId': 'string',
                                                       'selfServiceAnswerGenerationAIPromptId': 'string',
                                                       'selfServicePreProcessingAIPromptId': 'string'}}}
Response
{'aiAgent': {'configuration': {'answerRecommendationAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                               'manualSearchAIAgentConfiguration': {'answerGenerationAIGuardrailId': 'string'},
                               'selfServiceAIAgentConfiguration': {'associationConfigurations': [{'associationConfigurationData': {'knowledgeBaseAssociationConfigurationData': {'contentTagFilter': {'andConditions': [{'key': 'string',
                                                                                                                                                                                                                         'value': 'string'}],
                                                                                                                                                                                                      'orConditions': [{'andConditions': [{'key': 'string',
                                                                                                                                                                                                                                           'value': 'string'}],
                                                                                                                                                                                                                        'tagCondition': {'key': 'string',
                                                                                                                                                                                                                                         'value': 'string'}}],
                                                                                                                                                                                                      'tagCondition': {'key': 'string',
                                                                                                                                                                                                                       'value': 'string'}},
                                                                                                                                                                                 'maxResults': 'integer',
                                                                                                                                                                                 'overrideKnowledgeBaseSearchType': 'HYBRID '
                                                                                                                                                                                                                    '| '
                                                                                                                                                                                                                    'SEMANTIC'}},
                                                                                                  'associationId': 'string',
                                                                                                  'associationType': 'KNOWLEDGE_BASE'}],
                                                                   'selfServiceAIGuardrailId': 'string',
                                                                   'selfServiceAnswerGenerationAIPromptId': 'string',
                                                                   'selfServicePreProcessingAIPromptId': 'string'}},
             'type': {'SELF_SERVICE'}}}

Updates an AI Agent.

See also: AWS API Documentation

Request Syntax

client.update_ai_agent(
    aiAgentId='string',
    assistantId='string',
    clientToken='string',
    configuration={
        'answerRecommendationAIAgentConfiguration': {
            'answerGenerationAIGuardrailId': 'string',
            'answerGenerationAIPromptId': 'string',
            'associationConfigurations': [
                {
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ],
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                }
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    },
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE'
                },
            ],
            'intentLabelingGenerationAIPromptId': 'string',
            'queryReformulationAIPromptId': 'string'
        },
        'manualSearchAIAgentConfiguration': {
            'answerGenerationAIGuardrailId': 'string',
            'answerGenerationAIPromptId': 'string',
            'associationConfigurations': [
                {
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ],
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                }
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    },
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE'
                },
            ]
        },
        'selfServiceAIAgentConfiguration': {
            'associationConfigurations': [
                {
                    'associationConfigurationData': {
                        'knowledgeBaseAssociationConfigurationData': {
                            'contentTagFilter': {
                                'andConditions': [
                                    {
                                        'key': 'string',
                                        'value': 'string'
                                    },
                                ],
                                'orConditions': [
                                    {
                                        'andConditions': [
                                            {
                                                'key': 'string',
                                                'value': 'string'
                                            },
                                        ],
                                        'tagCondition': {
                                            'key': 'string',
                                            'value': 'string'
                                        }
                                    },
                                ],
                                'tagCondition': {
                                    'key': 'string',
                                    'value': 'string'
                                }
                            },
                            'maxResults': 123,
                            'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                        }
                    },
                    'associationId': 'string',
                    'associationType': 'KNOWLEDGE_BASE'
                },
            ],
            'selfServiceAIGuardrailId': 'string',
            'selfServiceAnswerGenerationAIPromptId': 'string',
            'selfServicePreProcessingAIPromptId': 'string'
        }
    },
    description='string',
    visibilityStatus='SAVED'|'PUBLISHED'
)
type aiAgentId:

string

param aiAgentId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Agent.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 configuration:

dict

param configuration:

The configuration of the Amazon Q in Connect AI Agent.

  • answerRecommendationAIAgentConfiguration (dict) --

    The configuration for AI Agents of type ANSWER_RECOMMENDATION.

    • answerGenerationAIGuardrailId (string) --

      The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

    • answerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

    • intentLabelingGenerationAIPromptId (string) --

      The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

    • queryReformulationAIPromptId (string) --

      The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

  • manualSearchAIAgentConfiguration (dict) --

    The configuration for AI Agents of type MANUAL_SEARCH.

    • answerGenerationAIGuardrailId (string) --

      The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

    • answerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

  • selfServiceAIAgentConfiguration (dict) --

    The configuration for AI Agents of type SELF_SERVICE.

    • associationConfigurations (list) --

      The association configurations for overriding behavior on this AI Agent.

      • (dict) --

        The configuration for an Amazon Q in Connect Assistant Association.

        • associationConfigurationData (dict) --

          The data of the configuration for an Amazon Q in Connect Assistant Association.

          • knowledgeBaseAssociationConfigurationData (dict) --

            The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

            • contentTagFilter (dict) --

              An object that can be used to specify Tag conditions.

              • andConditions (list) --

                A list of conditions which would be applied together with an AND condition.

                • (dict) --

                  A leaf node condition which can be used to specify a tag condition.

                  • key (string) -- [REQUIRED]

                    The tag key in the tag condition.

                  • value (string) --

                    The tag value in the tag condition.

              • orConditions (list) --

                A list of conditions which would be applied together with an OR condition.

                • (dict) --

                  A list of conditions which would be applied together with an OR condition.

                  • andConditions (list) --

                    A list of conditions which would be applied together with an AND condition.

                    • (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) -- [REQUIRED]

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • tagCondition (dict) --

                    A leaf node condition which can be used to specify a tag condition.

                    • key (string) -- [REQUIRED]

                      The tag key in the tag condition.

                    • value (string) --

                      The tag value in the tag condition.

              • tagCondition (dict) --

                A leaf node condition which can be used to specify a tag condition.

                • key (string) -- [REQUIRED]

                  The tag key in the tag condition.

                • value (string) --

                  The tag value in the tag condition.

            • maxResults (integer) --

              The maximum number of results to return per page.

            • overrideKnowledgeBaseSearchType (string) --

              The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

        • associationId (string) --

          The identifier of the association for this Association Configuration.

        • associationType (string) --

          The type of the association for this Association Configuration.

    • selfServiceAIGuardrailId (string) --

      The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

    • selfServiceAnswerGenerationAIPromptId (string) --

      The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

    • selfServicePreProcessingAIPromptId (string) --

      The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

type description:

string

param description:

The description of the Amazon Q in Connect AI Agent.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visbility status of the Amazon Q in Connect AI Agent.

rtype:

dict

returns:

Response Syntax

{
    'aiAgent': {
        'aiAgentArn': 'string',
        'aiAgentId': 'string',
        'assistantArn': 'string',
        'assistantId': 'string',
        'configuration': {
            'answerRecommendationAIAgentConfiguration': {
                'answerGenerationAIGuardrailId': 'string',
                'answerGenerationAIPromptId': 'string',
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ],
                'intentLabelingGenerationAIPromptId': 'string',
                'queryReformulationAIPromptId': 'string'
            },
            'manualSearchAIAgentConfiguration': {
                'answerGenerationAIGuardrailId': 'string',
                'answerGenerationAIPromptId': 'string',
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ]
            },
            'selfServiceAIAgentConfiguration': {
                'associationConfigurations': [
                    {
                        'associationConfigurationData': {
                            'knowledgeBaseAssociationConfigurationData': {
                                'contentTagFilter': {
                                    'andConditions': [
                                        {
                                            'key': 'string',
                                            'value': 'string'
                                        },
                                    ],
                                    'orConditions': [
                                        {
                                            'andConditions': [
                                                {
                                                    'key': 'string',
                                                    'value': 'string'
                                                },
                                            ],
                                            'tagCondition': {
                                                'key': 'string',
                                                'value': 'string'
                                            }
                                        },
                                    ],
                                    'tagCondition': {
                                        'key': 'string',
                                        'value': 'string'
                                    }
                                },
                                'maxResults': 123,
                                'overrideKnowledgeBaseSearchType': 'HYBRID'|'SEMANTIC'
                            }
                        },
                        'associationId': 'string',
                        'associationType': 'KNOWLEDGE_BASE'
                    },
                ],
                'selfServiceAIGuardrailId': 'string',
                'selfServiceAnswerGenerationAIPromptId': 'string',
                'selfServicePreProcessingAIPromptId': 'string'
            }
        },
        'description': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'type': 'MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
        'visibilityStatus': 'SAVED'|'PUBLISHED'
    }
}

Response Structure

  • (dict) --

    • aiAgent (dict) --

      The data of the updated Amazon Q in Connect AI Agent.

      • aiAgentArn (string) --

        The Amazon Resource Name (ARN) of the AI agent.

      • aiAgentId (string) --

        The identifier of the AI Agent.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • configuration (dict) --

        Configuration for the AI Agent.

        • answerRecommendationAIAgentConfiguration (dict) --

          The configuration for AI Agents of type ANSWER_RECOMMENDATION.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation Guardrail used by the ANSWER_RECOMMENDATION AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

          • intentLabelingGenerationAIPromptId (string) --

            The AI Prompt identifier for the Intent Labeling prompt used by the ANSWER_RECOMMENDATION AI Agent.

          • queryReformulationAIPromptId (string) --

            The AI Prompt identifier for the Query Reformulation prompt used by the ANSWER_RECOMMENDATION AI Agent.

        • manualSearchAIAgentConfiguration (dict) --

          The configuration for AI Agents of type MANUAL_SEARCH.

          • answerGenerationAIGuardrailId (string) --

            The AI Guardrail identifier for the Answer Generation guardrail used by the MANUAL_SEARCH AI Agent.

          • answerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Answer Generation prompt used by the MANUAL_SEARCH AI Agent.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

        • selfServiceAIAgentConfiguration (dict) --

          The configuration for AI Agents of type SELF_SERVICE.

          • associationConfigurations (list) --

            The association configurations for overriding behavior on this AI Agent.

            • (dict) --

              The configuration for an Amazon Q in Connect Assistant Association.

              • associationConfigurationData (dict) --

                The data of the configuration for an Amazon Q in Connect Assistant Association.

                • knowledgeBaseAssociationConfigurationData (dict) --

                  The data of the configuration for a KNOWLEDGE_BASE type Amazon Q in Connect Assistant Association.

                  • contentTagFilter (dict) --

                    An object that can be used to specify Tag conditions.

                    • andConditions (list) --

                      A list of conditions which would be applied together with an AND condition.

                      • (dict) --

                        A leaf node condition which can be used to specify a tag condition.

                        • key (string) --

                          The tag key in the tag condition.

                        • value (string) --

                          The tag value in the tag condition.

                    • orConditions (list) --

                      A list of conditions which would be applied together with an OR condition.

                      • (dict) --

                        A list of conditions which would be applied together with an OR condition.

                        • andConditions (list) --

                          A list of conditions which would be applied together with an AND condition.

                          • (dict) --

                            A leaf node condition which can be used to specify a tag condition.

                            • key (string) --

                              The tag key in the tag condition.

                            • value (string) --

                              The tag value in the tag condition.

                        • tagCondition (dict) --

                          A leaf node condition which can be used to specify a tag condition.

                          • key (string) --

                            The tag key in the tag condition.

                          • value (string) --

                            The tag value in the tag condition.

                    • tagCondition (dict) --

                      A leaf node condition which can be used to specify a tag condition.

                      • key (string) --

                        The tag key in the tag condition.

                      • value (string) --

                        The tag value in the tag condition.

                  • maxResults (integer) --

                    The maximum number of results to return per page.

                  • overrideKnowledgeBaseSearchType (string) --

                    The search type to be used against the Knowledge Base for this request. The values can be SEMANTIC which uses vector embeddings or HYBRID which use vector embeddings and raw text

              • associationId (string) --

                The identifier of the association for this Association Configuration.

              • associationType (string) --

                The type of the association for this Association Configuration.

          • selfServiceAIGuardrailId (string) --

            The AI Guardrail identifier used by the SELF_SERVICE AI Agent.

          • selfServiceAnswerGenerationAIPromptId (string) --

            The AI Prompt identifier for the Self Service Answer Generation prompt used by the SELF_SERVICE AI Agent

          • selfServicePreProcessingAIPromptId (string) --

            The AI Prompt identifier for the Self Service Pre-Processing prompt used by the SELF_SERVICE AI Agent

      • description (string) --

        The description of the AI Agent.

      • modifiedTime (datetime) --

        The time the AI Agent was last modified.

      • name (string) --

        The name of the AI Agent.

      • origin (string) --

        Specifies the origin of the AI Agent. SYSTEM for a default AI Agent created by Q in Connect or CUSTOMER for an AI Agent created by calling AI Agent creation APIs.

      • status (string) --

        The status of the AI Agent.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • type (string) --

        The type of the AI Agent.

      • visibilityStatus (string) --

        The visibility status of the AI Agent.

UpdateAIPrompt (updated) Link ¶
Changes (response)
{'aiPrompt': {'type': {'SELF_SERVICE_ANSWER_GENERATION',
                       'SELF_SERVICE_PRE_PROCESSING'}}}

Updates an AI Prompt.

See also: AWS API Documentation

Request Syntax

client.update_ai_prompt(
    aiPromptId='string',
    assistantId='string',
    clientToken='string',
    description='string',
    templateConfiguration={
        'textFullAIPromptEditTemplateConfiguration': {
            'text': 'string'
        }
    },
    visibilityStatus='SAVED'|'PUBLISHED'
)
type aiPromptId:

string

param aiPromptId:

[REQUIRED]

The identifier of the Amazon Q in Connect AI Prompt.

type assistantId:

string

param assistantId:

[REQUIRED]

The identifier of the Amazon Q in Connect 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 of the Amazon Q in Connect AI Prompt.

type templateConfiguration:

dict

param templateConfiguration:

The configuration of the prompt template for this AI Prompt.

  • textFullAIPromptEditTemplateConfiguration (dict) --

    The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

    • text (string) -- [REQUIRED]

      The YAML text for the AI Prompt template.

type visibilityStatus:

string

param visibilityStatus:

[REQUIRED]

The visibility status of the Amazon Q in Connect AI prompt.

rtype:

dict

returns:

Response Syntax

{
    'aiPrompt': {
        'aiPromptArn': 'string',
        'aiPromptId': 'string',
        'apiFormat': 'ANTHROPIC_CLAUDE_MESSAGES'|'ANTHROPIC_CLAUDE_TEXT_COMPLETIONS',
        'assistantArn': 'string',
        'assistantId': 'string',
        'description': 'string',
        'modelId': 'string',
        'modifiedTime': datetime(2015, 1, 1),
        'name': 'string',
        'origin': 'SYSTEM'|'CUSTOMER',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETED',
        'tags': {
            'string': 'string'
        },
        'templateConfiguration': {
            'textFullAIPromptEditTemplateConfiguration': {
                'text': 'string'
            }
        },
        'templateType': 'TEXT',
        'type': 'ANSWER_GENERATION'|'INTENT_LABELING_GENERATION'|'QUERY_REFORMULATION'|'SELF_SERVICE_PRE_PROCESSING'|'SELF_SERVICE_ANSWER_GENERATION',
        'visibilityStatus': 'SAVED'|'PUBLISHED'
    }
}

Response Structure

  • (dict) --

    • aiPrompt (dict) --

      The data of the updated Amazon Q in Connect AI Prompt.

      • aiPromptArn (string) --

        The Amazon Resource Name (ARN) of the AI Prompt.

      • aiPromptId (string) --

        The identifier of the Amazon Q in Connect AI prompt.

      • apiFormat (string) --

        The API format used for this AI Prompt.

      • assistantArn (string) --

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

      • assistantId (string) --

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

      • description (string) --

        The description of the AI Prompt.

      • modelId (string) --

        The identifier of the model used for this AI Prompt. Model Ids supported are: CLAUDE_3_HAIKU_20240307_V1.

      • modifiedTime (datetime) --

        The time the AI Prompt was last modified.

      • name (string) --

        The name of the AI Prompt

      • origin (string) --

        The origin of the AI Prompt. SYSTEM for a default AI Prompt created by Q in Connect or CUSTOMER for an AI Prompt created by calling AI Prompt creation APIs.

      • status (string) --

        The status of the AI Prompt.

      • tags (dict) --

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

        • (string) --

          • (string) --

      • templateConfiguration (dict) --

        The configuration of the prompt template for this AI Prompt.

        • textFullAIPromptEditTemplateConfiguration (dict) --

          The configuration for a prompt template that supports full textual prompt configuration using a YAML prompt.

          • text (string) --

            The YAML text for the AI Prompt template.

      • templateType (string) --

        The type of the prompt template for this AI Prompt.

      • type (string) --

        The type of this AI Prompt.

      • visibilityStatus (string) --

        The visibility status of the AI Prompt.

UpdateAssistantAIAgent (updated) Link ¶
Changes (request)
{'aiAgentType': {'SELF_SERVICE'}}

Updates the AI Agent that is set for use by defafult on an Amazon Q in Connect Assistant.

See also: AWS API Documentation

Request Syntax

client.update_assistant_ai_agent(
    aiAgentType='MANUAL_SEARCH'|'ANSWER_RECOMMENDATION'|'SELF_SERVICE',
    assistantId='string',
    configuration={
        'aiAgentId': 'string'
    }
)
type aiAgentType:

string

param aiAgentType:

[REQUIRED]

The type of the AI Agent being updated for use by default on the Amazon Q in Connect Assistant.

type assistantId:

string

param assistantId:

[REQUIRED]

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

type configuration:

dict

param configuration:

[REQUIRED]

The configuration of the AI Agent being updated for use by default on the Amazon Q in Connect Assistant.

  • aiAgentId (string) -- [REQUIRED]

    The ID of the AI Agent to be configured.

rtype:

dict

returns:

Response Syntax

{
    'assistant': {
        'aiAgentConfiguration': {
            'string': {
                'aiAgentId': 'string'
            }
        },
        '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) --

      The assistant data.

      • aiAgentConfiguration (dict) --

        The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that is set on the Amazon Q in Connect Assistant.

        • (string) --

          • (dict) --

            A type that specifies the AI Agent ID configuration data when mapping an AI Agents to be used for an AI Agent type on a session or assistant.

            • aiAgentId (string) --

              The ID of the AI Agent to be configured.

      • assistantArn (string) --

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

      • assistantId (string) --

        The identifier of the Amazon Q in Connect assistant.

      • capabilityConfiguration (dict) --

        The configuration information for the Amazon Q in Connect assistant capability.

        • type (string) --

          The type of Amazon Q in Connect assistant capability.

      • description (string) --

        The description.

      • integrationConfiguration (dict) --

        The configuration information for the Amazon Q in Connect 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 in Connect. To use Amazon Q in Connect 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 in Connect, 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.