Skip to main content

job_runs

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

Overview

Namejob_runs
TypeResource
Idaws.emr_serverless.job_runs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe optional job run name. This doesn't have to be unique. (pattern: <code>.\S.</code>)
application_idstringThe ID of the application the job is running on. (pattern: <code>[0-9a-z]+</code>)
arnstringThe execution role ARN of the job run. (pattern: <code>arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\d{12}):/applications/[0-9a-zA-Z]+/jobruns/[0-9a-zA-Z]+</code>)
attemptintegerThe attempt of the job run.
attempt_created_atstring (date-time)The date and time of when the job run attempt was created.
attempt_updated_atstring (date-time)The date and time of when the job run attempt was last updated.
billed_resource_utilizationobjectThe aggregate vCPU, memory, and storage that Amazon Web Services has billed for the job run. The billed resources include a 1-minute minimum usage for workers, plus additional storage over 20 GB per worker. Note that billed resources do not include usage for idle pre-initialized workers.
configuration_overridesobjectThe configuration settings that are used to override default configuration.
created_atstring (date-time)The date and time when the job run was created.
created_bystringThe user who created the job run. (pattern: <code>arn:(aws[a-zA-Z0-9-]*):(iam|sts)::(\d{12})?:[\w/+=,.@-]+</code>)
ended_atstring (date-time)The date and time when the job was terminated.
execution_iam_policyobjectOptional IAM policy. The resulting job IAM role permissions will be an intersection of the policies passed and the policy associated with your job execution role.
execution_rolestringThe execution role ARN of the job run. (pattern: <code>arn:(aws[a-zA-Z0-9-]*):iam::([0-9]{12}):(role((\u002F)|(\u002F[\u0021-\u007F]+\u002F))[\w+=,.@-]+)</code>)
execution_timeout_minutesinteger (int64)Returns the job run timeout value from the StartJobRun call. If no timeout was specified, then it returns the default timeout of 720 minutes.
image_configurationobjectThe applied image configuration.
job_driverobjectThe job driver for the job run.
job_run_idstringThe ID of the job run. (pattern: <code>[0-9a-z]+</code>)
modestringThe mode of the job run. (BATCH, STREAMING)
network_configurationobjectThe network configuration for customer VPC connectivity.
queued_duration_millisecondsinteger (int64)The total time for a job in the QUEUED state in milliseconds.
release_labelstringThe Amazon EMR release associated with the application your job is running on. (pattern: <code>[A-Za-z0-9._/-]+</code>)
retry_policyobjectThe retry policy of the job run.
started_atstring (date-time)The date and time when the job moved to the RUNNING state.
statestringThe state of the job run. (SUBMITTED, PENDING, SCHEDULED, RUNNING, SUCCESS, FAILED, CANCELLING, CANCELLED, QUEUED)
state_detailsstringThe state details of the job run. (pattern: <code>.\S.</code>)
tagsobjectThe tags assigned to the job run.
total_execution_duration_secondsintegerThe job run total execution duration in seconds. This field is only available for job runs in a COMPLETED, FAILED, or CANCELLED state.
total_resource_utilizationobjectThe aggregate vCPU, memory, and storage resources used from the time the job starts to execute, until the time the job terminates, rounded up to the nearest second.
updated_atstring (date-time)The date and time when the job run was updated.
worker_type_specificationsobjectThe specification applied to each worker type. Includes the JobRun-level ImageConfiguration when the applicationLevelDigestResolution is false for the application.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_job_runselectapplication_id, job_run_id, regionattemptDisplays detailed information about a job run.
list_job_runsselectapplication_id, regionnextToken, maxResults, createdAtAfter, createdAtBefore, states, modeLists job runs based on a set of parameters.

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
application_idstringThe ID of the application for which to list the job run.
job_run_idstringThe ID of the job run.
regionstringAWS region (default: us-east-1)
attemptintegerAn optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job.
createdAtAfterstring (date-time)The lower bound of the option to filter by creation date and time.
createdAtBeforestring (date-time)The upper bound of the option to filter by creation date and time.
maxResultsintegerThe maximum number of job runs that can be listed.
modestringThe mode of the job runs to list.
nextTokenstringThe token for the next set of job run results.
statesarrayAn optional filter for job run states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.

SELECT examples

Displays detailed information about a job run.

SELECT
name,
application_id,
arn,
attempt,
attempt_created_at,
attempt_updated_at,
billed_resource_utilization,
configuration_overrides,
created_at,
created_by,
ended_at,
execution_iam_policy,
execution_role,
execution_timeout_minutes,
image_configuration,
job_driver,
job_run_id,
mode,
network_configuration,
queued_duration_milliseconds,
release_label,
retry_policy,
started_at,
state,
state_details,
tags,
total_execution_duration_seconds,
total_resource_utilization,
updated_at,
worker_type_specifications
FROM aws.emr_serverless.job_runs
WHERE application_id = '{{ application_id }}' -- required
AND job_run_id = '{{ job_run_id }}' -- required
AND region = '{{ region }}' -- required
AND attempt = '{{ attempt }}'
;