SageMaker / Client / list_jobs

list_jobs

SageMaker.Client.list_jobs(**kwargs)

Lists jobs in a specified category. You can filter results by creation time, last modified time, name, and status. Results are sorted by the field you specify in SortBy. Use pagination to retrieve large result sets efficiently.

The following operations are related to ListJobs:

  • CreateJob

  • DescribeJob

See also: AWS API Documentation

Request Syntax

response = client.list_jobs(
    JobCategory='AgentRFT'|'AgentRFTEvaluation',
    NextToken='string',
    MaxResults=123,
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    LastModifiedTimeAfter=datetime(2015, 1, 1),
    LastModifiedTimeBefore=datetime(2015, 1, 1),
    NameContains='string',
    SortBy='Name'|'CreationTime'|'Status',
    SortOrder='Ascending'|'Descending',
    StatusEquals='InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'Deleting'|'DeleteFailed'
)
Parameters:
  • JobCategory (string) –

    [REQUIRED]

    The category of jobs to list.

  • NextToken (string) – If the previous response was truncated, this token retrieves the next set of results.

  • MaxResults (integer) – The maximum number of jobs to return in the response. The default value is 50.

  • CreationTimeAfter (datetime) – A filter that returns only jobs created after the specified time.

  • CreationTimeBefore (datetime) – A filter that returns only jobs created before the specified time.

  • LastModifiedTimeAfter (datetime) – A filter that returns only jobs modified after the specified time.

  • LastModifiedTimeBefore (datetime) – A filter that returns only jobs modified before the specified time.

  • NameContains (string) – A string in the job name to filter results. Only jobs whose name contains the specified string are returned.

  • SortBy (string) – The field to sort results by.

  • SortOrder (string) – The sort order for results. Valid values are Ascending and Descending.

  • StatusEquals (string) – A filter that returns only jobs with the specified status.

Return type:

dict

Returns:

Response Syntax

{
    'NextToken': 'string',
    'JobSummaries': [
        {
            'JobArn': 'string',
            'JobName': 'string',
            'JobCategory': 'AgentRFT'|'AgentRFTEvaluation',
            'JobStatus': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped'|'Deleting'|'DeleteFailed',
            'JobSecondaryStatus': 'Starting'|'Downloading'|'Training'|'Uploading'|'Stopping'|'Stopped'|'MaxRuntimeExceeded'|'Interrupted'|'Failed'|'Completed'|'Restarting'|'Pending'|'Evaluating'|'Deleting'|'DeleteFailed',
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) –

    • NextToken (string) –

      If the response is truncated, this token retrieves the next set of results.

    • JobSummaries (list) –

      An array of JobSummary objects that provide summary information about the jobs.

      • (dict) –

        Provides summary information about a job, returned by the ListJobs operation. Use DescribeJob to get full details for a specific job.

        • JobArn (string) –

          The Amazon Resource Name (ARN) of the job.

        • JobName (string) –

          The name of the job.

        • JobCategory (string) –

          The category of the job.

        • JobStatus (string) –

          The current status of the job.

        • JobSecondaryStatus (string) –

          The secondary status of the job, providing more granular information about the job’s progress. Secondary statuses may change between releases.

        • CreationTime (datetime) –

          The date and time that the job was created.

        • LastModifiedTime (datetime) –

          The date and time that the job was last modified.

        • EndTime (datetime) –

          The date and time that the job ended.