[ aws . batch ]

describe-job-definitions

Description

Describes a list of job definitions. You can specify a status (such as ACTIVE ) to only return job definitions that match that status.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

describe-job-definitions is a paginated operation. Multiple API calls may be issued in order to retrieve the entire data set of results. You can disable pagination by providing the --no-paginate argument. When using --output text and the --query argument on a paginated response, the --query argument must extract data from the results of the following query expressions: jobDefinitions

Synopsis

  describe-job-definitions
[--job-definitions <value>]
[--job-definition-name <value>]
[--status <value>]
[--cli-input-json | --cli-input-yaml]
[--starting-token <value>]
[--page-size <value>]
[--max-items <value>]
[--generate-cli-skeleton <value>]
[--cli-auto-prompt <value>]

Options

--job-definitions (list)

A list of up to 100 job definition names or full Amazon Resource Name (ARN) entries.

(string)

Syntax:

"string" "string" ...

--job-definition-name (string)

The name of the job definition to describe.

--status (string)

The status with which to filter job definitions.

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--starting-token (string)

A token to specify where to start paginating. This is the NextToken from a previously truncated response.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

--page-size (integer)

The size of each page to get in the AWS service call. This does not affect the number of items returned in the command’s output. Setting a smaller page size results in more calls to the AWS service, retrieving fewer items in each call. This can help prevent the AWS service calls from timing out.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

--max-items (integer)

The total number of items to return in the command’s output. If the total number of items available is more than the value specified, a NextToken is provided in the command’s output. To resume pagination, provide the NextToken value in the starting-token argument of a subsequent command. Do not use the NextToken response element directly outside of the AWS CLI.

For usage examples, see Pagination in the AWS Command Line Interface User Guide .

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

--cli-auto-prompt (boolean) Automatically prompt for CLI input parameters.

See ‘aws help’ for descriptions of global parameters.

Examples

To describe active job definitions

This example describes all of your active job definitions.

Command:

aws batch describe-job-definitions --status ACTIVE

Output:

{
    "jobDefinitions": [
        {
            "status": "ACTIVE",
            "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep60:1",
            "containerProperties": {
                "mountPoints": [],
                "parameters": {},
                "image": "busybox",
                "environment": {},
                "vcpus": 1,
                "command": [
                    "sleep",
                    "60"
                ],
                "volumes": [],
                "memory": 128,
                "ulimits": []
            },
            "type": "container",
            "jobDefinitionName": "sleep60",
            "revision": 1
        }
    ]
}

Output

jobDefinitions -> (list)

The list of job definitions.

(structure)

An object representing an AWS Batch job definition.

jobDefinitionName -> (string)

The name of the job definition.

jobDefinitionArn -> (string)

The Amazon Resource Name (ARN) for the job definition.

revision -> (integer)

The revision of the job definition.

status -> (string)

The status of the job definition.

type -> (string)

The type of job definition.

parameters -> (map)

Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see Job Definition Parameters in the AWS Batch User Guide .

key -> (string)

value -> (string)

retryStrategy -> (structure)

The retry strategy to use for failed jobs that are submitted with this job definition.

attempts -> (integer)

The number of times to move a job to the RUNNABLE status. You may specify between 1 and 10 attempts. If the value of attempts is greater than one, the job is retried on failure the same number of attempts as the value.

containerProperties -> (structure)

An object with various properties specific to container-based jobs.

image -> (string)

The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with `` repository-url /image :tag `` . Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to Image in the Create a container section of the Docker Remote API and the IMAGE parameter of docker run .

  • Images in Amazon ECR repositories use the full registry and repository URI (for example, 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name> ).

  • Images in official repositories on Docker Hub use a single name (for example, ubuntu or mongo ).

  • Images in other repositories on Docker Hub are qualified with an organization name (for example, amazon/amazon-ecs-agent ).

  • Images in other online repositories are qualified further by a domain name (for example, quay.io/assemblyline/ubuntu ).

vcpus -> (integer)

The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a container section of the Docker Remote API and the --cpu-shares option to docker run . Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU.

memory -> (integer)

The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed. This parameter maps to Memory in the Create a container section of the Docker Remote API and the --memory option to docker run . You must specify at least 4 MiB of memory for a job.

Note

If you are trying to maximize your resource utilization by providing your jobs as much memory as possible for a particular instance type, see Memory Management in the AWS Batch User Guide .

command -> (list)

The command that is passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to docker run . For more information, see https://docs.docker.com/engine/reference/builder/#cmd .

(string)

