Skip to main content

scheduling_policies

Creates, updates, deletes or gets a scheduling_policy resource or lists scheduling_policies in a region

Overview

Namescheduling_policies
TypeResource
DescriptionResource Type schema for AWS::Batch::SchedulingPolicy
Idaws.batch.scheduling_policies

Fields

NameDatatypeDescription
namestringName of Scheduling Policy.
arnstringARN of the Scheduling Policy.
fairshare_policyobjectFair Share Policy for the Job Queue.
tagsobjectA key-value pair to associate with a resource.
regionstringAWS region.

Methods

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

SELECT examples

Gets all scheduling_policies in a region.

SELECT
region,
name,
arn,
fairshare_policy,
tags
FROM aws.batch.scheduling_policies
WHERE region = 'us-east-1';

Gets all properties from an individual scheduling_policy.

SELECT
region,
name,
arn,
fairshare_policy,
tags
FROM aws.batch.scheduling_policies
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

/*+ create */
INSERT INTO aws.batch.scheduling_policies (
Name,
FairsharePolicy,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ FairsharePolicy }}',
'{{ Tags }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

Batch:CreateSchedulingPolicy,
Batch:TagResource

Read

Batch:DescribeSchedulingPolicies

Update

Batch:UpdateSchedulingPolicy,
Batch:TagResource,
Batch:UnTagResource

Delete

Batch:DescribeSchedulingPolicies,
Batch:DeleteSchedulingPolicy

List

Batch:ListSchedulingPolicies,
Batch:DescribeSchedulingPolicies