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
Idawscc.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

NameResourceAccessible byRequired Params
create_resourcejobsINSERTRole, Command, region
delete_resourcejobsDELETEIdentifier, region
update_resourcejobsUPDATEIdentifier, PatchDocument, region
list_resourcesjobs_list_onlySELECTregion
get_resourcejobsSELECTIdentifier, region

SELECT examples

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 awscc.glue.jobs
WHERE
region = 'us-east-1' AND
Identifier = '{{ name }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.glue.jobs
SET PatchDocument = string('{{ {
"Connections": connections,
"MaxRetries": max_retries,
"Description": description,
"Timeout": timeout,
"AllocatedCapacity": allocated_capacity,
"Role": role,
"DefaultArguments": default_arguments,
"NotificationProperty": notification_property,
"WorkerType": worker_type,
"ExecutionClass": execution_class,
"LogUri": log_uri,
"Command": command,
"GlueVersion": glue_version,
"ExecutionProperty": execution_property,
"SecurityConfiguration": security_configuration,
"NumberOfWorkers": number_of_workers,
"Tags": tags,
"MaxCapacity": max_capacity,
"NonOverridableArguments": non_overridable_arguments,
"MaintenanceWindow": maintenance_window,
"JobMode": job_mode,
"JobRunQueuingEnabled": job_run_queuing_enabled
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.glue.jobs
WHERE
Identifier = '{{ name }}' AND
region = 'us-east-1';

Permissions

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

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