Skip to main content

jobs

Creates, updates, deletes, gets or lists a jobs resource.

Overview

Namejobs
TypeResource
Idaws.sagemaker.jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The date and time that the job was created.
end_timestring (date-time)The date and time that the job ended.
failure_reasonstringIf the job failed, the reason it failed.
job_arnstringThe Amazon Resource Name (ARN) of the job. (pattern: <code>arn:(aws[a-z-]):sagemaker:[a-z0-9-]+:[0-9]{12}:job/[a-zA-Z0-9]+/[a-zA-Z0-9](-[a-zA-Z0-9]){0,62}</code>)
job_categorystringThe category of the job. (AgentRFT, AgentRFTEvaluation)
job_config_documentstringThe JSON configuration document for the job.
job_config_schema_versionstringThe schema version used for the job configuration document. (pattern: <code>\d+.\d+.\d+</code>)
job_namestringThe name of the job. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
job_statusstringThe current status of the job. (InProgress, Completed, Failed, Stopping, Stopped, Deleting, DeleteFailed)
last_modified_timestring (date-time)The date and time that the job was last modified.
role_arnstringThe ARN of the IAM role associated with the job. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
secondary_statusstringThe detailed secondary status of the job, providing more granular information about the job's progress. Secondary statuses may change between releases. (Starting, Downloading, Training, Uploading, Stopping, Stopped, MaxRuntimeExceeded, Interrupted, Failed, Completed, Restarting, Pending, Evaluating, Deleting, DeleteFailed)
secondary_status_transitionsarrayA list of secondary status transitions for the job, with timestamps and optional status messages.
tagsarrayThe tags associated with the job.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_jobselectregionReturns detailed information about a job, including its current status, secondary status, configuration, and timestamps. Use SecondaryStatus for granular progress tracking and SecondaryStatusTransitions to see the full history of status changes with timestamps. The following operations are related to DescribeJob: CreateJob ListJobs StopJob DeleteJob
list_jobsselectregionLists 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
create_jobinsertregion, JobName, RoleArn, JobCategory, JobConfigSchemaVersion, JobConfigDocumentCreates a model customization job in Amazon SageMaker. A job runs a workload based on the job category and configuration you provide. You specify the job category, a schema-versioned configuration document, and an IAM role that grants Amazon SageMaker permission to access resources on your behalf. Use the AgentRFT category to fine-tune a model using multi-turn reinforcement learning with reward signals. Use the AgentRFTEvaluation category to evaluate a fine-tuned or base model by running multi-turn rollouts against a held-out prompt dataset and computing metrics such as pass@k and mean reward. Before creating a job, call ListJobSchemaVersions and DescribeJobSchemaVersion to retrieve the configuration schema for your job category. The JobConfigDocument must conform to the schema specified by JobConfigSchemaVersion. The following operations are related to CreateJob: DescribeJob ListJobs StopJob DeleteJob ListJobSchemaVersions DescribeJobSchemaVersion
delete_jobdeleteregionDeletes a job. This operation is idempotent. If the job is currently running, you must stop it before deleting it by calling StopJob. The following operations are related to DeleteJob: CreateJob StopJob DescribeJob
stop_jobexecregion, JobName, JobCategoryStops a running job. When you call StopJob, Amazon SageMaker sets the job status to Stopping. After the job stops, the status changes to Stopped. Partial results may be available in the output location if the job was in progress. To delete a stopped job, call DeleteJob. The following operations are related to StopJob: CreateJob DescribeJob DeleteJob

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns detailed information about a job, including its current status, secondary status, configuration, and timestamps. Use SecondaryStatus for granular progress tracking and SecondaryStatusTransitions to see the full history of status changes with timestamps. The following operations are related to DescribeJob: CreateJob ListJobs StopJob DeleteJob

SELECT
creation_time,
end_time,
failure_reason,
job_arn,
job_category,
job_config_document,
job_config_schema_version,
job_name,
job_status,
last_modified_time,
role_arn,
secondary_status,
secondary_status_transitions,
tags
FROM aws.sagemaker.jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a model customization job in Amazon SageMaker. A job runs a workload based on the job category and configuration you provide. You specify the job category, a schema-versioned configuration document, and an IAM role that grants Amazon SageMaker permission to access resources on your behalf. Use the AgentRFT category to fine-tune a model using multi-turn reinforcement learning with reward signals. Use the AgentRFTEvaluation category to evaluate a fine-tuned or base model by running multi-turn rollouts against a held-out prompt dataset and computing metrics such as pass@k and mean reward. Before creating a job, call ListJobSchemaVersions and DescribeJobSchemaVersion to retrieve the configuration schema for your job category. The JobConfigDocument must conform to the schema specified by JobConfigSchemaVersion. The following operations are related to CreateJob: DescribeJob ListJobs StopJob DeleteJob ListJobSchemaVersions DescribeJobSchemaVersion

INSERT INTO aws.sagemaker.jobs (
JobName,
RoleArn,
JobCategory,
JobConfigSchemaVersion,
JobConfigDocument,
Tags,
region
)
SELECT
'{{ JobName }}' /* required */,
'{{ RoleArn }}' /* required */,
'{{ JobCategory }}' /* required */,
'{{ JobConfigSchemaVersion }}' /* required */,
'{{ JobConfigDocument }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
job_arn
;

DELETE examples

Deletes a job. This operation is idempotent. If the job is currently running, you must stop it before deleting it by calling StopJob. The following operations are related to DeleteJob: CreateJob StopJob DescribeJob

DELETE FROM aws.sagemaker.jobs
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Stops a running job. When you call StopJob, Amazon SageMaker sets the job status to Stopping. After the job stops, the status changes to Stopped. Partial results may be available in the output location if the job was in progress. To delete a stopped job, call DeleteJob. The following operations are related to StopJob: CreateJob DescribeJob DeleteJob

EXEC aws.sagemaker.jobs.stop_job
@region='{{ region }}' --required
@@json=
'{
"JobName": "{{ JobName }}",
"JobCategory": "{{ JobCategory }}"
}'
;