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 definition for AWS::Batch::SchedulingPolicy
Idawscc.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.

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

Methods

NameResourceAccessible byRequired Params
create_resourcescheduling_policiesINSERTregion
delete_resourcescheduling_policiesDELETEIdentifier, region
update_resourcescheduling_policiesUPDATEIdentifier, PatchDocument, region
list_resourcesscheduling_policies_list_onlySELECTregion
get_resourcescheduling_policiesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual scheduling_policy.

SELECT
region,
name,
arn,
fairshare_policy,
tags
FROM awscc.batch.scheduling_policies
WHERE
region = 'us-east-1' AND
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 awscc.batch.scheduling_policies (
Name,
FairsharePolicy,
Tags,
region
)
SELECT
'{{ name }}',
'{{ fairshare_policy }}',
'{{ tags }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.batch.scheduling_policies
SET PatchDocument = string('{{ {
"FairsharePolicy": fairshare_policy
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.batch.scheduling_policies
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

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

Batch:CreateSchedulingPolicy,
Batch:TagResource