jobRoleArn -> (string)

The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions.

volumes -> (list)

A list of data volumes used in a job.

(structure)

A data volume used in a job’s container properties.

host -> (structure)

The contents of the host parameter determine whether your data volume persists on the host container instance and where it is stored. If the host parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data is not guaranteed to persist after the containers associated with it stop running.

sourcePath -> (string)

The path on the host container instance that is presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location does not exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.

name -> (string)

The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. This name is referenced in the sourceVolume parameter of container definition mountPoints .

environment -> (list)

The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run .

Warning

We do not recommend using plaintext environment variables for sensitive information, such as credential data.

Note

Environment variables must not start with AWS_BATCH ; this naming convention is reserved for variables that are set by the AWS Batch service.

(structure)

A key-value pair object.

name -> (string)

The name of the key-value pair. For environment variables, this is the name of the environment variable.

value -> (string)

The value of the key-value pair. For environment variables, this is the value of the environment variable.

mountPoints -> (list)

The mount points for data volumes in your container. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run .

(structure)

Details on a Docker volume mount point that is used in a job’s container properties. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run.

containerPath -> (string)

The path on the container at which to mount the host volume.

readOnly -> (boolean)

If this value is true , the container has read-only access to the volume; otherwise, the container can write to the volume. The default value is false .

sourceVolume -> (string)

The name of the volume to mount.

readonlyRootFilesystem -> (boolean)

When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote API and the --read-only option to docker run .

privileged -> (boolean)

When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the Docker Remote API and the --privileged option to docker run .

ulimits -> (list)

A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a container section of the Docker Remote API and the --ulimit option to docker run .

(structure)

The ulimit settings to pass to the container.

hardLimit -> (integer)

The hard limit for the ulimit type.

name -> (string)

The type of the ulimit .

softLimit -> (integer)

The soft limit for the ulimit type.

user -> (string)

The user name to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run .

instanceType -> (string)

The instance type to use for a multi-node parallel job. Currently all node groups in a multi-node parallel job must use the same instance type. This parameter is not valid for single-node container jobs.

resourceRequirements -> (list)

The type and amount of a resource to assign to a container. Currently, the only supported resource is GPU .

(structure)

The type and amount of a resource to assign to a container. Currently, the only supported resource type is GPU .

value -> (string)

The number of physical GPUs to reserve for the container. The number of GPUs reserved for all containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.

type -> (string)

The type of resource to assign to a container. Currently, the only supported resource type is GPU .

linuxParameters -> (structure)

Linux-specific modifications that are applied to the container, such as details for device mappings.

devices -> (list)

Any host devices to expose to the container. This parameter maps to Devices in the Create a container section of the Docker Remote API and the --device option to docker run .

(structure)

An object representing a container instance host device.

hostPath -> (string)

The path for the device on the host container instance.

containerPath -> (string)

The path inside the container at which to expose the host device. By default the hostPath value is used.

permissions -> (list)

The explicit permissions to provide to the container for the device. By default, the container has permissions for read , write , and mknod for the device.

(string)

timeout -> (structure)

The timeout configuration for jobs that are submitted with this job definition. You can specify a timeout duration after which AWS Batch terminates your jobs if they have not finished.

attemptDurationSeconds -> (integer)

The time duration in seconds (measured from the job attempt’s startedAt timestamp) after which AWS Batch terminates your jobs if they have not finished.

nodeProperties -> (structure)

An object with various properties specific to multi-node parallel jobs.

numNodes -> (integer)

The number of nodes associated with a multi-node parallel job.

mainNode -> (integer)

Specifies the node index for the main node of a multi-node parallel job. This node index value must be fewer than the number of nodes.

nodeRangeProperties -> (list)

A list of node ranges and their properties associated with a multi-node parallel job.

(structure)

An object representing the properties of the node range for a multi-node parallel job.

targetNodes -> (string)

The range of nodes, using node index values. A range of 0:3 indicates nodes with index values of 0 through 3 . If the starting range value is omitted (:n ), then 0 is used to start the range. If the ending range value is omitted (n: ), then the highest possible node index is used to end the range. Your accumulative node ranges must account for all nodes (0:n). You may nest node ranges, for example 0:10 and 4:5, in which case the 4:5 range properties override the 0:10 properties.

container -> (structure)

The container details for the node range.

image -> (string)

The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with `` repository-url /image :tag `` . Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to Image in the Create a container section of the Docker Remote API and the IMAGE parameter of docker run .

  • Images in Amazon ECR repositories use the full registry and repository URI (for example, 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name> ).

  • Images in official repositories on Docker Hub use a single name (for example, ubuntu or mongo ).

  • Images in other repositories on Docker Hub are qualified with an organization name (for example, amazon/amazon-ecs-agent ).

  • Images in other online repositories are qualified further by a domain name (for example, quay.io/assemblyline/ubuntu ).

vcpus -> (integer)

The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Create a container section of the Docker Remote API and the --cpu-shares option to docker run . Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU.

memory -> (integer)

The hard limit (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed. This parameter maps to Memory in the Create a container section of the Docker Remote API and the --memory option to docker run . You must specify at least 4 MiB of memory for a job.

Note

If you are trying to maximize your resource utilization by providing your jobs as much memory as possible for a particular instance type, see Memory Management in the AWS Batch User Guide .

command -> (list)

The command that is passed to the container. This parameter maps to Cmd in the Create a container section of the Docker Remote API and the COMMAND parameter to docker run . For more information, see https://docs.docker.com/engine/reference/builder/#cmd .

(string)

jobRoleArn -> (string)

The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWS permissions.

volumes -> (list)

A list of data volumes used in a job.

(structure)

A data volume used in a job’s container properties.

host -> (structure)

The contents of the host parameter determine whether your data volume persists on the host container instance and where it is stored. If the host parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data is not guaranteed to persist after the containers associated with it stop running.

sourcePath -> (string)

The path on the host container instance that is presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If this parameter contains a file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the source path location does not exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.

name -> (string)

The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. This name is referenced in the sourceVolume parameter of container definition mountPoints .

environment -> (list)

The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the Docker Remote API and the --env option to docker run .

Warning

We do not recommend using plaintext environment variables for sensitive information, such as credential data.

Note

Environment variables must not start with AWS_BATCH ; this naming convention is reserved for variables that are set by the AWS Batch service.

(structure)

A key-value pair object.

name -> (string)

The name of the key-value pair. For environment variables, this is the name of the environment variable.

value -> (string)

The value of the key-value pair. For environment variables, this is the value of the environment variable.

mountPoints -> (list)

The mount points for data volumes in your container. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run .

(structure)

Details on a Docker volume mount point that is used in a job’s container properties. This parameter maps to Volumes in the Create a container section of the Docker Remote API and the --volume option to docker run.

containerPath -> (string)

The path on the container at which to mount the host volume.

readOnly -> (boolean)

If this value is true , the container has read-only access to the volume; otherwise, the container can write to the volume. The default value is false .

sourceVolume -> (string)

The name of the volume to mount.

readonlyRootFilesystem -> (boolean)

When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote API and the --read-only option to docker run .

privileged -> (boolean)

When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user). This parameter maps to Privileged in the Create a container section of the Docker Remote API and the --privileged option to docker run .

ulimits -> (list)

A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a container section of the Docker Remote API and the --ulimit option to docker run .

(structure)

The ulimit settings to pass to the container.

hardLimit -> (integer)

The hard limit for the ulimit type.

name -> (string)

The type of the ulimit .

softLimit -> (integer)

The soft limit for the ulimit type.

user -> (string)

The user name to use inside the container. This parameter maps to User in the Create a container section of the Docker Remote API and the --user option to docker run .

instanceType -> (string)

The instance type to use for a multi-node parallel job. Currently all node groups in a multi-node parallel job must use the same instance type. This parameter is not valid for single-node container jobs.

resourceRequirements -> (list)

The type and amount of a resource to assign to a container. Currently, the only supported resource is GPU .

(structure)

The type and amount of a resource to assign to a container. Currently, the only supported resource type is GPU .

value -> (string)

The number of physical GPUs to reserve for the container. The number of GPUs reserved for all containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.

type -> (string)

The type of resource to assign to a container. Currently, the only supported resource type is GPU .

linuxParameters -> (structure)

Linux-specific modifications that are applied to the container, such as details for device mappings.

devices -> (list)

Any host devices to expose to the container. This parameter maps to Devices in the Create a container section of the Docker Remote API and the --device option to docker run .

(structure)

An object representing a container instance host device.

hostPath -> (string)

The path for the device on the host container instance.

containerPath -> (string)

The path inside the container at which to expose the host device. By default the hostPath value is used.

permissions -> (list)

The explicit permissions to provide to the container for the device. By default, the container has permissions for read , write , and mknod for the device.

(string)

nextToken -> (string)

The nextToken value to include in a future DescribeJobDefinitions request. When the results of a DescribeJobDefinitions 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.