AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Classes

NameDescription
Class ArrayProperties

An object that represents an Batch array job.

Class ArrayPropertiesDetail

An object that represents the array properties of a job.

Class ArrayPropertiesSummary

An object that represents the array properties of a job.

Class AttemptContainerDetail

An object that represents the details of a container that's part of a job attempt.

Class AttemptDetail

An object that represents a job attempt.

Class AttemptEcsTaskDetails

An object that represents the details of a task.

Class AttemptTaskContainerDetails

An object that represents the details of a container that's part of a job attempt.

Class BatchPaginatorFactory

Paginators for the Batch service

Class CancelJobRequest

Container for the parameters to the CancelJob operation. Cancels a job in an Batch job queue. Jobs that are in the SUBMITTED or PENDING are canceled. A job inRUNNABLE remains in RUNNABLE until it reaches the head of the job queue. Then the job status is updated to FAILED.

A PENDING job is canceled after all dependency jobs are completed. Therefore, it may take longer than expected to cancel a job in PENDING 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 or RUNNING 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.

Class CancelJobResponse

This is the response object from the CancelJob operation.

Class 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.

Class ComputeEnvironmentDetail

An object that represents an Batch compute environment.

Class 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 or SPOT) or Fargate (FARGATE or FARGATE_SPOT); Amazon 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 environment architecture types in a single job queue.

Class ComputeResource

An object that represents an Batch compute resource. For more information, see Compute environments in the Batch User Guide.

Class 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.

Class ContainerDetail

An object that represents the details of a container that's part of a job.

Class 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.

Class 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.

Class ContainerSummary

An object that represents summary details of a container within a job.

Class CreateComputeEnvironmentRequest

Container for the parameters to the CreateComputeEnvironment operation. Creates an Batch compute environment. You can create MANAGED or UNMANAGED 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.

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.

To create a compute environment that uses EKS resources, the caller must have permissions to call eks:DescribeCluster.

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:

  1. Create a new compute environment with the new AMI.

  2. Add the compute environment to an existing job queue.

  3. Remove the earlier compute environment from your job queue.

  4. 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 to BEST_FIT_PROGRESSIVE, SPOT_CAPACITY_OPTIMIZED, or SPOT_PRICE_CAPACITY_OPTIMIZED.

  • Set the update to latest image version (updateToLatestImageVersion) parameter to true. The updateToLatestImageVersion 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 (in ec2Configuration), 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 the imageId or imageIdOverride parameters, or the launch template identified by the LaunchTemplate 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 the imageId or imageIdOverride 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 the launchTemplate wasn't updated.

Class CreateComputeEnvironmentResponse

This is the response object from the CreateComputeEnvironment operation.

Class 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.

Class CreateJobQueueResponse

This is the response object from the CreateJobQueue operation.

Class CreateSchedulingPolicyRequest

Container for the parameters to the CreateSchedulingPolicy operation. Creates an Batch scheduling policy.

Class CreateSchedulingPolicyResponse

This is the response object from the CreateSchedulingPolicy operation.

Class 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.

Class DeleteComputeEnvironmentResponse

This is the response object from the DeleteComputeEnvironment operation.

Class 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.

Class DeleteJobQueueResponse

This is the response object from the DeleteJobQueue operation.

Class 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.

Class DeleteSchedulingPolicyResponse

This is the response object from the DeleteSchedulingPolicy operation.

Class DeregisterJobDefinitionRequest

Container for the parameters to the DeregisterJobDefinition operation. Deregisters an Batch job definition. Job definitions are permanently deleted after 180 days.

Class DeregisterJobDefinitionResponse

This is the response object from the DeregisterJobDefinition operation.

Class 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 the ecsClusterArn that you launch your Amazon ECS container instances into.

Class DescribeComputeEnvironmentsResponse

This is the response object from the DescribeComputeEnvironments operation.

Class DescribeJobDefinitionsRequest

Container for the parameters to the DescribeJobDefinitions operation. Describes a list of job definitions. You can specify a status (such as ACTIVE) to only return job definitions that match that status.

Class DescribeJobDefinitionsResponse

This is the response object from the DescribeJobDefinitions operation.

Class DescribeJobQueuesRequest

Container for the parameters to the DescribeJobQueues operation. Describes one or more of your job queues.

Class DescribeJobQueuesResponse

This is the response object from the DescribeJobQueues operation.

Class DescribeJobsRequest

Container for the parameters to the DescribeJobs operation. Describes a list of Batch jobs.

Class DescribeJobsResponse

This is the response object from the DescribeJobs operation.

Class DescribeSchedulingPoliciesRequest

Container for the parameters to the DescribeSchedulingPolicies operation. Describes one or more of your scheduling policies.

