Amazon Connect Service

2026/01/23 - Amazon Connect Service - 11 new api methods

Changes  Amazon Connect now offers public APIs to programmatically configure and run automated tests for contact center experiences. Integrate testing into CICD pipelines, run multiple tests at scale, and retrieve results via API to automate validation of voice interactions and workflows.

StartTestCaseExecution (new) Link ¶

Starts executing a published test case.

See also: AWS API Documentation

Request Syntax

client.start_test_case_execution(
    InstanceId='string',
    TestCaseId='string',
    ClientToken='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case to execute.

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.

rtype:

dict

returns:

Response Syntax

{
    'TestCaseExecutionId': 'string',
    'TestCaseId': 'string',
    'Status': 'INITIATED'|'PASSED'|'FAILED'|'IN_PROGRESS'|'STOPPED'
}

Response Structure

  • (dict) --

    • TestCaseExecutionId (string) --

      The identifier of the test case execution.

    • TestCaseId (string) --

      The identifier of the test case resource that was executed.

    • Status (string) --

      The status of a test case execution.

DeleteTestCase (new) Link ¶

Deletes the test case that has already been created for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.delete_test_case(
    InstanceId='string',
    TestCaseId='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetTestCaseExecutionSummary (new) Link ¶

Retrieves an overview of a test execution that includes the status of the execution, start and end time, and observation summary.

See also: AWS API Documentation

Request Syntax

client.get_test_case_execution_summary(
    InstanceId='string',
    TestCaseId='string',
    TestCaseExecutionId='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case.

type TestCaseExecutionId:

string

param TestCaseExecutionId:

[REQUIRED]

The identifier of the test case execution.

rtype:

dict

returns:

Response Syntax

{
    'StartTime': datetime(2015, 1, 1),
    'EndTime': datetime(2015, 1, 1),
    'Status': 'INITIATED'|'PASSED'|'FAILED'|'IN_PROGRESS'|'STOPPED',
    'ObservationSummary': {
        'TotalObservations': 123,
        'ObservationsPassed': 123,
        'ObservationsFailed': 123
    }
}

Response Structure

  • (dict) --

    • StartTime (datetime) --

      The timestamp when the test case execution started.

    • EndTime (datetime) --

      The timestamp when the test case execution ended.

    • Status (string) --

      The status of the test case execution.

    • ObservationSummary (dict) --

      Summary statistics for the test case execution.

      • TotalObservations (integer) --

        The total number of observations in the test case.

      • ObservationsPassed (integer) --

        The number of observations that passed during execution.

      • ObservationsFailed (integer) --

        The number of observations that failed during execution.

ListTestCaseExecutionRecords (new) Link ¶

Lists detailed steps of test case execution that includes all observations along with actions taken and data associated in the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.list_test_case_execution_records(
    InstanceId='string',
    TestCaseId='string',
    TestCaseExecutionId='string',
    Status='INITIATED'|'PASSED'|'FAILED'|'IN_PROGRESS'|'STOPPED',
    NextToken='string',
    MaxResults=123
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case.

type TestCaseExecutionId:

string

param TestCaseExecutionId:

[REQUIRED]

The identifier of the test case execution.

type Status:

string

param Status:

Filter execution records by status.

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

integer

param MaxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'ExecutionRecords': [
        {
            'ObservationId': 'string',
            'Status': 'PASSED'|'FAILED'|'IN_PROGRESS'|'STOPPED',
            'Timestamp': datetime(2015, 1, 1),
            'Record': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ExecutionRecords (list) --

      An array of test case execution record objects.

      • (dict) --

        Contains information about a test case execution record.

        • ObservationId (string) --

          The identifier of the execution record.

        • Status (string) --

          The status of the action execution.

        • Timestamp (datetime) --

          The timestamp when the action was executed.

        • Record (string) --

          The details of the executed record.

    • NextToken (string) --

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

UpdateTestCase (new) Link ¶

Updates any of the metadata for a test case, such as the name, description, and status or content of an existing test case. This API doesn't allow customers to update the tags of the test case resource for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.update_test_case(
    InstanceId='string',
    TestCaseId='string',
    Content='string',
    EntryPoint={
        'Type': 'VOICE_CALL',
        'VoiceCallEntryPointParameters': {
            'SourcePhoneNumber': 'string',
            'DestinationPhoneNumber': 'string',
            'FlowId': 'string'
        }
    },
    InitializationData='string',
    Name='string',
    Description='string',
    Status='PUBLISHED'|'SAVED',
    LastModifiedTime=datetime(2015, 1, 1),
    LastModifiedRegion='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case to update.

type Content:

string

param Content:

The JSON string that represents the content of the test.

type EntryPoint:

dict

param EntryPoint:

Defines the starting point for your test.

  • Type (string) --

    The type of entry point.

  • VoiceCallEntryPointParameters (dict) --

    Parameters for voice call entry point.

    • SourcePhoneNumber (string) --

      The source phone number for the test.

    • DestinationPhoneNumber (string) --

      The destination phone number for the test.

    • FlowId (string) --

      The flow identifier for the test.

type InitializationData:

string

param InitializationData:

Defines the test attributes for precise data representation.

type Name:

string

param Name:

The name of the test case.

type Description:

string

param Description:

The description of the test case.

type Status:

string

param Status:

Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.

type LastModifiedTime:

datetime

param LastModifiedTime:

The time at which the resource was last modified.

type LastModifiedRegion:

string

param LastModifiedRegion:

The region in which the resource was last modified

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DescribeTestCase (new) Link ¶

Describes the specified test case and allows you to get the content and metadata of the test case for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.describe_test_case(
    InstanceId='string',
    TestCaseId='string',
    Status='PUBLISHED'|'SAVED'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case.

type Status:

string

param Status:

The status of the test case version to retrieve. If not specified, returns the published version if available, otherwise returns the saved version.

rtype:

dict

returns:

Response Syntax

{
    'TestCase': {
        'Arn': 'string',
        'Id': 'string',
        'Name': 'string',
        'Content': 'string',
        'EntryPoint': {
            'Type': 'VOICE_CALL',
            'VoiceCallEntryPointParameters': {
                'SourcePhoneNumber': 'string',
                'DestinationPhoneNumber': 'string',
                'FlowId': 'string'
            }
        },
        'InitializationData': 'string',
        'Description': 'string',
        'Status': 'PUBLISHED'|'SAVED',
        'LastModifiedTime': datetime(2015, 1, 1),
        'LastModifiedRegion': 'string',
        'Tags': {
            'string': 'string'
        },
        'TestCaseSha256': 'string'
    }
}

Response Structure

  • (dict) --

    • TestCase (dict) --

      The test case object containing all test case information.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the test case.

      • Id (string) --

        The identifier of the test case.

      • Name (string) --

        The name of the test case.

      • Content (string) --

        The JSON string that represents the content of the test.

      • EntryPoint (dict) --

        Defines the starting point for the test, including channel type and parameters.

        • Type (string) --

          The type of entry point.

        • VoiceCallEntryPointParameters (dict) --

          Parameters for voice call entry point.

          • SourcePhoneNumber (string) --

            The source phone number for the test.

          • DestinationPhoneNumber (string) --

            The destination phone number for the test.

          • FlowId (string) --

            The flow identifier for the test.

      • InitializationData (string) --

        Defines the test attributes for precise data representation.

      • Description (string) --

        The description of the test case.

      • Status (string) --

        Indicates the test status as either SAVED or PUBLISHED.

      • LastModifiedTime (datetime) --

        The time at which the test case was last modified.

      • LastModifiedRegion (string) --

        The region in which the test case was last modified.

      • Tags (dict) --

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

        • (string) --

          • (string) --

      • TestCaseSha256 (string) --

        The SHA256 hash of the test case content.

ListTestCaseExecutions (new) Link ¶

Lists all test case executions and allows filtering by test case id, test case name, start time, end time or status of the execution for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.list_test_case_executions(
    InstanceId='string',
    TestCaseId='string',
    TestCaseName='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    Status='INITIATED'|'PASSED'|'FAILED'|'IN_PROGRESS'|'STOPPED',
    NextToken='string',
    MaxResults=123
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseId:

string

param TestCaseId:

Filter executions by test case identifier.

type TestCaseName:

string

param TestCaseName:

Filter executions by test case name.

type StartTime:

datetime

param StartTime:

Filter executions that started after this time.

type EndTime:

datetime

param EndTime:

Filter executions that started before this time.

type Status:

string

param Status:

Filter executions by status.

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

integer

param MaxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'TestCaseExecutions': [
        {
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'TestCaseExecutionId': 'string',
            'TestCaseId': 'string',
            'TestCaseExecutionStatus': 'INITIATED'|'PASSED'|'FAILED'|'IN_PROGRESS'|'STOPPED',
            'Tags': {
                'string': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TestCaseExecutions (list) --

      An array of test case execution summary objects.

      • (dict) --

        Contains information about a test case execution.

        • StartTime (datetime) --

          The timestamp when the test case execution started.

        • EndTime (datetime) --

          The timestamp when the test case execution ended.

        • TestCaseExecutionId (string) --

          The identifier of the test case execution.

        • TestCaseId (string) --

          The identifier of the test case.

        • TestCaseExecutionStatus (string) --

          The status of the test case execution.

        • Tags (dict) --

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

          • (string) --

            • (string) --

    • NextToken (string) --

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

ListTestCases (new) Link ¶

Lists the test cases present in the specific Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.list_test_cases(
    InstanceId='string',
    NextToken='string',
    MaxResults=123
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

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

integer

param MaxResults:

The maximum number of results to return per page.

rtype:

dict

returns:

Response Syntax

{
    'TestCaseSummaryList': [
        {
            'Id': 'string',
            'Arn': 'string',
            'Name': 'string',
            'Status': 'PUBLISHED'|'SAVED',
            'LastModifiedTime': datetime(2015, 1, 1),
            'LastModifiedRegion': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TestCaseSummaryList (list) --

      Information about the tests.

      • (dict) --

        Contains summary information about a test case.

        • Id (string) --

          The identifier of the test case.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the test case.

        • Name (string) --

          The name of the test case.

        • Status (string) --

          The status of the test case.

        • LastModifiedTime (datetime) --

          The time at which the test case was last modified.

        • LastModifiedRegion (string) --

          The region in which the test case was last modified.

    • NextToken (string) --

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

CreateTestCase (new) Link ¶

Creates a test case with its content and metadata for the specified Amazon Connect instance.

See also: AWS API Documentation

Request Syntax

client.create_test_case(
    InstanceId='string',
    Name='string',
    Description='string',
    Content='string',
    EntryPoint={
        'Type': 'VOICE_CALL',
        'VoiceCallEntryPointParameters': {
            'SourcePhoneNumber': 'string',
            'DestinationPhoneNumber': 'string',
            'FlowId': 'string'
        }
    },
    InitializationData='string',
    Status='PUBLISHED'|'SAVED',
    TestCaseId='string',
    Tags={
        'string': 'string'
    },
    LastModifiedTime=datetime(2015, 1, 1),
    LastModifiedRegion='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type Name:

string

param Name:

[REQUIRED]

The name of the test.

type Description:

string

param Description:

The description of the test.

type Content:

string

param Content:

[REQUIRED]

The JSON string that represents the content of the test.

type EntryPoint:

dict

param EntryPoint:

Defines the starting point for your test.

  • Type (string) --

    The type of entry point.

  • VoiceCallEntryPointParameters (dict) --

    Parameters for voice call entry point.

    • SourcePhoneNumber (string) --

      The source phone number for the test.

    • DestinationPhoneNumber (string) --

      The destination phone number for the test.

    • FlowId (string) --

      The flow identifier for the test.

type InitializationData:

string

param InitializationData:

Defines the initial custom attributes for your test.

type Status:

string

param Status:

Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content.

type TestCaseId:

string

param TestCaseId:

Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency

type Tags:

dict

param Tags:

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

  • (string) --

    • (string) --

type LastModifiedTime:

datetime

param LastModifiedTime:

The time at which the resource was last modified.

type LastModifiedRegion:

string

param LastModifiedRegion:

The region in which the resource was last modified

rtype:

dict

returns:

Response Syntax

{
    'TestCaseId': 'string',
    'TestCaseArn': 'string'
}

Response Structure

  • (dict) --

    • TestCaseId (string) --

      The identifier of the test.

    • TestCaseArn (string) --

      The Amazon Resource Name (ARN) of the test.

SearchTestCases (new) Link ¶

Searches for test cases in the specified Amazon Connect instance, with optional filtering.

See also: AWS API Documentation

Request Syntax

client.search_test_cases(
    InstanceId='string',
    NextToken='string',
    MaxResults=123,
    SearchFilter={
        'TagFilter': {
            'OrConditions': [
                [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ],
            ],
            'AndConditions': [
                {
                    'TagKey': 'string',
                    'TagValue': 'string'
                },
            ],
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            }
        }
    },
    SearchCriteria={
        'OrConditions': [
            {'... recursive ...'},
        ],
        'AndConditions': [
            {'... recursive ...'},
        ],
        'StringCondition': {
            'FieldName': 'string',
            'Value': 'string',
            'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        },
        'StatusCondition': 'PUBLISHED'|'SAVED'
    }
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

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

integer

param MaxResults:

The maximum number of results to return per page.

type SearchFilter:

dict

param SearchFilter:

Filters to be applied to search results.

  • TagFilter (dict) --

    An object that can be used to specify Tag conditions inside the SearchFilter. This accepts an OR of AND (List of List) input where: Top level list specifies conditions that need to be applied with OR operator. Inner list specifies conditions that need to be applied with AND operator.

    • OrConditions (list) --

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

      • (list) --

        • (dict) --

          A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

          • TagKey (string) --

            The tag key in the tag condition.

          • TagValue (string) --

            The tag value in the tag 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, for example, HAVE BPO = 123.

        • TagKey (string) --

          The tag key in the tag condition.

        • TagValue (string) --

          The tag value in the tag condition.

    • TagCondition (dict) --

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

      • TagKey (string) --

        The tag key in the tag condition.

      • TagValue (string) --

        The tag value in the tag condition.

type SearchCriteria:

dict

param SearchCriteria:

The search criteria to be used to return test cases.

  • OrConditions (list) --

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

    • (dict) --

      The search criteria to be used to return test cases.

  • AndConditions (list) --

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

    • (dict) --

      The search criteria to be used to return test cases.

  • StringCondition (dict) --

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

    • FieldName (string) --

      The name of the field in the string condition.

    • Value (string) --

      The value of the string.

    • ComparisonType (string) --

      The type of comparison to be made when evaluating the string condition.

  • StatusCondition (string) --

    The status of the test case.

rtype:

dict

returns:

Response Syntax

{
    'TestCases': [
        {
            'Arn': 'string',
            'Id': 'string',
            'Name': 'string',
            'Content': 'string',
            'EntryPoint': {
                'Type': 'VOICE_CALL',
                'VoiceCallEntryPointParameters': {
                    'SourcePhoneNumber': 'string',
                    'DestinationPhoneNumber': 'string',
                    'FlowId': 'string'
                }
            },
            'InitializationData': 'string',
            'Description': 'string',
            'Status': 'PUBLISHED'|'SAVED',
            'LastModifiedTime': datetime(2015, 1, 1),
            'LastModifiedRegion': 'string',
            'Tags': {
                'string': 'string'
            },
            'TestCaseSha256': 'string'
        },
    ],
    'NextToken': 'string',
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) --

    • TestCases (list) --

      Information about the test cases.

      • (dict) --

        Contains information about a test case.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the test case.

        • Id (string) --

          The identifier of the test case.

        • Name (string) --

          The name of the test case.

        • Content (string) --

          The JSON string that represents the content of the test.

        • EntryPoint (dict) --

          Defines the starting point for the test, including channel type and parameters.

          • Type (string) --

            The type of entry point.

          • VoiceCallEntryPointParameters (dict) --

            Parameters for voice call entry point.

            • SourcePhoneNumber (string) --

              The source phone number for the test.

            • DestinationPhoneNumber (string) --

              The destination phone number for the test.

            • FlowId (string) --

              The flow identifier for the test.

        • InitializationData (string) --

          Defines the test attributes for precise data representation.

        • Description (string) --

          The description of the test case.

        • Status (string) --

          Indicates the test status as either SAVED or PUBLISHED.

        • LastModifiedTime (datetime) --

          The time at which the test case was last modified.

        • LastModifiedRegion (string) --

          The region in which the test case was last modified.

        • Tags (dict) --

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

          • (string) --

            • (string) --

        • TestCaseSha256 (string) --

          The SHA256 hash of the test case content.

    • NextToken (string) --

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

    • ApproximateTotalCount (integer) --

      The total number of test cases which matched your search query.

StopTestCaseExecution (new) Link ¶

Stops a running test execution.

See also: AWS API Documentation

Request Syntax

client.stop_test_case_execution(
    InstanceId='string',
    TestCaseExecutionId='string',
    TestCaseId='string',
    ClientToken='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Amazon Connect instance.

type TestCaseExecutionId:

string

param TestCaseExecutionId:

[REQUIRED]

The identifier of the test case execution to stop.

type TestCaseId:

string

param TestCaseId:

[REQUIRED]

The identifier of the test case.

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.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --