Skip to main content

aws_batch_job_queues Resource

[edit on GitHub]

Use the aws_batch_job_queues InSpec audit resource to test the properties of multiple AWS Batch job queues.

For additional information, including details on parameters and properties, see the AWS Batch job queues documentation.

Installation

This resource is available in the Chef InSpec AWS resource pack.

See the Chef InSpec documentation on cloud platforms for information on configuring your AWS environment for InSpec and creating an InSpec profile that uses the InSpec AWS resource pack.

Syntax

Ensure that a job queue exists.

describe aws_batch_job_queues do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

job_queue_names
The name of the job queue.
job_queue_arns
The ARN of the job queue.
states
The state of the job queue.
statuses
The status of the job queue.
status_reasons
The status_reason of the job queue.
priorities
The priority of the job queue.
tags
The tags of the job queue.

Examples

Ensure a job queue name is available.

describe aws_batch_job_queues do
  its('job_queue_names') { should include 'JOB_QUEUE_NAME' }
end

Ensure that the state is ENABLED or DISABLED.

describe aws_batch_job_queues do
    its('states') { should include 'ENABLED' }
end

Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.

The controls will pass if the describe method returns at least one result.

exist

Use should to test that the entity exists.

describe aws_batch_job_queues do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_batch_job_queues do
  it { should_not exist }
end

be_available

Use should to check if the job_queue name is available.

describe aws_batch_job_queues do
  it { should be_available }
end

AWS Permissions

Your Principal will need the Batch:Client:DescribeJobQueuesResponse action with Effect set to Allow.

Was this page helpful?

×









Search Results