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 = '{{ region }}' 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 = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.batch.job_queues
WHERE
Identifier = '{{ job_queue_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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