Namespace Amazon.Batch.Model
Classes
- ArrayProperties
An object that represents an Batch array job.
- ArrayPropertiesDetail
An object that represents the array properties of a job.
- ArrayPropertiesSummary
An object that represents the array properties of a job.
- AttemptContainerDetail
An object that represents the details of a container that's part of a job attempt.
- AttemptDetail
An object that represents a job attempt.
- AttemptEcsTaskDetails
An object that represents the details of a task.
- AttemptTaskContainerDetails
An object that represents the details of a container that's part of a job attempt.
- BatchPaginatorFactory
Paginators for the Batch service
- CancelJobRequest
Container for the parameters to the CancelJob operation. Cancels a job in an Batch job queue. Jobs that are in the
SUBMITTED
orPENDING
are canceled. A job inRUNNABLE
remains inRUNNABLE
until it reaches the head of the job queue. Then the job status is updated toFAILED
.note
A
PENDING
job is canceled after all dependency jobs are completed. Therefore, it may take longer than expected to cancel a job inPENDING
status.When you try to cancel an array parent job in
PENDING
, Batch attempts to cancel all child jobs. The array parent job is canceled when all child jobs are completed.Jobs that progressed to the
STARTING
orRUNNING
state aren't canceled. However, the API operation still succeeds, even if no job is canceled. These jobs must be terminated with the TerminateJob operation.
- CancelJobResponse
This is the response object from the CancelJob operation.
- ClientException
These errors are usually caused by a client action. One example cause is using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Another cause is specifying an identifier that's not valid.
- ComputeEnvironmentDetail
An object that represents an Batch compute environment.
- ComputeEnvironmentOrder
The order that compute environments are tried in for job placement within a queue. 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. 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
orSPOT
) or Fargate (FARGATE
orFARGATE_SPOT
); Amazon EC2 and Fargate compute environments can't be mixed.note
All compute environments that are associated with a job queue must share the same architecture. Batch doesn't support mixing compute environment architecture types in a single job queue.
- ComputeResource
An object that represents an Batch compute resource. For more information, see Compute environments in the Batch User Guide.
- ComputeResourceUpdate
An object that represents the attributes of a compute environment that can be updated. For more information, see Updating compute environments in the Batch User Guide.
- ContainerDetail
An object that represents the details of a container that's part of a job.
- ContainerOverrides
The overrides that should be sent to a container.
For information about using Batch overrides when you connect event sources to targets, see BatchContainerOverrides.
- ContainerProperties
Container properties are used for Amazon ECS based job definitions. These properties to describe the container that's launched as part of a job.
- ContainerSummary
An object that represents summary details of a container within a job.
- CreateComputeEnvironmentRequest
Container for the parameters to the CreateComputeEnvironment operation. Creates an Batch compute environment. You can create
MANAGED
orUNMANAGED
compute environments.MANAGED
compute environments can use Amazon EC2 or Fargate resources.UNMANAGED
compute environments can only use EC2 resources.In a managed compute environment, Batch manages the capacity and instance types of the compute resources within the environment. This is based on the compute resource specification that you define or the launch template that you specify when you create the compute environment. Either, you can choose to use EC2 On-Demand Instances and EC2 Spot Instances. Or, you can use Fargate and Fargate Spot capacity in your managed compute environment. You can optionally set a maximum price so that Spot Instances only launch when the Spot Instance price is less than a specified percentage of the On-Demand price.
note
Multi-node parallel jobs aren't supported on Spot Instances.
In an unmanaged compute environment, you can manage your own EC2 compute resources and have flexibility with how you configure your compute resources. For example, you can use custom AMIs. However, you must verify that each of your AMIs meet the Amazon ECS container instance AMI specification. For more information, see container instance AMIs in the Amazon Elastic Container Service Developer Guide. After you created your unmanaged compute environment, you can use the DescribeComputeEnvironments operation to find the Amazon ECS cluster that's associated with it. Then, launch your container instances into that Amazon ECS cluster. For more information, see Launching an Amazon ECS container instance in the Amazon Elastic Container Service Developer Guide.
note
To create a compute environment that uses EKS resources, the caller must have permissions to call
eks:DescribeCluster
.note
Batch doesn't automatically upgrade the AMIs in a compute environment after it's created. For example, it also doesn't update the AMIs in your compute environment when a newer version of the Amazon ECS optimized AMI is available. You're responsible for the management of the guest operating system. This includes any updates and security patches. You're also responsible for any additional application software or utilities that you install on the compute resources. There are two ways to use a new AMI for your Batch jobs. The original method is to complete these steps:
-
Create a new compute environment with the new AMI.
-
Add the compute environment to an existing job queue.
-
Remove the earlier compute environment from your job queue.
-
Delete the earlier compute environment.
In April 2022, Batch added enhanced support for updating compute environments. For more information, see Updating compute environments. To use the enhanced updating of compute environments to update AMIs, follow these rules:
-
Either don't set the service role (
serviceRole
) parameter or set it to the AWSBatchServiceRole service-linked role. -
Set the allocation strategy (
allocationStrategy
) parameter toBEST_FIT_PROGRESSIVE
,SPOT_CAPACITY_OPTIMIZED
, orSPOT_PRICE_CAPACITY_OPTIMIZED
. -
Set the update to latest image version (
updateToLatestImageVersion
) parameter totrue
. TheupdateToLatestImageVersion
parameter is used when you update a compute environment. This parameter is ignored when you create a compute environment. -
Don't specify an AMI ID in
imageId
,imageIdOverride
(inec2Configuration
), or in the launch template (launchTemplate
). In that case, Batch selects the latest Amazon ECS optimized AMI that's supported by Batch at the time the infrastructure update is initiated. Alternatively, you can specify the AMI ID in theimageId
orimageIdOverride
parameters, or the launch template identified by theLaunchTemplate
properties. Changing any of these properties starts an infrastructure update. If the AMI ID is specified in the launch template, it can't be replaced by specifying an AMI ID in either theimageId
orimageIdOverride
parameters. It can only be replaced by specifying a different launch template, or if the launch template version is set to$Default
or$Latest
, by setting either a new default version for the launch template (if$Default
) or by adding a new version to the launch template (if$Latest
).
If these rules are followed, any update that starts an infrastructure update causes the AMI ID to be re-selected. If the
version
setting in the launch template (launchTemplate
) is set to$Latest
or$Default
, the latest or default version of the launch template is evaluated up at the time of the infrastructure update, even if thelaunchTemplate
wasn't updated.-
- CreateComputeEnvironmentResponse
This is the response object from the CreateComputeEnvironment operation.
- CreateJobQueueRequest
Container for the parameters to the CreateJobQueue operation. 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.
- CreateJobQueueResponse
This is the response object from the CreateJobQueue operation.
- CreateSchedulingPolicyRequest
Container for the parameters to the CreateSchedulingPolicy operation. Creates an Batch scheduling policy.
- CreateSchedulingPolicyResponse
This is the response object from the CreateSchedulingPolicy operation.
- DeleteComputeEnvironmentRequest
Container for the parameters to the DeleteComputeEnvironment operation. Deletes an Batch compute environment.
Before you can delete a compute environment, you must set its state to
DISABLED
with the UpdateComputeEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation. Compute environments that use Fargate resources must terminate all active jobs on that compute environment before deleting the compute environment. If this isn't done, the compute environment enters an invalid state.
- DeleteComputeEnvironmentResponse
This is the response object from the DeleteComputeEnvironment operation.
- DeleteJobQueueRequest
Container for the parameters to the DeleteJobQueue operation. 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. The jobs are terminated at a rate of about 16 jobs each second.
It's not necessary to disassociate compute environments from a queue before submitting a
DeleteJobQueue
request.
- DeleteJobQueueResponse
This is the response object from the DeleteJobQueue operation.
- DeleteSchedulingPolicyRequest
Container for the parameters to the DeleteSchedulingPolicy operation. Deletes the specified scheduling policy.
You can't delete a scheduling policy that's used in any job queues.
- DeleteSchedulingPolicyResponse
This is the response object from the DeleteSchedulingPolicy operation.
- DeregisterJobDefinitionRequest
Container for the parameters to the DeregisterJobDefinition operation. Deregisters an Batch job definition. Job definitions are permanently deleted after 180 days.
- DeregisterJobDefinitionResponse
This is the response object from the DeregisterJobDefinition operation.
- DescribeComputeEnvironmentsRequest
Container for the parameters to the DescribeComputeEnvironments operation. Describes one or more of your compute environments.
If you're using an unmanaged compute environment, you can use the
DescribeComputeEnvironment
operation to determine theecsClusterArn
that you launch your Amazon ECS container instances into.
- DescribeComputeEnvironmentsResponse
This is the response object from the DescribeComputeEnvironments operation.
- DescribeJobDefinitionsRequest
Container for the parameters to the DescribeJobDefinitions operation. Describes a list of job definitions. You can specify a
status
(such asACTIVE
) to only return job definitions that match that status.
- DescribeJobDefinitionsResponse
This is the response object from the DescribeJobDefinitions operation.
- DescribeJobQueuesRequest
Container for the parameters to the DescribeJobQueues operation. Describes one or more of your job queues.
- DescribeJobQueuesResponse
This is the response object from the DescribeJobQueues operation.
- DescribeJobsRequest
Container for the parameters to the DescribeJobs operation. Describes a list of Batch jobs.
- DescribeJobsResponse
This is the response object from the DescribeJobs operation.
- DescribeSchedulingPoliciesRequest
Container for the parameters to the DescribeSchedulingPolicies operation. Describes one or more of your scheduling policies.
- DescribeSchedulingPoliciesResponse
This is the response object from the DescribeSchedulingPolicies operation.
- Device
An object that represents a container instance host device.
note
This object isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.
- EFSAuthorizationConfig
The authorization configuration details for the Amazon EFS file system.
- EFSVolumeConfiguration
This is used when you're using an Amazon Elastic File System file system for job storage. For more information, see Amazon EFS Volumes in the Batch User Guide.
- Ec2Configuration
Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment. If
Ec2Configuration
isn't specified, the default isECS_AL2
(Amazon Linux 2).note
This object isn't applicable to jobs that are running on Fargate resources.
- EcsProperties
An object that contains the properties for the Amazon ECS resources of a job.
- EcsPropertiesDetail
An object that contains the details for the Amazon ECS resources of a job.
- EcsPropertiesOverride
An object that contains overrides for the Amazon ECS task definition of a job.
- EcsTaskDetails
The details of a task definition that describes the container and volume definitions of an Amazon ECS task.
- EcsTaskProperties
The properties for a task definition that describes the container and volume definitions of an Amazon ECS task. You can specify which Docker images to use, the required resources, and other configurations related to launching the task definition through an Amazon ECS service or task.
- EksAttemptContainerDetail
An object that represents the details for an attempt for a job attempt that an Amazon EKS container runs.
- EksAttemptDetail
An object that represents the details of a job attempt for a job attempt by an Amazon EKS container.
- EksConfiguration
Configuration for the Amazon EKS cluster that supports the Batch compute environment. The cluster must exist before the compute environment can be created.
- EksContainer
EKS container properties are used in job definitions for Amazon EKS based job definitions to describe the properties for a container node in the pod that's launched as part of a job. This can't be specified for Amazon ECS based job definitions.
- EksContainerDetail
The details for container properties that are returned by
DescribeJobs
for jobs that use Amazon EKS.
- EksContainerEnvironmentVariable
An environment variable.
- EksContainerOverride
Object representing any Kubernetes overrides to a job definition that's used in a SubmitJob API operation.
- EksContainerResourceRequirements
The type and amount of resources to assign to a container. The supported resources include
memory
,cpu
, andnvidia.com/gpu
. For more information, see Resource management for pods and containers in the Kubernetes documentation.
- EksContainerSecurityContext
The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation.
- EksContainerVolumeMount
The volume mounts for a container for an Amazon EKS job. For more information about volumes and volume mounts in Kubernetes, see Volumes in the Kubernetes documentation.
- EksEmptyDir
Specifies the configuration of a Kubernetes
emptyDir
volume. AnemptyDir
volume is first created when a pod is assigned to a node. It exists as long as that pod is running on that node. TheemptyDir
volume is initially empty. All containers in the pod can read and write the files in theemptyDir
volume. However, theemptyDir
volume can be mounted at the same or different paths in each container. When a pod is removed from a node for any reason, the data in theemptyDir
is deleted permanently. For more information, see emptyDir in the Kubernetes documentation.
- EksHostPath
Specifies the configuration of a Kubernetes
hostPath
volume. AhostPath
volume mounts an existing file or directory from the host node's filesystem into your pod. For more information, see hostPath in the Kubernetes documentation.
- EksMetadata
Describes and uniquely identifies Kubernetes resources. For example, the compute environment that a pod runs in or the
jobID
for a job running in the pod. For more information, see Understanding Kubernetes Objects in the Kubernetes documentation.
- EksPodProperties
The properties for the pod.
- EksPodPropertiesDetail
The details for the pod.
- EksPodPropertiesOverride
An object that contains overrides for the Kubernetes pod properties of a job.
- EksProperties
An object that contains the properties for the Kubernetes resources of a job.
- EksPropertiesDetail
An object that contains the details for the Kubernetes resources of a job.
- EksPropertiesOverride
An object that contains overrides for the Kubernetes resources of a job.
- EksSecret
Specifies the configuration of a Kubernetes
secret
volume. For more information, see secret in the Kubernetes documentation.
- EksVolume
Specifies an Amazon EKS volume for a job definition.
- EphemeralStorage
The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on Fargate.
- EvaluateOnExit
Specifies an array of up to 5 conditions to be met, and an action to take (
RETRY
orEXIT
) if all conditions are met. If none of theEvaluateOnExit
conditions in aRetryStrategy
match, then the job is retried.
- FairsharePolicy
The fair share policy for a scheduling policy.
- FargatePlatformConfiguration
The platform configuration for jobs that are running on Fargate resources. Jobs that run on Amazon EC2 resources must not specify this parameter.
- FrontOfQueueDetail
Contains a list of the first 100
RUNNABLE
jobs associated to a single job queue.
- FrontOfQueueJobSummary
An object that represents summary details for the first 100
RUNNABLE
jobs in a job queue.
- GetJobQueueSnapshotRequest
Container for the parameters to the GetJobQueueSnapshot operation. Provides a list of the first 100
RUNNABLE
jobs associated to a single job queue.
- GetJobQueueSnapshotResponse
This is the response object from the GetJobQueueSnapshot operation.
- Host
Determine whether your data volume persists on the host container instance and where it's stored. If this parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers that are associated with it stop running.
- ImagePullSecret
References a Kubernetes secret resource. This name of the secret must start and end with an alphanumeric character, is required to be lowercase, can include periods (.) and hyphens (-), and can't contain more than 253 characters.
- JobDefinition
An object that represents an Batch job definition.
- JobDependency
An object that represents an Batch job dependency.
- JobDetail
An object that represents an Batch job.
- JobQueueDetail
An object that represents the details for an Batch job queue.
- JobStateTimeLimitAction
Specifies an action that Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
- JobSummary
An object that represents summary details of a job.
- JobTimeout
An object that represents a job timeout configuration.
- KeyValuePair
A key-value pair object.
- KeyValuesPair
A filter name and value pair that's used to return a more specific list of results from a
ListJobs
API operation.
- LaunchTemplateSpecification
An object that represents a launch template that's associated with a compute resource. You must specify either the launch template ID or launch template name in the request, but not both.
If security groups are specified using both the
securityGroupIds
parameter ofCreateComputeEnvironment
and the launch template, the values in thesecurityGroupIds
parameter ofCreateComputeEnvironment
will be used.note
This object isn't applicable to jobs that are running on Fargate resources.
- LinuxParameters
Linux-specific modifications that are applied to the container, such as details for device mappings.
- ListJobsRequest
Container for the parameters to the ListJobs operation. Returns a list of Batch jobs.
You must specify only one of the following items:
-
A job queue ID to return a list of jobs in that job queue
-
A multi-node parallel job ID to return a list of nodes for that job
-
An array job ID to return a list of the children for that job
You can filter the results by job status with the
jobStatus
parameter. If you don't specify a status, onlyRUNNING
jobs are returned.-
- ListJobsResponse
This is the response object from the ListJobs operation.
- ListSchedulingPoliciesRequest
Container for the parameters to the ListSchedulingPolicies operation. Returns a list of Batch scheduling policies.
- ListSchedulingPoliciesResponse
This is the response object from the ListSchedulingPolicies operation.
- ListTagsForResourceRequest
Container for the parameters to the ListTagsForResource operation. Lists the tags for an Batch resource. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported.
- ListTagsForResourceResponse
This is the response object from the ListTagsForResource operation.
- LogConfiguration
Log configuration options to send to a custom log driver for the container.
- MountPoint
Details for a Docker volume mount point that's 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.
- NetworkConfiguration
The network configuration for jobs that are running on Fargate resources. Jobs that are running on Amazon EC2 resources must not specify this parameter.
- NetworkInterface
An object that represents the elastic network interface for a multi-node parallel job node.
- NodeDetails
An object that represents the details of a multi-node parallel job node.
- NodeOverrides
An object that represents any node overrides to a job definition that's used in a SubmitJob API operation.
note
This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide it for these jobs. Rather, use
containerOverrides
instead.
- NodeProperties
An object that represents the node properties of a multi-node parallel job.
note
Node properties can't be specified for Amazon EKS based job definitions.
- NodePropertiesSummary
An object that represents the properties of a node that's associated with a multi-node parallel job.
- NodePropertyOverride
The object that represents any node overrides to a job definition that's used in a SubmitJob API operation.
- NodeRangeProperty
This is an object that represents the properties of the node range for a multi-node parallel job.
- RegisterJobDefinitionRequest
Container for the parameters to the RegisterJobDefinition operation. Registers an Batch job definition.
- RegisterJobDefinitionResponse
This is the response object from the RegisterJobDefinition operation.
- RepositoryCredentials
The repository credentials for private registry authentication.
- ResourceRequirement
The type and amount of a resource to assign to a container. The supported resources include
GPU
,MEMORY
, andVCPU
.
- RetryStrategy
The retry strategy that's associated with a job. For more information, see Automated job retries in the Batch User Guide.
- RuntimePlatform
An object that represents the compute environment architecture for Batch jobs on Fargate.
- SchedulingPolicyDetail
An object that represents a scheduling policy.
- SchedulingPolicyListingDetail
An object that contains the details of a scheduling policy that's returned in a
ListSchedulingPolicy
action.
- Secret
An object that represents the secret to expose to your container. Secrets can be exposed to a container in the following ways:
-
To inject sensitive data into your containers as environment variables, use the
secrets
container definition parameter. -
To reference sensitive information in the log configuration of a container, use the
secretOptions
container definition parameter.
For more information, see Specifying sensitive data in the Batch User Guide.
-
- ServerException
These errors are usually caused by a server issue.
- ShareAttributes
Specifies the weights for the fair share identifiers for the fair share policy. Fair share identifiers that aren't included have a default weight of
1.0
.
- SubmitJobRequest
Container for the parameters to the SubmitJob operation. Submits an Batch job from a job definition. Parameters that are specified during SubmitJob override parameters defined in the job definition. vCPU and memory requirements that are specified in the
resourceRequirements
objects in the job definition are the exception. They can't be overridden this way using thememory
andvcpus
parameters. Rather, you must specify updates to job definition parameters in aresourceRequirements
object that's included in thecontainerOverrides
parameter.note
Job queues with a scheduling policy are limited to 500 active fair share identifiers at a time.
Jobs that run on Fargate resources can't be guaranteed to run for more than 14 days. This is because, after 14 days, Fargate resources might become unavailable and job might be terminated.
- SubmitJobResponse
This is the response object from the SubmitJob operation.
- TagResourceRequest
Container for the parameters to the TagResource operation. Associates the specified tags to a resource with the specified
resourceArn
. If existing tags on a resource aren't specified in the request parameters, they aren't changed. When a resource is deleted, the tags that are associated with that resource are deleted as well. Batch resources that support tags are compute environments, jobs, job definitions, job queues, and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported.
- TagResourceResponse
This is the response object from the TagResource operation.
- TaskContainerDependency
A list of containers that this task depends on.
- TaskContainerDetails
The details for the container in this task attempt.
- TaskContainerOverrides
The overrides that should be sent to a container.
For information about using Batch overrides when you connect event sources to targets, see BatchContainerOverrides.
- TaskContainerProperties
Container properties are used for Amazon ECS-based job definitions. These properties to describe the container that's launched as part of a job.
- TaskPropertiesOverride
An object that contains overrides for the task definition of a job.
- TerminateJobRequest
Container for the parameters to the TerminateJob operation. Terminates a job in a job queue. Jobs that are in the
STARTING
orRUNNING
state are terminated, which causes them to transition toFAILED
. Jobs that have not progressed to theSTARTING
state are cancelled.
- TerminateJobResponse
This is the response object from the TerminateJob operation.
- Tmpfs
The container path, mount options, and size of the
tmpfs
mount.note
This object isn't applicable to jobs that are running on Fargate resources.
- Ulimit
The
ulimit
settings to pass to the container. For more information, see Ulimit.note
This object isn't applicable to jobs that are running on Fargate resources.
- UntagResourceRequest
Container for the parameters to the UntagResource operation. Deletes specified tags from an Batch resource.
- UntagResourceResponse
This is the response object from the UntagResource operation.
- UpdateComputeEnvironmentRequest
Container for the parameters to the UpdateComputeEnvironment operation. Updates an Batch compute environment.
- UpdateComputeEnvironmentResponse
This is the response object from the UpdateComputeEnvironment operation.
- UpdateJobQueueRequest
Container for the parameters to the UpdateJobQueue operation. Updates a job queue.
- UpdateJobQueueResponse
This is the response object from the UpdateJobQueue operation.
- UpdatePolicy
Specifies the infrastructure update policy for the compute environment. For more information about infrastructure updates, see Updating compute environments in the Batch User Guide.
- UpdateSchedulingPolicyRequest
Container for the parameters to the UpdateSchedulingPolicy operation. Updates a scheduling policy.
- UpdateSchedulingPolicyResponse
This is the response object from the UpdateSchedulingPolicy operation.
- Volume
A data volume that's used in a job's container properties.
Interfaces
- IBatchPaginatorFactory
Paginators for the Batch service
- IDescribeComputeEnvironmentsPaginator
Paginator for the DescribeComputeEnvironments operation
- IDescribeJobDefinitionsPaginator
Paginator for the DescribeJobDefinitions operation
- IDescribeJobQueuesPaginator
Paginator for the DescribeJobQueues operation
- IListJobsPaginator
Paginator for the ListJobs operation
- IListSchedulingPoliciesPaginator
Paginator for the ListSchedulingPolicies operation