scheduling_policies
Creates, updates, deletes, gets or lists a scheduling_policies resource.
Overview
| Name | scheduling_policies |
| Type | Resource |
| Id | aws.batch.scheduling_policies |
Fields
The following fields are returned by SELECT queries:
- describe_scheduling_policies
- list_scheduling_policies
| Name | Datatype | Description |
|---|---|---|
scheduling_policies | array | The list of scheduling policies. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon Resource Name (ARN) of the scheduling policy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_scheduling_policies | select | region | Describes one or more of your scheduling policies. | |
list_scheduling_policies | select | region | Returns a list of Batch scheduling policies. | |
create_scheduling_policy | insert | region, name | Creates an Batch scheduling policy. | |
update_scheduling_policy | update | region, arn | Updates a scheduling policy. | |
delete_scheduling_policy | delete | region | Deletes the specified scheduling policy. You can't delete a scheduling policy that's used in any job queues. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_scheduling_policies
- list_scheduling_policies
Describes one or more of your scheduling policies.
SELECT
scheduling_policies
FROM aws.batch.scheduling_policies
WHERE region = '{{ region }}' -- required
;
Returns a list of Batch scheduling policies.
SELECT
arn
FROM aws.batch.scheduling_policies
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_scheduling_policy
- Manifest
Creates an Batch scheduling policy.
INSERT INTO aws.batch.scheduling_policies (
name,
quotaSharePolicy,
fairsharePolicy,
tags,
region
)
SELECT
'{{ name }}' /* required */,
'{{ quotaSharePolicy }}',
'{{ fairsharePolicy }}',
'{{ tags }}',
'{{ region }}'
RETURNING
name,
arn
;
# Description fields are for documentation purposes
- name: scheduling_policies
props:
- name: region
value: "{{ region }}"
description: Required parameter for the scheduling_policies resource.
- name: name
value: "{{ name }}"
- name: quotaSharePolicy
description: |
The quota share scheduling policy details for a job queue.
value:
idleResourceAssignmentStrategy: "{{ idleResourceAssignmentStrategy }}"
- name: fairsharePolicy
description: |
The fair-share scheduling policy details.
value:
shareDecaySeconds: {{ shareDecaySeconds }}
computeReservation: {{ computeReservation }}
shareDistribution:
- shareIdentifier: "{{ shareIdentifier }}"
weightFactor: {{ weightFactor }}
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_scheduling_policy
Updates a scheduling policy.
UPDATE aws.batch.scheduling_policies
SET
arn = '{{ arn }}',
quotaSharePolicy = '{{ quotaSharePolicy }}',
fairsharePolicy = '{{ fairsharePolicy }}'
WHERE
region = '{{ region }}' --required
AND arn = '{{ arn }}' --required;
DELETE examples
- delete_scheduling_policy
Deletes the specified scheduling policy. You can't delete a scheduling policy that's used in any job queues.
DELETE FROM aws.batch.scheduling_policies
WHERE region = '{{ region }}' --required
;