AWS Tools for Windows PowerShell
Command 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.

Synopsis

Calls the AWS Batch SubmitJob API operation.

Syntax

Submit-BATJob
-JobName <String>
-RetryStrategy_Attempt <Int32>
-ContainerOverrides_Command <String[]>
-PodProperties_Container <EksContainerOverride[]>
-DependsOn <JobDependency[]>
-ContainerOverrides_Environment <KeyValuePair[]>
-RetryStrategy_EvaluateOnExit <EvaluateOnExit[]>
-PodProperties_InitContainer <EksContainerOverride[]>
-ContainerOverrides_InstanceType <String>
-JobDefinition <String>
-JobQueue <String>
-Metadata_Label <Hashtable>
-NodeOverrides_NodePropertyOverride <NodePropertyOverride[]>
-NodeOverrides_NumNode <Int32>
-Parameter <Hashtable>
-PropagateTag <Boolean>
-ContainerOverrides_ResourceRequirement <ResourceRequirement[]>
-SchedulingPriorityOverride <Int32>
-ShareIdentifier <String>
-ArrayProperties_Size <Int32>
-Tag <Hashtable>
-EcsPropertiesOverride_TaskProperty <TaskPropertiesOverride[]>
-Timeout <JobTimeout>
-ContainerOverrides_Memory <Int32>
-ContainerOverrides_Vcpus <Int32>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonBatchConfig>

Description

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.

Parameters

-ArrayProperties_Size <Int32>
The size of the array job.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientConfig <AmazonBatchConfig>
Amazon.PowerShell.Cmdlets.BAT.AmazonBatchClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContainerOverrides_Command <String[]>
The command to send to the container that overrides the default command from the Docker image or the job definition.This parameter can't contain an empty string.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContainerOverrides_Environment <KeyValuePair[]>
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition.Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for variables that Batch sets.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContainerOverrides_InstanceType <String>
The instance type to use for a multi-node parallel job.This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and shouldn't be provided.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContainerOverrides_Memory <Int32>
This parameter is deprecated, use resourceRequirements to override the memory requirements specified in the job definition. It's not supported for jobs running on Fargate resources. For jobs that run on Amazon EC2 resources, it overrides the memory parameter set in the job definition, but doesn't override any memory requirement that's specified in the resourceRequirements structure in the job definition. To override memory requirements that are specified in the resourceRequirements structure in the job definition, resourceRequirements must be specified in the SubmitJob request, with type set to MEMORY and value set to the new value. For more information, see Can't override job definition resource requirements in the Batch User Guide.This parameter is deprecated.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ContainerOverrides_ResourceRequirement <ResourceRequirement[]>
The type and amount of resources to assign to a container. This overrides the settings in the job definition. The supported resources include GPU, MEMORY, and VCPU.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesContainerOverrides_ResourceRequirements
-ContainerOverrides_Vcpus <Int32>
This parameter is deprecated, use resourceRequirements to override the vcpus parameter that's set in the job definition. It's not supported for jobs running on Fargate resources. For jobs that run on Amazon EC2 resources, it overrides the vcpus parameter set in the job definition, but doesn't override any vCPU requirement specified in the resourceRequirements structure in the job definition. To override vCPU requirements that are specified in the resourceRequirements structure in the job definition, resourceRequirements must be specified in the SubmitJob request, with type set to VCPU and value set to the new value. For more information, see Can't override job definition resource requirements in the Batch User Guide.This parameter is deprecated.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DependsOn <JobDependency[]>
A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a SEQUENTIAL type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an N_TO_N type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EcsPropertiesOverride_TaskProperty <TaskPropertiesOverride[]>
The overrides for the Amazon ECS task definition of a job.This object is currently limited to one element.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesEcsPropertiesOverride_TaskProperties
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-JobDefinition <String>
The job definition used by this job. This value can be one of definition-name, definition-name:revision, or the Amazon Resource Name (ARN) for the job definition, with or without the revision (arn:aws:batch:region:account:job-definition/definition-name:revision, or arn:aws:batch:region:account:job-definition/definition-name).If the revision is not specified, then the latest active revision is used.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-JobName <String>
The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-JobQueue <String>
The job queue where the job is submitted. You can specify either the name or the Amazon Resource Name (ARN) of the queue.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-Metadata_Label <Hashtable>
Key-value pairs used to identify, sort, and organize cube resources. Can contain up to 63 uppercase letters, lowercase letters, numbers, hyphens (-), and underscores (_). Labels can be added or modified at any time. Each resource can have multiple labels, but each key must be unique for a given object.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesEksPropertiesOverride_PodProperties_Metadata_Labels
-NodeOverrides_NodePropertyOverride <NodePropertyOverride[]>
The node property overrides for the job.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesNodeOverrides_NodePropertyOverrides
-NodeOverrides_NumNode <Int32>
The number of nodes to use with a multi-node parallel job. This value overrides the number of nodes that are specified in the job definition. To use this override, you must meet the following conditions:
  • There must be at least one node range in your job definition that has an open upper boundary, such as : or n:.
  • The lower boundary of the node range that's specified in the job definition must be fewer than the number of nodes specified in the override.
  • The main node index that's specified in the job definition must be fewer than the number of nodes specified in the override.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesNodeOverrides_NumNodes
-Parameter <Hashtable>
Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters in a SubmitJob request override any corresponding parameter defaults from the job definition.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesParameters
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the JobName parameter. The -PassThru parameter is deprecated, use -Select '^JobName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PodProperties_Container <EksContainerOverride[]>
The overrides for the container that's used on the Amazon EKS pod.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesEksPropertiesOverride_PodProperties_Containers
-PodProperties_InitContainer <EksContainerOverride[]>
The overrides for the conatainers defined in the Amazon EKS pod. These containers run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. For more information, see Init Containers in the Kubernetes documentation.This object is limited to 10 elements
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesEksPropertiesOverride_PodProperties_InitContainers
-PropagateTag <Boolean>
Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the tasks during task creation. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state. When specified, this overrides the tag propagation setting in the job definition.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPropagateTags
-RetryStrategy_Attempt <Int32>
The number of times to move a job to the RUNNABLE status. You can 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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRetryStrategy_Attempts
-RetryStrategy_EvaluateOnExit <EvaluateOnExit[]>
Array of up to 5 objects that specify the conditions where jobs are retried or failed. If this parameter is specified, then the attempts parameter must also be specified. If none of the listed conditions match, then the job is retried.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SchedulingPriorityOverride <Int32>
The scheduling priority for the job. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority. This overrides any scheduling priority in the job definition and works only within a single share identifier.The minimum supported value is 0 and the maximum supported value is 9999.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Batch.Model.SubmitJobResponse). Specifying the name of a property of type Amazon.Batch.Model.SubmitJobResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ShareIdentifier <String>
The share identifier for the job. Don't specify this parameter if the job queue doesn't have a scheduling policy. If the job queue has a scheduling policy, then this parameter must be specified.This string is limited to 255 alphanumeric characters, and can be followed by an asterisk (*).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Tag <Hashtable>
The tags that you apply to the job request to help you categorize and organize your resources. Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources in Amazon Web Services General Reference.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-Timeout <JobTimeout>
The timeout configuration for this SubmitJob operation. You can specify a timeout duration after which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more information, see Job Timeouts in the Amazon Elastic Container Service Developer Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.Batch.Model.SubmitJobResponse object containing multiple properties. The object can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z