Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: CC-BY-SA-4.0

ListTrainingJobs

Lists training jobs.

{
   "[CreationTimeAfter](#SageMaker-ListTrainingJobs-request-CreationTimeAfter)": number,
   "[CreationTimeBefore](#SageMaker-ListTrainingJobs-request-CreationTimeBefore)": number,
   "[LastModifiedTimeAfter](#SageMaker-ListTrainingJobs-request-LastModifiedTimeAfter)": number,
   "[LastModifiedTimeBefore](#SageMaker-ListTrainingJobs-request-LastModifiedTimeBefore)": number,
   "[MaxResults](#SageMaker-ListTrainingJobs-request-MaxResults)": number,
   "[NameContains](#SageMaker-ListTrainingJobs-request-NameContains)": "string",
   "[NextToken](#SageMaker-ListTrainingJobs-request-NextToken)": "string",
   "[SortBy](#SageMaker-ListTrainingJobs-request-SortBy)": "string",
   "[SortOrder](#SageMaker-ListTrainingJobs-request-SortOrder)": "string",
   "[StatusEquals](#SageMaker-ListTrainingJobs-request-StatusEquals)": "string"
}

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

** CreationTimeAfter ** A filter that returns only training jobs created after the specified time (timestamp).
Type: Timestamp
Required: No

** CreationTimeBefore ** A filter that returns only training jobs created before the specified time (timestamp).
Type: Timestamp
Required: No

** LastModifiedTimeAfter ** A filter that returns only training jobs modified after the specified time (timestamp).
Type: Timestamp
Required: No

** LastModifiedTimeBefore ** A filter that returns only training jobs modified before the specified time (timestamp).
Type: Timestamp
Required: No

** MaxResults ** The maximum number of training jobs to return in the response.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 100.
Required: No

** NameContains ** A string in the training job name. This filter returns only training jobs whose name contains the specified string.
Type: String
Length Constraints: Maximum length of 63.
Pattern: [a-zA-Z0-9\-]+
Required: No

** NextToken ** If the result of the previous ListTrainingJobs request was truncated, the response includes a NextToken. To retrieve the next set of training jobs, use the token in the next request.
Type: String
Length Constraints: Maximum length of 8192.
Pattern: .*
Required: No

** SortBy ** The field to sort results by. The default is CreationTime.
Type: String
Valid Values:Name | CreationTime | Status
Required: No

** SortOrder ** The sort order for results. The default is Ascending.
Type: String
Valid Values:Ascending | Descending
Required: No

** StatusEquals ** A filter that retrieves only training jobs with a specific status.
Type: String
Valid Values:InProgress | Completed | Failed | Stopping | Stopped
Required: No

{
   "[NextToken](#SageMaker-ListTrainingJobs-response-NextToken)": "string",
   "[TrainingJobSummaries](#SageMaker-ListTrainingJobs-response-TrainingJobSummaries)": [ 
      { 
         "[CreationTime](API_TrainingJobSummary.md#SageMaker-Type-TrainingJobSummary-CreationTime)": number,
         "[LastModifiedTime](API_TrainingJobSummary.md#SageMaker-Type-TrainingJobSummary-LastModifiedTime)": number,
         "[TrainingEndTime](API_TrainingJobSummary.md#SageMaker-Type-TrainingJobSummary-TrainingEndTime)": number,
         "[TrainingJobArn](API_TrainingJobSummary.md#SageMaker-Type-TrainingJobSummary-TrainingJobArn)": "string",
         "[TrainingJobName](API_TrainingJobSummary.md#SageMaker-Type-TrainingJobSummary-TrainingJobName)": "string",
         "[TrainingJobStatus](API_TrainingJobSummary.md#SageMaker-Type-TrainingJobSummary-TrainingJobStatus)": "string"
      }
   ]
}

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

** NextToken ** If the response is truncated, Amazon SageMaker returns this token. To retrieve the next set of training jobs, use it in the subsequent request.
Type: String
Length Constraints: Maximum length of 8192.
Pattern: .*

** TrainingJobSummaries ** An array of TrainingJobSummary objects, each listing a training job.
Type: Array of TrainingJobSummary objects

For information about the errors that are common to all actions, see Common Errors.

For more information about using this API in one of the language-specific AWS SDKs, see the following: + AWS Command Line Interface + AWS SDK for .NET + AWS SDK for C++ + AWS SDK for Go + AWS SDK for Go - Pilot + AWS SDK for Java + AWS SDK for JavaScript + AWS SDK for PHP V3 + AWS SDK for Python + AWS SDK for Ruby V2