Skip to main content

job_templates

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

Overview

Namejob_templates
TypeResource
Idaws.emr_containers.job_templates

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the job template. (pattern: <code>[0-9a-z]+</code>)
namestringThe name of the job template. (pattern: <code>[.-_/#A-Za-z0-9]+</code>)
arnstringThe ARN of the job template. (pattern: <code>^arn:(aws[a-zA-Z0-9-]*):emr-containers:.+:(\d{12}):/jobtemplates/[0-9a-zA-Z]+$</code>)
created_atstring (date-time)The date and time when the job template was created.
created_bystringThe user who created the job template. (pattern: <code>^arn:(aws[a-zA-Z0-9-]*):(iam|sts)::(\d{12})?:[\w/+=,.@-]+$</code>)
decryption_errorstringThe error message in case the decryption of job template fails. (pattern: <code>.\S.</code>)
job_template_dataobjectThe values of StartJobRun API requests used in job runs started using the job template.
kms_key_arnstringThe KMS key ARN used to encrypt the job template. (pattern: <code>^(arn:(aws[a-zA-Z0-9-]):kms:.+:(\d{12})?:key/[(0-9a-zA-Z)-?]+|$&#123;[a-zA-Z]\w&#125;)$</code>)
tagsobjectThe tags assigned to the job template.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_job_templateselecttemplate_id, regionDisplays detailed information about a specified job template. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.
list_job_templatesselectregioncreatedAfter, createdBefore, maxResults, nextTokenLists job templates based on a set of parameters. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.
create_job_templateinsertregion, name, clientToken, jobTemplateDataCreates a job template. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.
delete_job_templatedeletetemplate_id, regionDeletes a job template. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.

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)
template_idstringThe ID of the job template that will be deleted.
createdAfterstring (date-time)The date and time after which the job templates were created.
createdBeforestring (date-time)The date and time before which the job templates were created.
maxResultsintegerThe maximum number of job templates that can be listed.
nextTokenstringThe token for the next set of job templates to return.

SELECT examples

Displays detailed information about a specified job template. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.

SELECT
id,
name,
arn,
created_at,
created_by,
decryption_error,
job_template_data,
kms_key_arn,
tags
FROM aws.emr_containers.job_templates
WHERE template_id = '{{ template_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a job template. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.

INSERT INTO aws.emr_containers.job_templates (
name,
clientToken,
jobTemplateData,
tags,
kmsKeyArn,
region
)
SELECT
'{{ name }}' /* required */,
'{{ clientToken }}' /* required */,
'{{ jobTemplateData }}' /* required */,
'{{ tags }}',
'{{ kmsKeyArn }}',
'{{ region }}'
RETURNING
id,
name,
arn,
created_at
;

DELETE examples

Deletes a job template. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.

DELETE FROM aws.emr_containers.job_templates
WHERE template_id = '{{ template_id }}' --required
AND region = '{{ region }}' --required
;