scheduling_policies
Creates, updates, deletes or gets a scheduling_policy
resource or lists scheduling_policies
in a region
Overview
Name | scheduling_policies |
Type | Resource |
Description | Resource Type schema for AWS::Batch::SchedulingPolicy |
Id | aws.batch.scheduling_policies |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Name of Scheduling Policy. |
arn | string | ARN of the Scheduling Policy. |
fairshare_policy | object | Fair Share Policy for the Job Queue. |
tags | object | A key-value pair to associate with a resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.batch.scheduling_policies (
Name,
FairsharePolicy,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ FairsharePolicy }}',
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.batch.scheduling_policies (
Name,
FairsharePolicy,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ FairsharePolicy }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: scheduling_policy
props:
- name: Name
value: '{{ Name }}'
- name: FairsharePolicy
value:
ShareDecaySeconds: null
ComputeReservation: null
ShareDistribution:
- ShareIdentifier: '{{ ShareIdentifier }}'
WeightFactor: null
- name: Tags
value: {}
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