job_queues
Creates, updates, deletes or gets a job_queue resource or lists job_queues in a region
Overview
| Name | job_queues |
| Type | Resource |
| Description | Resource Type definition for AWS::Batch::JobQueue |
| Id | awscc.batch.job_queues |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
job_queue_name | string | |
job_queue_arn | string | ARN of the Scheduling Policy. |
job_queue_type | string | |
compute_environment_order | array | |
service_environment_order | array | |
job_state_time_limit_actions | array | |
priority | integer | |
state | string | |
tags | object | A key-value pair to associate with a resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
job_queue_arn | string | ARN of the Scheduling Policy. |
region | string | AWS region. |
For more information, see AWS::Batch::JobQueue.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | job_queues | INSERT | Priority, region |
delete_resource | job_queues | DELETE | Identifier, region |
update_resource | job_queues | UPDATE | Identifier, PatchDocument, region |
list_resources | job_queues_list_only | SELECT | region |
get_resource | job_queues | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual job_queue.
SELECT
region,
job_queue_name,
job_queue_arn,
job_queue_type,
compute_environment_order,
service_environment_order,
job_state_time_limit_actions,
priority,
state,
scheduling_policy_arn,
tags
FROM awscc.batch.job_queues
WHERE
region = 'us-east-1' AND
Identifier = '{{ job_queue_arn }}';
Lists all job_queues in a region.
SELECT
region,
job_queue_arn
FROM awscc.batch.job_queues_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new job_queue resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.batch.job_queues (
Priority,
region
)
SELECT
'{{ priority }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.batch.job_queues (
JobQueueName,
JobQueueType,
ComputeEnvironmentOrder,
ServiceEnvironmentOrder,
JobStateTimeLimitActions,
Priority,
State,
SchedulingPolicyArn,
Tags,
region
)
SELECT
'{{ job_queue_name }}',
'{{ job_queue_type }}',
'{{ compute_environment_order }}',
'{{ service_environment_order }}',
'{{ job_state_time_limit_actions }}',
'{{ priority }}',
'{{ state }}',
'{{ scheduling_policy_arn }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: job_queue
props:
- name: job_queue_name
value: '{{ job_queue_name }}'
- name: job_queue_type
value: '{{ job_queue_type }}'
- name: compute_environment_order
value:
- compute_environment: '{{ compute_environment }}'
order: '{{ order }}'
- name: service_environment_order
value:
- service_environment: '{{ service_environment }}'
order: '{{ order }}'
- name: job_state_time_limit_actions
value:
- action: '{{ action }}'
max_time_seconds: '{{ max_time_seconds }}'
reason: '{{ reason }}'
state: '{{ state }}'
- name: priority
value: '{{ priority }}'
- name: state
value: '{{ state }}'
- name: scheduling_policy_arn
value: '{{ scheduling_policy_arn }}'
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a job_queue resource, using stack-deploy.
/*+ update */
UPDATE awscc.batch.job_queues
SET PatchDocument = string('{{ {
"ComputeEnvironmentOrder": compute_environment_order,
"ServiceEnvironmentOrder": service_environment_order,
"JobStateTimeLimitActions": job_state_time_limit_actions,
"Priority": priority,
"State": state,
"SchedulingPolicyArn": scheduling_policy_arn
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ job_queue_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.batch.job_queues
WHERE
Identifier = '{{ job_queue_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the job_queues resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
Batch:CreateJobQueue,
Batch:TagResource,
Batch:DescribeJobQueues
Batch:DescribeJobQueues
Batch:DescribeJobQueues,
Batch:UpdateJobQueue,
Batch:TagResource,
Batch:UnTagResource
Batch:UpdateJobQueue,
Batch:DescribeJobQueues,
Batch:DeleteJobQueue
Batch:DescribeJobQueues