Skip to main content

job_definitions

Creates, updates, deletes or gets a job_definition resource or lists job_definitions in a region

Overview

Namejob_definitions
TypeResource
DescriptionResource Type definition for AWS::Batch::JobDefinition
Idaws.batch.job_definitions

Fields

NameDatatypeDescription
parametersobject
timeoutobject
job_definition_namestring
propagate_tagsboolean
platform_capabilitiesarray
eks_propertiesobject
typestring
node_propertiesobject
scheduling_priorityinteger
container_propertiesobject
ecs_propertiesobject
retry_strategyobject
tagsobjectA key-value pair to associate with a resource.
regionstringAWS region.

For more information, see AWS::Batch::JobDefinition.

Methods

NameAccessible byRequired Params
create_resourceINSERTType, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all job_definitions in a region.

SELECT
region,
parameters,
timeout,
job_definition_name,
propagate_tags,
platform_capabilities,
eks_properties,
type,
node_properties,
scheduling_priority,
container_properties,
ecs_properties,
retry_strategy,
tags
FROM aws.batch.job_definitions
WHERE region = 'us-east-1';

Gets all properties from an individual job_definition.

SELECT
region,
parameters,
timeout,
job_definition_name,
propagate_tags,
platform_capabilities,
eks_properties,
type,
node_properties,
scheduling_priority,
container_properties,
ecs_properties,
retry_strategy,
tags
FROM aws.batch.job_definitions
WHERE region = 'us-east-1' AND data__Identifier = '<JobDefinitionName>';

INSERT example

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

/*+ create */
INSERT INTO aws.batch.job_definitions (
Type,
region
)
SELECT
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.batch.job_definitions
WHERE data__Identifier = '<JobDefinitionName>'
AND region = 'us-east-1';

Permissions

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

Read

Batch:DescribeJobDefinitions

Create

Batch:RegisterJobDefinition,
Batch:TagResource,
Batch:DescribeJobDefinitions,
Iam:PassRole

Update

Batch:DescribeJobDefinitions,
Batch:RegisterJobDefinition,
Batch:DeregisterJobDefinition,
Batch:TagResource,
Batch:UntagResource,
Iam:PassRole

List

Batch:DescribeJobDefinitions

Delete

Batch:DescribeJobDefinitions,
Batch:DeregisterJobDefinition,
Iam:PassRole