LexModelsV2 / Client / list_test_sets



The list of the test sets

See also: AWS API Documentation

Request Syntax

response = client.list_test_sets(
        'attribute': 'TestSetName'|'LastUpdatedDateTime',
        'order': 'Ascending'|'Descending'
  • sortBy (dict) –

    The sort order for the list of test sets.

    • attribute (string) – [REQUIRED]

      Specifies whether to sort the test sets by name or by the time they were last updated.

    • order (string) – [REQUIRED]

      Specifies whether to sort in ascending or descending order.

  • maxResults (integer) – The maximum number of test sets to return in each page. If there are fewer results than the max page size, only the actual number of results are returned.

  • nextToken (string) – If the response from the ListTestSets operation contains more results than specified in the maxResults parameter, a token is returned in the response. Use that token in the nextToken parameter to return the next page of results.

Return type:



Response Syntax

    'testSets': [
            'testSetId': 'string',
            'testSetName': 'string',
            'description': 'string',
            'modality': 'Text'|'Audio',
            'status': 'Importing'|'PendingAnnotation'|'Deleting'|'ValidationError'|'Ready',
            'roleArn': 'string',
            'numTurns': 123,
            'storageLocation': {
                's3BucketName': 'string',
                's3Path': 'string',
                'kmsKeyArn': 'string'
            'creationDateTime': datetime(2015, 1, 1),
            'lastUpdatedDateTime': datetime(2015, 1, 1)
    'nextToken': 'string'

Response Structure

  • (dict) –

    • testSets (list) –

      The selected test sets in a list of test sets.

      • (dict) –

        Contains summary information about the test set.

        • testSetId (string) –

          The unique identifier of the test set.

        • testSetName (string) –

          The name of the test set.

        • description (string) –

          The description of the test set.

        • modality (string) –

          Specifies whether the test set contains written or spoken data.

        • status (string) –

          The status of the test set.

        • roleArn (string) –

          The Amazon Resource Name (ARN) of an IAM role that has permission to access the test set.

        • numTurns (integer) –

          The number of turns in the test set.

        • storageLocation (dict) –

          Contains information about the location at which the test set is stored.

          • s3BucketName (string) –

            The name of the Amazon S3 bucket in which the test set is stored.

          • s3Path (string) –

            The path inside the Amazon S3 bucket where the test set is stored.

          • kmsKeyArn (string) –

            The Amazon Resource Name (ARN) of an Amazon Web Services Key Management Service (KMS) key for encrypting the test set.

        • creationDateTime (datetime) –

          The date and time at which the test set was created.

        • lastUpdatedDateTime (datetime) –

          The date and time at which the test set was last updated.

    • nextToken (string) –

      A token that indicates whether there are more results to return in a response to the ListTestSets operation. If the nextToken field is present, you send the contents as the nextToken parameter of a ListTestSets operation request to get the next page of results.


  • LexModelsV2.Client.exceptions.ThrottlingException

  • LexModelsV2.Client.exceptions.ServiceQuotaExceededException

  • LexModelsV2.Client.exceptions.ValidationException

  • LexModelsV2.Client.exceptions.InternalServerException