Class DescribeSchedulingPoliciesResponse

This is the response object from the DescribeSchedulingPolicies operation.

Class Device

An object that represents a container instance host device.

This object isn't applicable to jobs that are running on Fargate resources and shouldn't be provided.

Class Ec2Configuration

Provides information used to select Amazon Machine Images (AMIs) for instances in the compute environment. If Ec2Configuration isn't specified, the default is ECS_AL2 (Amazon Linux 2).

This object isn't applicable to jobs that are running on Fargate resources.

Class EcsProperties

An object that contains the properties for the Amazon ECS resources of a job.

Class EcsPropertiesDetail

An object that contains the details for the Amazon ECS resources of a job.

Class EcsPropertiesOverride

An object that contains overrides for the Amazon ECS task definition of a job.

Class EcsTaskDetails

The details of a task definition that describes the container and volume definitions of an Amazon ECS task.

Class 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.

Class EFSAuthorizationConfig

The authorization configuration details for the Amazon EFS file system.

Class 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.

Class EksAttemptContainerDetail

An object that represents the details for an attempt for a job attempt that an Amazon EKS container runs.

Class EksAttemptDetail

An object that represents the details of a job attempt for a job attempt by an Amazon EKS container.

Class EksConfiguration

Configuration for the Amazon EKS cluster that supports the Batch compute environment. The cluster must exist before the compute environment can be created.

Class 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.

Class EksContainerDetail

The details for container properties that are returned by DescribeJobs for jobs that use Amazon EKS.

Class EksContainerEnvironmentVariable

An environment variable.

Class EksContainerOverride

Object representing any Kubernetes overrides to a job definition that's used in a SubmitJob API operation.

Class EksContainerResourceRequirements

The type and amount of resources to assign to a container. The supported resources include memory, cpu, and nvidia.com/gpu. For more information, see Resource management for pods and containers in the Kubernetes documentation.

Class EksContainerSecurityContext

The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation.

Class 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.

Class EksEmptyDir

Specifies the configuration of a Kubernetes emptyDir volume. An emptyDir volume is first created when a pod is assigned to a node. It exists as long as that pod is running on that node. The emptyDir volume is initially empty. All containers in the pod can read and write the files in the emptyDir volume. However, the emptyDir 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 the emptyDir is deleted permanently. For more information, see emptyDir in the Kubernetes documentation.

Class EksHostPath

Specifies the configuration of a Kubernetes hostPath volume. A hostPath 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.

Class 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.

Class EksPodProperties

The properties for the pod.

Class EksPodPropertiesDetail

The details for the pod.

Class EksPodPropertiesOverride

An object that contains overrides for the Kubernetes pod properties of a job.

Class EksProperties

An object that contains the properties for the Kubernetes resources of a job.

Class EksPropertiesDetail

An object that contains the details for the Kubernetes resources of a job.

Class EksPropertiesOverride

An object that contains overrides for the Kubernetes resources of a job.

Class EksSecret

Specifies the configuration of a Kubernetes secret volume. For more information, see secret in the Kubernetes documentation.

Class EksVolume

Specifies an Amazon EKS volume for a job definition.

Class 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.

Class EvaluateOnExit

Specifies an array of up to 5 conditions to be met, and an action to take (RETRY or EXIT) if all conditions are met. If none of the EvaluateOnExit conditions in a RetryStrategy match, then the job is retried.

Class FairsharePolicy

The fair share policy for a scheduling policy.

Class FargatePlatformConfiguration

The platform configuration for jobs that are running on Fargate resources. Jobs that run on Amazon EC2 resources must not specify this parameter.

Class 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.

Class 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.

Class JobDefinition

An object that represents an Batch job definition.

Class JobDependency

An object that represents an Batch job dependency.

Class JobDetail

An object that represents an Batch job.

Class JobQueueDetail

An object that represents the details for an Batch job queue.

Class 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.

Class JobSummary

An object that represents summary details of a job.

Class JobTimeout

An object that represents a job timeout configuration.

Class KeyValuePair

A key-value pair object.

Class KeyValuesPair

A filter name and value pair that's used to return a more specific list of results from a ListJobs API operation.

Class 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 of CreateComputeEnvironment and the launch template, the values in the securityGroupIds parameter of CreateComputeEnvironment will be used.

This object isn't applicable to jobs that are running on Fargate resources.

Class LinuxParameters

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

Class 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, only RUNNING jobs are returned.

Class ListJobsResponse

This is the response object from the ListJobs operation.

Class ListSchedulingPoliciesRequest

Container for the parameters to the ListSchedulingPolicies operation. Returns a list of Batch scheduling policies.

Class ListSchedulingPoliciesResponse

