job_runs
Creates, updates, deletes, gets or lists a job_runs resource.
Overview
| Name | job_runs |
| Type | Resource |
| Id | aws.emr_serverless.job_runs |
Fields
The following fields are returned by SELECT queries:
- get_job_run
- list_job_runs
| Name | Datatype | Description |
|---|---|---|
name | string | The optional job run name. This doesn't have to be unique. (pattern: <code>.\S.</code>) |
application_id | string | The ID of the application the job is running on. (pattern: <code>[0-9a-z]+</code>) |
arn | string | The 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>) |
attempt | integer | The attempt of the job run. |
attempt_created_at | string (date-time) | The date and time of when the job run attempt was created. |
attempt_updated_at | string (date-time) | The date and time of when the job run attempt was last updated. |
billed_resource_utilization | object | The 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_overrides | object | The configuration settings that are used to override default configuration. |
created_at | string (date-time) | The date and time when the job run was created. |
created_by | string | The user who created the job run. (pattern: <code>arn:(aws[a-zA-Z0-9-]*):(iam|sts)::(\d{12})?:[\w/+=,.@-]+</code>) |
ended_at | string (date-time) | The date and time when the job was terminated. |
execution_iam_policy | object | Optional 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_role | string | The 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_minutes | integer (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_configuration | object | The applied image configuration. |
job_driver | object | The job driver for the job run. |
job_run_id | string | The ID of the job run. (pattern: <code>[0-9a-z]+</code>) |
mode | string | The mode of the job run. (BATCH, STREAMING) |
network_configuration | object | The network configuration for customer VPC connectivity. |
queued_duration_milliseconds | integer (int64) | The total time for a job in the QUEUED state in milliseconds. |
release_label | string | The Amazon EMR release associated with the application your job is running on. (pattern: <code>[A-Za-z0-9._/-]+</code>) |
retry_policy | object | The retry policy of the job run. |
started_at | string (date-time) | The date and time when the job moved to the RUNNING state. |
state | string | The state of the job run. (SUBMITTED, PENDING, SCHEDULED, RUNNING, SUCCESS, FAILED, CANCELLING, CANCELLED, QUEUED) |
state_details | string | The state details of the job run. (pattern: <code>.\S.</code>) |
tags | object | The tags assigned to the job run. |
total_execution_duration_seconds | integer | The job run total execution duration in seconds. This field is only available for job runs in a COMPLETED, FAILED, or CANCELLED state. |
total_resource_utilization | object | The 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_at | string (date-time) | The date and time when the job run was updated. |
worker_type_specifications | object | The specification applied to each worker type. Includes the JobRun-level ImageConfiguration when the applicationLevelDigestResolution is false for the application. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the job run. (pattern: <code>[0-9a-z]+</code>) |
name | string | The optional job run name. This doesn't have to be unique. (pattern: <code>.\S.</code>) |
application_id | string | The ID of the application the job is running on. (pattern: <code>[0-9a-z]+</code>) |
arn | string | The 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>) |
attempt | integer | The attempt number of the job run execution. |
attempt_created_at | string (date-time) | The date and time of when the job run attempt was created. |
attempt_updated_at | string (date-time) | The date and time of when the job run attempt was last updated. |
created_at | string (date-time) | The date and time when the job run was created. |
created_by | string | The user who created the job run. (pattern: <code>arn:(aws[a-zA-Z0-9-]*):(iam|sts)::(\d{12})?:[\w/+=,.@-]+</code>) |
execution_role | string | The 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>) |
mode | string | The mode of the job run. (BATCH, STREAMING) |
release_label | string | The Amazon EMR release associated with the application your job is running on. (pattern: <code>[A-Za-z0-9._/-]+</code>) |
state | string | The state of the job run. (SUBMITTED, PENDING, SCHEDULED, RUNNING, SUCCESS, FAILED, CANCELLING, CANCELLED, QUEUED) |
state_details | string | The state details of the job run. (pattern: <code>.\S.</code>) |
type_ | string | The type of job run, such as Spark or Hive. |
updated_at | string (date-time) | The date and time when the job run was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_job_run | select | application_id, job_run_id, region | attempt | Displays detailed information about a job run. |
list_job_runs | select | application_id, region | nextToken, maxResults, createdAtAfter, createdAtBefore, states, mode | Lists 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.
| Name | Datatype | Description |
|---|---|---|
application_id | string | The ID of the application for which to list the job run. |
job_run_id | string | The ID of the job run. |
region | string | AWS region (default: us-east-1) |
attempt | integer | An optimal parameter that indicates the amount of attempts for the job. If not specified, this value defaults to the attempt of the latest job. |
createdAtAfter | string (date-time) | The lower bound of the option to filter by creation date and time. |
createdAtBefore | string (date-time) | The upper bound of the option to filter by creation date and time. |
maxResults | integer | The maximum number of job runs that can be listed. |
mode | string | The mode of the job runs to list. |
nextToken | string | The token for the next set of job run results. |
states | array | An 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
- get_job_run
- list_job_runs
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 }}'
;
Lists job runs based on a set of parameters.
SELECT
id,
name,
application_id,
arn,
attempt,
attempt_created_at,
attempt_updated_at,
created_at,
created_by,
execution_role,
mode,
release_label,
state,
state_details,
type_,
updated_at
FROM aws.emr_serverless.job_runs
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND createdAtAfter = '{{ createdAtAfter }}'
AND createdAtBefore = '{{ createdAtBefore }}'
AND states = '{{ states }}'
AND mode = '{{ mode }}'
;