AWS Batch Job Queues API

The Job Queues API from AWS Batch — 4 operation(s) for job queues.

GitHub OpenAPI

Operations 4

POST /v1/createjobqueue Create Job Queue #
POST /v1/deletejobqueue Delete Job Queue #
POST /v1/describejobqueues Describe Job Queues #
POST /v1/updatejobqueue Update Job Queue #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/aws-batch:aws-batch-job-queues-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

aws-batch-job-queues-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS Batch Job Queues API
  version: '2016-08-10'
  description: Generated from AWS's published Smithy model for AWS Batch. 4 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://batch.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /v1/createjobqueue:
    post:
      operationId: CreateJobQueue
      summary: Create Job Queue
      description: Creates an Batch job queue. When you create a job queue, you associate one or more compute environments
        to the queue and assign an order of preference for the compute environments. You also set a priority to the job queue
        that determines the order that the Batch scheduler places jobs onto its associated compute environments. For example,
        if a compute environment is associated with more than one job queue, the job queue with a higher priority is given
        preference for scheduling jobs to that compute environment.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateJobQueueResponse'
              example:
                jobQueueName: LowPriority
                jobQueueArn: arn:aws:batch:us-east-1:012345678910:job-queue/LowPriority
        '400':
          description: ClientException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientException'
        '500':
          description: ServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateJobQueueRequest'
            example:
              priority: 1
              state: ENABLED
              computeEnvironmentOrder:
              - computeEnvironment: M4Spot
                order: 1
              jobQueueName: LowPriority
      tags:
      - Job Queues
  /v1/deletejobqueue:
    post:
      operationId: DeleteJobQueue
      summary: Delete Job Queue
      description: Deletes the specified job queue. You must first disable submissions for a queue with the UpdateJobQueue
        operation. All jobs in the queue are eventually terminated when you delete a job queue. It's not necessary to disassociate
        compute environments from a queue before submitting a DeleteJobQueue request.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteJobQueueResponse'
              example: {}
        '400':
          description: ClientException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientException'
        '500':
          description: ServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteJobQueueRequest'
            example:
              jobQueue: GPGPU
      tags:
      - Job Queues
  /v1/describejobqueues:
    post:
      operationId: DescribeJobQueues
      summary: Describe Job Queues
      description: Describes one or more of your job queues.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DescribeJobQueuesResponse'
              example:
                jobQueues:
                - jobQueueName: HighPriority
                  jobQueueArn: arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority
                  state: ENABLED
                  status: VALID
                  statusReason: JobQueue Healthy
                  priority: 1
                  computeEnvironmentOrder:
                  - order: 1
                    computeEnvironment: arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand
        '400':
          description: ClientException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientException'
        '500':
          description: ServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DescribeJobQueuesRequest'
            example:
              jobQueues:
              - HighPriority
      tags:
      - Job Queues
  /v1/updatejobqueue:
    post:
      operationId: UpdateJobQueue
      summary: Update Job Queue
      description: Updates a job queue.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateJobQueueResponse'
              example:
                jobQueueName: GPGPU
                jobQueueArn: arn:aws:batch:us-east-1:012345678910:job-queue/GPGPU
        '400':
          description: ClientException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientException'
        '500':
          description: ServerException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerException'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateJobQueueRequest'
            example:
              state: DISABLED
              jobQueue: GPGPU
      tags:
      - Job Queues
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: batch
  schemas:
    ClientException:
      type: object
      properties:
        message:
          type: string
    ComputeEnvironmentOrder:
      type: object
      properties:
        order:
          type: integer
          description: The order of the compute environment. Compute environments are tried in ascending order. For example,
            if two compute environments are associated with a job queue, the compute environment with a lower order integer
            value is tried for job placement first.
        computeEnvironment:
          type: string
          description: The Amazon Resource Name (ARN) of the compute environment.
      required:
      - order
      - computeEnvironment
    CreateJobQueueRequest:
      type: object
      properties:
        jobQueueName:
          type: string
          description: The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase
            letters, numbers, hyphens (-), and underscores (_).
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: The state of the job queue. If the job queue state is ENABLED, it is able to accept jobs. If the job
            queue state is DISABLED, new jobs can't be added to the queue, but jobs already in the queue can finish.
        schedulingPolicyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the fair-share scheduling policy. Job queues that don't have a fair-share
            scheduling policy are scheduled in a first-in, first-out (FIFO) model. After a job queue has a fair-share scheduling
            policy, it can be replaced but can't be removed. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name
            . An example is aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy. A job queue without
            a fair-share scheduling policy is scheduled as a FIFO job queue and can't have a fair-share scheduling policy
            added. Jobs queues with a fair-sh
        priority:
          type: integer
          description: The priority of the job queue. Job queues with a higher priority (or a higher integer value for the
            priority parameter) are evaluated first when associated with the same compute environment. Priority is determined
            in descending order. For example, a job queue with a priority value of 10 is given scheduling preference over
            a job queue with a priority value of 1. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate
            (FARGATE or FARGATE_SPOT); EC2 and Fargate compute environments can't be mixed.
        computeEnvironmentOrder:
          type: array
          items:
            $ref: '#/components/schemas/ComputeEnvironmentOrder'
          description: The set of compute environments mapped to a job queue and their order relative to each other. The job
            scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments
            must be in the VALID state before you can associate them with a job queue. You can associate up to three compute
            environments with a job queue. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE
            or FARGATE_SPOT); EC2 and Fargate compute environments can't be mixed. All compute environments that are associated
            with a job queue must share the same archi
        serviceEnvironmentOrder:
          type: array
          items:
            $ref: '#/components/schemas/ServiceEnvironmentOrder'
          description: A list of service environments that this job queue can use to allocate jobs. All serviceEnvironments
            must have the same type. A job queue can't have both a serviceEnvironmentOrder and a computeEnvironmentOrder field.
        jobQueueType:
          type: string
          enum:
          - EKS
          - ECS
          - ECS_FARGATE
          - SAGEMAKER_TRAINING
          - ECS_MANAGED_INSTANCES
          description: The type of job queue. For service jobs that run on SageMaker Training, this value is SAGEMAKER_TRAINING.
            For regular container jobs, this value is EKS, ECS, or ECS_FARGATE depending on the compute environment.
        tags:
          type: object
          additionalProperties:
            type: string
          description: The tags that you apply to the job queue to help you categorize and organize your resources. Each tag
            consists of a key and an optional value. For more information, see Tagging your Batch resources in Batch User
            Guide.
        jobStateTimeLimitActions:
          type: array
          items:
            $ref: '#/components/schemas/JobStateTimeLimitAction'
          description: 'The set of actions that Batch performs on jobs that remain at the head of the job queue in the specified
            state longer than specified times. Batch will perform each action after maxTimeSeconds has passed. (Note: The
            minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)'
      required:
      - jobQueueName
      - priority
    CreateJobQueueResponse:
      type: object
      properties:
        jobQueueName:
          type: string
          description: The name of the job queue.
        jobQueueArn:
          type: string
          description: The Amazon Resource Name (ARN) of the job queue.
      required:
      - jobQueueName
      - jobQueueArn
    DeleteJobQueueRequest:
      type: object
      properties:
        jobQueue:
          type: string
          description: The short name or full Amazon Resource Name (ARN) of the queue to delete.
      required:
      - jobQueue
    DeleteJobQueueResponse:
      type: object
      properties: {}
    DescribeJobQueuesRequest:
      type: object
      properties:
        jobQueues:
          type: array
          items:
            type: string
          description: A list of up to 100 queue names or full queue Amazon Resource Name (ARN) entries.
        maxResults:
          type: integer
          description: The maximum number of results returned by DescribeJobQueues in paginated output. When this parameter
            is used, DescribeJobQueues only returns maxResults results in a single page and a nextToken response element.
            The remaining results of the initial request can be seen by sending another DescribeJobQueues request with the
            returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then DescribeJobQueues
            returns up to 100 results and a nextToken value if applicable.
        nextToken:
          type: string
          description: The nextToken value returned from a previous paginated DescribeJobQueues request where maxResults was
            used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results
            that returned the nextToken value. This value is null when there are no more results to return. Treat this token
            as an opaque identifier that's only used to retrieve the next items in a list and not for other programmatic purposes.
    DescribeJobQueuesResponse:
      type: object
      properties:
        jobQueues:
          type: array
          items:
            $ref: '#/components/schemas/JobQueueDetail'
          description: The list of job queues.
        nextToken:
          type: string
          description: The nextToken value to include in a future DescribeJobQueues request. When the results of a DescribeJobQueues
            request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when
            there are no more results to return.
    JobQueueDetail:
      type: object
      properties:
        jobQueueName:
          type: string
          description: The job queue name.
        jobQueueArn:
          type: string
          description: The Amazon Resource Name (ARN) of the job queue.
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: Describes the ability of the queue to accept new jobs. If the job queue state is ENABLED, it can accept
            jobs. If the job queue state is DISABLED, new jobs can't be added to the queue, but jobs already in the queue
            can finish.
        schedulingPolicyArn:
          type: string
          description: The Amazon Resource Name (ARN) of the scheduling policy. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name
            . For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy.
        status:
          type: string
          enum:
          - CREATING
          - UPDATING
          - DELETING
          - DELETED
          - VALID
          - INVALID
          description: The status of the job queue (for example, CREATING or VALID).
        statusReason:
          type: string
          description: A short, human-readable string to provide additional details for the current status of the job queue.
        priority:
          type: integer
          description: The priority of the job queue. Job queue priority determines the order that job queues are evaluated
            when multiple queues dispatch jobs within a shared compute environment. A higher value for priority indicates
            a higher priority. Queues are evaluated in cycles, in descending order by priority. For example, a job queue with
            a priority value of 10 is evaluated before a queue with a priority value of 1. All of the compute environments
            must be either Amazon EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT). Amazon EC2 and Fargate compute environments
            can't be mixed. Job queue priority doesn't
        computeEnvironmentOrder:
          type: array
          items:
            $ref: '#/components/schemas/ComputeEnvironmentOrder'
          description: The compute environments that are attached to the job queue and the order that job placement is preferred.
            Compute environments are selected for job placement in ascending order.
        serviceEnvironmentOrder:
          type: array
          items:
            $ref: '#/components/schemas/ServiceEnvironmentOrder'
          description: The order of the service environment associated with the job queue. Job queues with a higher priority
            are evaluated first when associated with the same service environment.
        jobQueueType:
          type: string
          enum:
          - EKS
          - ECS
          - ECS_FARGATE
          - SAGEMAKER_TRAINING
          - ECS_MANAGED_INSTANCES
          description: The type of job queue. For service jobs that run on SageMaker Training, this value is SAGEMAKER_TRAINING.
            For regular container jobs, this value is EKS, ECS, or ECS_FARGATE depending on the compute environment.
        tags:
          type: object
          additionalProperties:
            type: string
          description: The tags that are applied to the job queue. For more information, see Tagging your Batch resources
            in Batch User Guide.
        jobStateTimeLimitActions:
          type: array
          items:
            $ref: '#/components/schemas/JobStateTimeLimitAction'
          description: The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified
            state longer than specified times. Batch will perform each action after maxTimeSeconds has passed.
      required:
      - jobQueueName
      - jobQueueArn
      - state
      - priority
      - computeEnvironmentOrder
    JobStateTimeLimitAction:
      type: object
      properties:
        reason:
          type: string
          description: The reason to log for the action being taken.
        state:
          type: string
          enum:
          - RUNNABLE
          description: The state of the job needed to trigger the action. The only supported value is RUNNABLE.
        maxTimeSeconds:
          type: integer
          description: The approximate amount of time, in seconds, that must pass with the job in the specified state before
            the action is taken. The minimum value is 600 (10 minutes) and the maximum value is 86,400 (24 hours).
        action:
          type: string
          enum:
          - CANCEL
          - TERMINATE
          description: The action to take when a job is at the head of the job queue in the specified state for the specified
            period of time. For job queues connected to a ECS, FARGATE or EKS compute environment, the only supported value
            is CANCEL, which will cancel the job. For job queues connected to a SAGEMAKER_TRAINING service environment, the
            only supported value is TERMINATE, which will terminate the job.
      required:
      - reason
      - state
      - maxTimeSeconds
      - action
    ServerException:
      type: object
      properties:
        message:
          type: string
    ServiceEnvironmentOrder:
      type: object
      properties:
        order:
          type: integer
          description: The order of the service environment. Job queues with a higher priority are evaluated first when associated
            with the same service environment.
        serviceEnvironment:
          type: string
          description: The name or ARN of the service environment.
      required:
      - order
      - serviceEnvironment
    UpdateJobQueueRequest:
      type: object
      properties:
        jobQueue:
          type: string
          description: The name or the Amazon Resource Name (ARN) of the job queue.
        state:
          type: string
          enum:
          - ENABLED
          - DISABLED
          description: Describes the queue's ability to accept new jobs. If the job queue state is ENABLED, it can accept
            jobs. If the job queue state is DISABLED, new jobs can't be added to the queue, but jobs already in the queue
            can finish.
        schedulingPolicyArn:
          type: string
          description: Amazon Resource Name (ARN) of the fair-share scheduling policy. Once a job queue is created, the fair-share
            scheduling policy can be replaced but not removed. The format is aws:Partition:batch:Region:Account:scheduling-policy/Name
            . For example, aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy.
        priority:
          type: integer
          description: The priority of the job queue. Job queues with a higher priority (or a higher integer value for the
            priority parameter) are evaluated first when associated with the same compute environment. Priority is determined
            in descending order. For example, a job queue with a priority value of 10 is given scheduling preference over
            a job queue with a priority value of 1. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate
            (FARGATE or FARGATE_SPOT). EC2 and Fargate compute environments can't be mixed.
        computeEnvironmentOrder:
          type: array
          items:
            $ref: '#/components/schemas/ComputeEnvironmentOrder'
          description: 'Details the set of compute environments mapped to a job queue and their order relative to each other.
            This is one of the parameters used by the job scheduler to determine which compute environment runs a given job.
            Compute environments must be in the VALID state before you can associate them with a job queue. All of the compute
            environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT). EC2 and Fargate compute environments
            can''t be mixed. All compute environments that are associated with a job queue must share the same architecture.
            Batch doesn''t support mixing compute '
        serviceEnvironmentOrder:
          type: array
          items:
            $ref: '#/components/schemas/ServiceEnvironmentOrder'
          description: The order of the service environment associated with the job queue. Job queues with a higher priority
            are evaluated first when associated with the same service environment.
        jobStateTimeLimitActions:
          type: array
          items:
            $ref: '#/components/schemas/JobStateTimeLimitAction'
          description: 'The set of actions that Batch perform on jobs that remain at the head of the job queue in the specified
            state longer than specified times. Batch will perform each action after maxTimeSeconds has passed. (Note: The
            minimum value for maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).)'
      required:
      - jobQueue
    UpdateJobQueueResponse:
      type: object
      properties:
        jobQueueName:
          type: string
          description: The name of the job queue.
        jobQueueArn:
          type: string
          description: The Amazon Resource Name (ARN) of the job queue.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/batch/service/2016-08-10/batch-2016-08-10.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)