This is the response object from the ListSchedulingPolicies operation.

Class 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.

Class ListTagsForResourceResponse

This is the response object from the ListTagsForResource operation.

Class LogConfiguration

Log configuration options to send to a custom log driver for the container.

Class 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.

Class 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.

Class NetworkInterface

An object that represents the elastic network interface for a multi-node parallel job node.

Class NodeDetails

An object that represents the details of a multi-node parallel job node.

Class NodeOverrides

An object that represents any node overrides to a job definition that's used in a SubmitJob API operation.

This parameter isn't applicable to jobs that are running on Fargate resources. Don't provide it for these jobs. Rather, use containerOverrides instead.

Class NodeProperties

An object that represents the node properties of a multi-node parallel job.

Node properties can't be specified for Amazon EKS based job definitions.

Class NodePropertiesSummary

An object that represents the properties of a node that's associated with a multi-node parallel job.

Class NodePropertyOverride

The object that represents any node overrides to a job definition that's used in a SubmitJob API operation.

Class NodeRangeProperty

This is an object that represents the properties of the node range for a multi-node parallel job.

Class RegisterJobDefinitionRequest

Container for the parameters to the RegisterJobDefinition operation. Registers an Batch job definition.

Class RegisterJobDefinitionResponse

This is the response object from the RegisterJobDefinition operation.

Class RepositoryCredentials

The repository credentials for private registry authentication.

Class ResourceRequirement

The type and amount of a resource to assign to a container. The supported resources include GPU, MEMORY, and VCPU.

Class RetryStrategy

The retry strategy that's associated with a job. For more information, see Automated job retries in the Batch User Guide.

Class RuntimePlatform

An object that represents the compute environment architecture for Batch jobs on Fargate.

Class SchedulingPolicyDetail

An object that represents a scheduling policy.

Class SchedulingPolicyListingDetail

An object that contains the details of a scheduling policy that's returned in a ListSchedulingPolicy action.

Class 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.

Class ServerException

These errors are usually caused by a server issue.

Class 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.

Class 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 the memory and vcpus parameters. Rather, you must specify updates to job definition parameters in a resourceRequirements object that's included in the containerOverrides parameter.

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.

Class SubmitJobResponse

This is the response object from the SubmitJob operation.

Class 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.

Class TagResourceResponse

This is the response object from the TagResource operation.

Class TaskContainerDependency

A list of containers that this task depends on.

Class TaskContainerDetails

The details for the container in this task attempt.

Class 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.

Class 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.

Class TaskPropertiesOverride

An object that contains overrides for the task definition of a job.

Class TerminateJobRequest

Container for the parameters to the TerminateJob operation. Terminates a job in a job queue. Jobs that are in the STARTING or RUNNING state are terminated, which causes them to transition to FAILED. Jobs that have not progressed to the STARTING state are cancelled.

Class TerminateJobResponse

This is the response object from the TerminateJob operation.

Class Tmpfs

The container path, mount options, and size of the tmpfs mount.

This object isn't applicable to jobs that are running on Fargate resources.

Class Ulimit

The ulimit settings to pass to the container. For more information, see Ulimit.

This object isn't applicable to jobs that are running on Fargate resources.

Class UntagResourceRequest

Container for the parameters to the UntagResource operation. Deletes specified tags from an Batch resource.

Class UntagResourceResponse

This is the response object from the UntagResource operation.

Class UpdateComputeEnvironmentRequest

Container for the parameters to the UpdateComputeEnvironment operation. Updates an Batch compute environment.

Class UpdateComputeEnvironmentResponse

This is the response object from the UpdateComputeEnvironment operation.

Class UpdateJobQueueRequest

Container for the parameters to the UpdateJobQueue operation. Updates a job queue.

Class UpdateJobQueueResponse

This is the response object from the UpdateJobQueue operation.

Class 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.

Class UpdateSchedulingPolicyRequest

Container for the parameters to the UpdateSchedulingPolicy operation. Updates a scheduling policy.

Class UpdateSchedulingPolicyResponse

This is the response object from the UpdateSchedulingPolicy operation.

Class Volume

A data volume that's used in a job's container properties.

Interfaces

NameDescription
Interface IBatchPaginatorFactory

Paginators for the Batch service

Interface IDescribeComputeEnvironmentsPaginator

Paginator for the DescribeComputeEnvironments operation

Interface IDescribeJobDefinitionsPaginator

Paginator for the DescribeJobDefinitions operation

Interface IDescribeJobQueuesPaginator

Paginator for the DescribeJobQueues operation

Interface IListJobsPaginator

Paginator for the ListJobs operation

Interface IListSchedulingPoliciesPaginator

Paginator for the ListSchedulingPolicies operation