Skip to main content

jobs

Creates, updates, deletes or gets a job resource or lists jobs in a region

Overview

Namejobs
TypeResource
DescriptionResource Type definition for AWS::Glue::Job
Idaws.glue.jobs

Fields

NameDatatypeDescription
connectionsobjectSpecifies the connections used by a job
max_retriesnumberThe maximum number of times to retry this job after a JobRun fails
descriptionstringA description of the job.
timeoutintegerThe maximum time that a job run can consume resources before it is terminated and enters TIMEOUT status.
allocated_capacitynumberThe number of capacity units that are allocated to this job.
namestringThe name you assign to the job definition
rolestringThe name or Amazon Resource Name (ARN) of the IAM role associated with this job.
default_argumentsobjectThe default arguments for this job, specified as name-value pairs.
notification_propertyobjectSpecifies configuration properties of a notification.
worker_typestringTThe type of predefined worker that is allocated when a job runs.
execution_classstringIndicates whether the job is run with a standard or flexible execution class.
log_uristringThis field is reserved for future use.
commandobjectThe code that executes a job.
glue_versionstringGlue version determines the versions of Apache Spark and Python that AWS Glue supports.
execution_propertyobjectThe maximum number of concurrent runs that are allowed for this job.
security_configurationstringThe name of the SecurityConfiguration structure to be used with this job.
number_of_workersintegerThe number of workers of a defined workerType that are allocated when a job runs.
tagsobjectThe tags to use with this job.
max_capacitynumberThe number of AWS Glue data processing units (DPUs) that can be allocated when this job runs.
non_overridable_argumentsobjectNon-overridable arguments for this job, specified as name-value pairs.
maintenance_windowstringProperty description not available.
job_modestringProperty description not available.
job_run_queuing_enabledbooleanProperty description not available.
regionstringAWS region.

For more information, see AWS::Glue::Job.

Methods

NameAccessible byRequired Params
create_resourceINSERTRole, Command, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all jobs in a region.

SELECT
region,
connections,
max_retries,
description,
timeout,
allocated_capacity,
name,
role,
default_arguments,
notification_property,
worker_type,
execution_class,
log_uri,
command,
glue_version,
execution_property,
security_configuration,
number_of_workers,
tags,
max_capacity,
non_overridable_arguments,
maintenance_window,
job_mode,
job_run_queuing_enabled
FROM aws.glue.jobs
WHERE region = 'us-east-1';

Gets all properties from an individual job.

SELECT
region,
connections,
max_retries,
description,
timeout,
allocated_capacity,
name,
role,
default_arguments,
notification_property,
worker_type,
execution_class,
log_uri,
command,
glue_version,
execution_property,
security_configuration,
number_of_workers,
tags,
max_capacity,
non_overridable_arguments,
maintenance_window,
job_mode,
job_run_queuing_enabled
FROM aws.glue.jobs
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';

INSERT example

Use the following StackQL query and manifest file to create a new job resource, using stack-deploy.

/*+ create */
INSERT INTO aws.glue.jobs (
Role,
Command,
region
)
SELECT
'{{ Role }}',
'{{ Command }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.glue.jobs
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

To operate on the jobs resource, the following permissions are required:

Create

iam:GetRole,
iam:PassRole,
glue:CreateJob,
glue:GetJob,
glue:TagResource

Read

glue:GetJob,
glue:GetTags

Delete

glue:DeleteJob,
glue:GetJob,
glue:UntagResource

Update

iam:GetRole,
iam:PassRole,
glue:UpdateJob,
glue:UntagResource,
glue:TagResource

List

glue:ListJobs