aws batch - api reference · aws batch api reference canceljob canceljob cancels a job in an aws...
TRANSCRIPT
AWS Batch API Reference
AWS Batch: API ReferenceCopyright © 2018 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored byAmazon.
AWS Batch API Reference
Table of ContentsWelcome .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Actions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
CancelJob .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
CreateComputeEnvironment .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Examples .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
CreateJobQueue .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Examples .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
DeleteComputeEnvironment .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
DeleteJobQueue .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
DeregisterJobDefinition .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
API Version 2016-08-10iii
AWS Batch API Reference
Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
DescribeComputeEnvironments .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
DescribeJobDefinitions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
DescribeJobQueues .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
DescribeJobs .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
ListJobs .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Examples .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
RegisterJobDefinition .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Examples .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
SubmitJob .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
API Version 2016-08-10iv
AWS Batch API Reference
Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
TerminateJob .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
UpdateComputeEnvironment .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
UpdateJobQueue .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Request Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67URI Request Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Request Body .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Response Syntax .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Response Elements .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Example .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Data Types .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70ArrayProperties ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
ArrayPropertiesDetail .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
ArrayPropertiesSummary .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
AttemptContainerDetail .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
AttemptDetail .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
ComputeEnvironmentDetail .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
ComputeEnvironmentOrder .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
API Version 2016-08-10v
AWS Batch API Reference
ComputeResource .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
ComputeResourceUpdate .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
ContainerDetail .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
ContainerOverrides .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
ContainerProperties ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
ContainerSummary .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Host .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
JobDefinition .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
JobDependency .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
JobDetail .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
JobQueueDetail .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
JobSummary .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
JobTimeout .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
KeyValuePair ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
MountPoint ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
RetryStrategy .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Ulimit ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Volume .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Contents .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108See Also .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Common Parameters ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
API Version 2016-08-10vi
AWS Batch API Reference
WelcomeAWS Batch enables you to run batch computing workloads on the AWS Cloud. Batch computing is acommon way for developers, scientists, and engineers to access large amounts of compute resources,and AWS Batch removes the undifferentiated heavy lifting of configuring and managing the requiredinfrastructure. AWS Batch will be familiar to users of traditional batch computing software. Thisservice can efficiently provision resources in response to jobs submitted in order to eliminate capacityconstraints, reduce compute costs, and deliver results quickly.
As a fully managed service, AWS Batch enables developers, scientists, and engineers to run batchcomputing workloads of any scale. AWS Batch automatically provisions compute resources and optimizesthe workload distribution based on the quantity and scale of the workloads. With AWS Batch, there isno need to install or manage batch computing software, which allows you to focus on analyzing resultsand solving problems. AWS Batch reduces operational complexities, saves time, and reduces costs, whichmakes it easy for developers, scientists, and engineers to run their batch jobs in the AWS Cloud.
This document was last published on June 18, 2018.
API Version 2016-08-101
AWS Batch API Reference
ActionsThe following actions are supported:
• CancelJob (p. 3)• CreateComputeEnvironment (p. 6)• CreateJobQueue (p. 12)• DeleteComputeEnvironment (p. 17)• DeleteJobQueue (p. 20)• DeregisterJobDefinition (p. 23)• DescribeComputeEnvironments (p. 26)• DescribeJobDefinitions (p. 30)• DescribeJobQueues (p. 35)• DescribeJobs (p. 39)• ListJobs (p. 44)• RegisterJobDefinition (p. 49)• SubmitJob (p. 55)• TerminateJob (p. 60)• UpdateComputeEnvironment (p. 63)• UpdateJobQueue (p. 67)
API Version 2016-08-102
AWS Batch API ReferenceCancelJob
CancelJobCancels a job in an AWS Batch job queue. Jobs that are in the SUBMITTED, PENDING, or RUNNABLEstate are cancelled. Jobs that have progressed to STARTING or RUNNING are not cancelled (but theAPI operation still succeeds, even if no job is cancelled); these jobs must be terminated with theTerminateJob (p. 60) operation.
Request Syntax
POST /v1/canceljob HTTP/1.1Content-type: application/json
{ "jobId": "string", "reason": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
jobId (p. 3)
The AWS Batch job ID of the job to cancel.
Type: String
Required: Yes
reason (p. 3)
A message to attach to the job that explains the reason for canceling it. This message is returned byfuture DescribeJobs (p. 39) operations on the job. This message is also recorded in the AWS Batchactivity logs.
Type: String
Required: Yes
Response Syntax
HTTP/1.1 200
Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
API Version 2016-08-103
AWS Batch API ReferenceErrors
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example cancels a job with the specified job ID.
Sample Request
POST /v1/canceljob HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 78Authorization: AUTHPARAMSX-Amz-Date: 20161130T001258ZUser-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.1.0 botocore/1.4.79
{ "reason": "Cancelling job.", "jobId": "1d828f65-7a4d-42e8-996d-3b900ed59dc4"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 2Connection: keep-aliveDate: Wed, 30 Nov 2016 00:12:59 GMTx-amzn-RequestId: c0049e91-b691-11e6-964d-89ad0cc99f8eX-Amzn-Trace-Id: Root=1-583e198a-cc8df0f4fac14f0d51777093X-Cache: Miss from cloudfrontVia: 1.1 bfdd5909914586f5bc4851846228c27f.cloudfront.net (CloudFront)X-Amz-Cf-Id: whn1dX1uTx34Lvao7-7ZdkDXEbCZ_sjn3v3hHVFgbo1ORJtXyeggSw==
API Version 2016-08-104
AWS Batch API ReferenceSee Also
{}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-105
AWS Batch API ReferenceCreateComputeEnvironment
CreateComputeEnvironmentCreates an AWS Batch compute environment. You can create MANAGED or UNMANAGED computeenvironments.
In a managed compute environment, AWS Batch manages the compute resources within theenvironment, based on the compute resources that you specify. Instances launched into a managedcompute environment use a recent, approved version of the Amazon ECS-optimized AMI. You can chooseto use Amazon EC2 On-Demand Instances or Spot Instances in your managed compute environment. Youcan optionally set a maximum price so that Spot Instances only launch when the Spot Instance price isbelow a specified percentage of the On-Demand price.
In an unmanaged compute environment, you can manage your own compute resources. This providesmore compute resource configuration options, such as using a custom AMI, but you must ensure thatyour AMI meets the Amazon ECS container instance AMI specification. For more information, seeContainer Instance AMIs in the Amazon Elastic Container Service Developer Guide. After you have createdyour unmanaged compute environment, you can use the DescribeComputeEnvironments (p. 26)operation to find the Amazon ECS cluster that is associated with it and then manually launch yourcontainer instances into that Amazon ECS cluster. For more information, see Launching an Amazon ECSContainer Instance in the Amazon Elastic Container Service Developer Guide.
Request SyntaxPOST /v1/createcomputeenvironment HTTP/1.1Content-type: application/json
{ "computeEnvironmentName": "string", "computeResources": { "bidPercentage": number, "desiredvCpus": number, "ec2KeyPair": "string", "imageId": "string", "instanceRole": "string", "instanceTypes": [ "string" ], "maxvCpus": number, "minvCpus": number, "securityGroupIds": [ "string" ], "spotIamFleetRole": "string", "subnets": [ "string" ], "tags": { "string" : "string" }, "type": "string" }, "serviceRole": "string", "state": "string", "type": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
API Version 2016-08-106
AWS Batch API ReferenceResponse Syntax
computeEnvironmentName (p. 6)
The name for your compute environment. Up to 128 letters (uppercase and lowercase), numbers,hyphens, and underscores are allowed.
Type: String
Required: YescomputeResources (p. 6)
Details of the compute resources managed by the compute environment. This parameter is requiredfor managed compute environments.
Type: ComputeResource (p. 80) object
Required: NoserviceRole (p. 6)
The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to otherAWS services on your behalf.
If your specified role has a path other than /, then you must either specify the full role ARN (this isrecommended) or prefix the role name with the path.
NoteDepending on how you created your AWS Batch service role, its ARN may contain theservice-role path prefix. When you only specify the name of the service role, AWS Batchassumes that your ARN does not use the service-role path prefix. Because of this, werecommend that you specify the full ARN of your service role when you create computeenvironments.
Type: String
Required: Yesstate (p. 6)
The state of the compute environment. If the state is ENABLED, then the compute environmentaccepts jobs from a queue and can scale out automatically based on queues.
Type: String
Valid Values: ENABLED | DISABLED
Required: Notype (p. 6)
The type of the compute environment.
Type: String
Valid Values: MANAGED | UNMANAGED
Required: Yes
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "computeEnvironmentArn": "string",
API Version 2016-08-107
AWS Batch API ReferenceResponse Elements
"computeEnvironmentName": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
computeEnvironmentArn (p. 7)
The Amazon Resource Name (ARN) of the compute environment.
Type: StringcomputeEnvironmentName (p. 7)
The name of the compute environment.
Type: String
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExamplesIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example creates a managed compute environment with specific C4 instance types that are launchedon demand. The compute environment is called C4OnDemand.
Sample Request
POST /v1/createcomputeenvironment HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identity
API Version 2016-08-108
AWS Batch API ReferenceExamples
Content-Length: 538Authorization: AUTHPARAMSX-Amz-Date: 20161128T223128ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "computeEnvironmentName": "C4OnDemand", "state": "ENABLED", "type": "MANAGED", "computeResources": { "subnets": [ "subnet-220c0e0a", "subnet-1a95556d", "subnet-978f6dce" ], "tags": { "Name": "Batch Instance - C4OnDemand" }, "desiredvCpus": 48, "minvCpus": 0, "instanceTypes": [ "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge" ], "securityGroupIds": [ "sg-cf5093b2" ], "instanceRole": "ecsInstanceRole", "maxvCpus": 128, "type": "EC2", "ec2KeyPair": "id_rsa" }, "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole"}
Sample Response
HTTP/1.1 200 OKDate: Mon, 28 Nov 2016 22:31:28 GMTContent-Type: application/jsonContent-Length: 133Connection: keep-alivex-amzn-RequestId: 67558123-b5ba-11e6-b909-370261104d69X-Amzn-Trace-Id: Root=1-583cb040-93d52243313314b33c0c1e97X-Cache: Miss from cloudfrontVia: 1.1 7e587c722adb25336835ccb4e5814e4e.cloudfront.net (CloudFront)X-Amz-Cf-Id: GwQRsxvmiuj1HYwbYq9MAEsQfJpN6BknGQlNX1jAd5qLQFXyHBwOUQ==
{ "computeEnvironmentName": "C4OnDemand", "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand"}
ExampleThis example creates a managed compute environment with the M4 instance type that is launched whenthe Spot Instance price is at or below 20% of the On-Demand price for the instance type. The computeenvironment is called M4Spot.
API Version 2016-08-109
AWS Batch API ReferenceSee Also
Sample Request
POST /v1/createcomputeenvironment HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 568Authorization: AUTHPARAMSX-Amz-Date: 20161128T223813ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "computeEnvironmentName": "M4Spot", "state": "ENABLED", "type": "MANAGED", "computeResources": { "subnets": [ "subnet-220c0e0a", "subnet-1a95556d", "subnet-978f6dce" ], "type": "SPOT", "spotIamFleetRole": "arn:aws:iam::012345678910:role/aws-ec2-spot-fleet-role", "tags": { "Name": "Batch Instance - M4Spot" }, "desiredvCpus": 4, "minvCpus": 0, "instanceTypes": [ "m4" ], "securityGroupIds": [ "sg-cf5093b2" ], "instanceRole": "ecsInstanceRole", "maxvCpus": 128, "bidPercentage": 20, "ec2KeyPair": "id_rsa" }, "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole"}
Sample Response
HTTP/1.1 200 OKDate: Mon, 28 Nov 2016 22:38:16 GMTContent-Type: application/jsonContent-Length: 125Connection: keep-alivex-amzn-RequestId: 59422e20-b5bb-11e6-9a64-53057c7adce9X-Amzn-Trace-Id: Root=1-583cb1d6-b71bcabf4f10bae0f3ade63bX-Cache: Miss from cloudfrontVia: 1.1 8455edd9286a1292a39c993fdeccce65.cloudfront.net (CloudFront)X-Amz-Cf-Id: 4mklLyUpygUko86fMNzPgA8_D64lSwPmG6iIKhAZkGpOp2e-3cKg_w==
{ "computeEnvironmentName": "M4Spot", "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/M4Spot"}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
API Version 2016-08-1010
AWS Batch API ReferenceSee Also
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1011
AWS Batch API ReferenceCreateJobQueue
CreateJobQueueCreates an AWS Batch job queue. When you create a job queue, you associate one or more computeenvironments 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 in which the AWS Batch schedulerplaces jobs onto its associated compute environments. For example, if a compute environment isassociated with more than one job queue, the job queue with a higher priority is given preference forscheduling jobs to that compute environment.
Request SyntaxPOST /v1/createjobqueue HTTP/1.1Content-type: application/json
{ "computeEnvironmentOrder": [ { "computeEnvironment": "string", "order": number } ], "jobQueueName": "string", "priority": number, "state": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
computeEnvironmentOrder (p. 12)
The set of compute environments mapped to a job queue and their order relative to each other. Thejob scheduler uses this parameter to determine which compute environment should execute a givenjob. Compute environments must be in the VALID state before you can associate them with a jobqueue. You can associate up to three compute environments with a job queue.
Type: Array of ComputeEnvironmentOrder (p. 79) objects
Required: YesjobQueueName (p. 12)
The name of the job queue.
Type: String
Required: Yespriority (p. 12)
The priority of the job queue. Job queues with a higher priority (or a higher integer value for thepriority parameter) are evaluated first when associated with same compute environment. Priority
API Version 2016-08-1012
AWS Batch API ReferenceResponse Syntax
is determined in descending order, for example, a job queue with a priority value of 10 is givenscheduling preference over a job queue with a priority value of 1.
Type: Integer
Required: Yesstate (p. 12)
The state of the job queue. If the job queue state is ENABLED, it is able to accept jobs.
Type: String
Valid Values: ENABLED | DISABLED
Required: No
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "jobQueueArn": "string", "jobQueueName": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
jobQueueArn (p. 13)
The Amazon Resource Name (ARN) of the job queue.
Type: StringjobQueueName (p. 13)
The name of the job queue.
Type: String
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
API Version 2016-08-1013
AWS Batch API ReferenceExamples
ExamplesIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example creates a job queue called LowPriority that uses the M4Spot compute environment.
Sample Request
POST /v1/createjobqueue HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 142Authorization: AUTHPARAMSX-Amz-Date: 20161128T234201ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "priority": 1, "state": "ENABLED", "computeEnvironmentOrder": [ { "computeEnvironment": "M4Spot", "order": 1 } ], "jobQueueName": "LowPriority"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 105Connection: keep-aliveDate: Mon, 28 Nov 2016 23:42:02 GMTx-amzn-RequestId: 42a92eee-b5c4-11e6-b15b-8167bcebef9dX-Amzn-Trace-Id: Root=1-583cc0c9-f47ba831b55e794291697c39X-Cache: Miss from cloudfrontVia: 1.1 a44b4468444ef3ee67472bd5c5016098.cloudfront.net (CloudFront)X-Amz-Cf-Id: bz9IuCM5FNkDfge5y-Zw7nFEjDdTHDYFwbEY2AKUqrt9l2XeKUcuyA==
{ "jobQueueName": "LowPriority", "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/LowPriority"}
ExampleThis example creates a job queue called HighPriority that uses the C4OnDemand computeenvironment with an order of 1 and the M4Spot compute environment with an order of 2.
API Version 2016-08-1014
AWS Batch API ReferenceSee Also
Sample Request
POST /v1/createjobqueue HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 192Authorization: AUTHPARAMSX-Amz-Date: 20161128T234933ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "priority": 10, "state": "ENABLED", "computeEnvironmentOrder": [ { "computeEnvironment": "C4OnDemand", "order": 1 }, { "computeEnvironment": "M4Spot", "order": 2 } ], "jobQueueName": "HighPriority"}
Sample Response
HTTP/1.1 200 OKDate: Mon, 28 Nov 2016 23:49:34 GMTContent-Type: application/jsonContent-Length: 107Connection: keep-alivex-amzn-RequestId: 503cdf30-b5c5-11e6-b7a0-a325cf93a1c0X-Amzn-Trace-Id: Root=1-583cc28e-ca43f4d9fb8dc73ebb99dd67X-Cache: Miss from cloudfrontVia: 1.1 e81bbcbc86832b655de5b9a19317ad01.cloudfront.net (CloudFront)X-Amz-Cf-Id: 8NB20odDPMaKy9zHa6GPaGN_r562QsynDTRYPuhKwHSvQrMG70IHSQ==
{ "jobQueueName": "HighPriority", "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority"}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1015
AWS Batch API ReferenceDeleteComputeEnvironment
DeleteComputeEnvironmentDeletes an AWS Batch compute environment.
Before you can delete a compute environment, you must set its state to DISABLED with theUpdateComputeEnvironment (p. 63) API operation and disassociate it from any job queues with theUpdateJobQueue (p. 67) API operation.
Request SyntaxPOST /v1/deletecomputeenvironment HTTP/1.1Content-type: application/json
{ "computeEnvironment": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
computeEnvironment (p. 17)
The name or Amazon Resource Name (ARN) of the compute environment to delete.
Type: String
Required: Yes
Response SyntaxHTTP/1.1 200
Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
API Version 2016-08-1017
AWS Batch API ReferenceExample
HTTP Status Code: 500
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example deletes the P3OnDemand compute environment.
Sample Request
POST /v1/deletecomputeenvironment HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 36Authorization: AUTHPARAMSX-Amz-Date: 20161128T202219ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "computeEnvironment": "P3OnDemand"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 2Connection: keep-aliveDate: Mon, 28 Nov 2016 20:22:20 GMTx-amzn-RequestId: 5cffa6c9-b5a8-11e6-a551-27cf529560edX-Amzn-Trace-Id: Root=1-583c91fc-e3864c0561e747945eca7135X-Cache: Miss from cloudfrontVia: 1.1 b63769e2d89c89274acd908e4bfcb9f4.cloudfront.net (CloudFront)X-Amz-Cf-Id: mqHP9krdcbSbT0pivub4bJEM0_XCTTfENz0xPwwye-USu1CVGlj-nw==
{}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java
API Version 2016-08-1018
AWS Batch API ReferenceSee Also
• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1019
AWS Batch API ReferenceDeleteJobQueue
DeleteJobQueueDeletes the specified job queue. You must first disable submissions for a queue with theUpdateJobQueue (p. 67) operation. All jobs in the queue are terminated when you delete a job queue.
It is not necessary to disassociate compute environments from a queue before submitting aDeleteJobQueue request.
Request SyntaxPOST /v1/deletejobqueue HTTP/1.1Content-type: application/json
{ "jobQueue": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
jobQueue (p. 20)
The short name or full Amazon Resource Name (ARN) of the queue to delete.
Type: String
Required: Yes
Response SyntaxHTTP/1.1 200
Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
API Version 2016-08-1020
AWS Batch API ReferenceExample
HTTP Status Code: 500
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example deletes the GPGPU job queue.
Sample Request
POST /v1/deletejobqueue HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 21Authorization: AUTHPARAMSX-Amz-Date: 20161128T201857ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "jobQueue": "GPGPU"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 2Connection: keep-aliveDate: Mon, 28 Nov 2016 20:18:57 GMTx-amzn-RequestId: e44df9d5-b5a7-11e6-a551-27cf529560edX-Amzn-Trace-Id: Root=1-583c9131-d8de3fb3afba1e0ae32e9307X-Cache: Miss from cloudfrontVia: 1.1 56908f89e8d17ba579c0607313114955.cloudfront.net (CloudFront)X-Amz-Cf-Id: UnpbX7PjdrV3N-Y79pD6eV3DfqYUXdEx3HAI9VYhUZ8h7yRBi5_ZVQ==
{}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java
API Version 2016-08-1021
AWS Batch API ReferenceSee Also
• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1022
AWS Batch API ReferenceDeregisterJobDefinition
DeregisterJobDefinitionDeregisters an AWS Batch job definition.
Request SyntaxPOST /v1/deregisterjobdefinition HTTP/1.1Content-type: application/json
{ "jobDefinition": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
jobDefinition (p. 23)
The name and revision (name:revision) or full Amazon Resource Name (ARN) of the job definitionto deregister.
Type: String
Required: Yes
Response SyntaxHTTP/1.1 200
Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
API Version 2016-08-1023
AWS Batch API ReferenceExample
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example deregisters a job definition called sleep10.
Sample Request
POST /v1/deregisterjobdefinition HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 28Authorization: AUTHPARAMSX-Amz-Date: 20161128T215745ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "jobDefinition": "sleep10"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 2Connection: keep-aliveDate: Mon, 28 Nov 2016 21:57:45 GMTx-amzn-RequestId: b18944e7-b5b5-11e6-969f-6b235d2d633dX-Amzn-Trace-Id: Root=1-583ca859-ac12b61650100be5a6f0af35X-Cache: Miss from cloudfrontVia: 1.1 e892630891779ff1ccadccf205a776f3.cloudfront.net (CloudFront)X-Amz-Cf-Id: wKAY_NOTbvY8PFcmo1aGja0xqGLxsTJgEtuc1KosPYAPYL8icYwvKw==
{}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3
API Version 2016-08-1024
AWS Batch API ReferenceSee Also
• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1025
AWS Batch API ReferenceDescribeComputeEnvironments
DescribeComputeEnvironmentsDescribes one or more of your compute environments.
If you are using an unmanaged compute environment, you can use theDescribeComputeEnvironment operation to determine the ecsClusterArn that you should launchyour Amazon ECS container instances into.
Request SyntaxPOST /v1/describecomputeenvironments HTTP/1.1Content-type: application/json
{ "computeEnvironments": [ "string" ], "maxResults": number, "nextToken": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
computeEnvironments (p. 26)
A list of up to 100 compute environment names or full Amazon Resource Name (ARN) entries.
Type: Array of strings
Required: NomaxResults (p. 26)
The maximum number of cluster results returned by DescribeComputeEnvironments inpaginated output. When this parameter is used, DescribeComputeEnvironments only returnsmaxResults results in a single page along with a nextToken response element. The remainingresults of the initial request can be seen by sending another DescribeComputeEnvironmentsrequest with the returned nextToken value. This value can be between 1 and 100. If this parameteris not used, then DescribeComputeEnvironments returns up to 100 results and a nextTokenvalue if applicable.
Type: Integer
Required: NonextToken (p. 26)
The nextToken value returned from a previous paginated DescribeComputeEnvironmentsrequest where maxResults was used and the results exceeded the value of that parameter.Pagination continues from the end of the previous results that returned the nextToken value. Thisvalue is null when there are no more results to return.
NoteThis token should be treated as an opaque identifier that is only used to retrieve the nextitems in a list and not for other programmatic purposes.
API Version 2016-08-1026
AWS Batch API ReferenceResponse Syntax
Type: String
Required: No
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "computeEnvironments": [ { "computeEnvironmentArn": "string", "computeEnvironmentName": "string", "computeResources": { "bidPercentage": number, "desiredvCpus": number, "ec2KeyPair": "string", "imageId": "string", "instanceRole": "string", "instanceTypes": [ "string" ], "maxvCpus": number, "minvCpus": number, "securityGroupIds": [ "string" ], "spotIamFleetRole": "string", "subnets": [ "string" ], "tags": { "string" : "string" }, "type": "string" }, "ecsClusterArn": "string", "serviceRole": "string", "state": "string", "status": "string", "statusReason": "string", "type": "string" } ], "nextToken": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
computeEnvironments (p. 27)
The list of compute environments.
Type: Array of ComputeEnvironmentDetail (p. 77) objectsnextToken (p. 27)
The nextToken value to include in a future DescribeComputeEnvironments request. When theresults of a DescribeJobDefinitions request exceed maxResults, this value can be used toretrieve the next page of results. This value is null when there are no more results to return.
Type: String
API Version 2016-08-1027
AWS Batch API ReferenceErrors
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example describes the P3OnDemand compute environment.
Sample Request
POST /v1/describecomputeenvironments HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 39Authorization: AUTHPARAMSX-Amz-Date: 20161128T193355ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "computeEnvironments": [ "P3OnDemand" ]}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 742Connection: keep-aliveDate: Mon, 28 Nov 2016 19:33:56 GMTx-amzn-RequestId: 9a3315bc-b5a1-11e6-b942-8d20a4fbbd5aX-Amzn-Trace-Id: Root=1-583c86a4-abecba6b67c6a740c8891289X-Cache: Miss from cloudfrontVia: 1.1 56908f89e8d17ba579c0607313114955.cloudfront.net (CloudFront)
API Version 2016-08-1028
AWS Batch API ReferenceSee Also
X-Amz-Cf-Id: FbgslaatWhj_yGhfkSCTPpPtjiuVuFOBns-kK5EsaasYQC5p2FnpiQ==
{ "computeEnvironments": [{ "computeEnvironmentName": "P3OnDemand", "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/P3OnDemand", "ecsClusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/P3OnDemand_Batch_2c06f29d-d1fe-3a49-879d-42394c86effc", "type": "MANAGED", "state": "ENABLED", "status": "VALID", "statusReason": "ComputeEnvironment Healthy", "computeResources": { "type": "EC2", "minvCpus": 0, "maxvCpus": 128, "desiredvCpus": 48, "instanceTypes": ["p3"], "subnets": ["subnet-220c0e0a", "subnet-1a95556d", "subnet-978f6dce"], "securityGroupIds": ["sg-cf5093b2"], "ec2KeyPair": "id_rsa", "instanceRole": "ecsInstanceRole", "tags": { "Name": "Batch Instance - P3OnDemand" } }, "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole" }]}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1029
AWS Batch API ReferenceDescribeJobDefinitions
DescribeJobDefinitionsDescribes a list of job definitions. You can specify a status (such as ACTIVE) to only return jobdefinitions that match that status.
Request Syntax
POST /v1/describejobdefinitions HTTP/1.1Content-type: application/json
{ "jobDefinitionName": "string", "jobDefinitions": [ "string" ], "maxResults": number, "nextToken": "string", "status": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
jobDefinitionName (p. 30)
The name of the job definition to describe.
Type: String
Required: No
jobDefinitions (p. 30)
A space-separated list of up to 100 job definition names or full Amazon Resource Name (ARN)entries.
Type: Array of strings
Required: No
maxResults (p. 30)
The maximum number of results returned by DescribeJobDefinitions in paginated output.When this parameter is used, DescribeJobDefinitions only returns maxResults results ina single page along with a nextToken response element. The remaining results of the initialrequest can be seen by sending another DescribeJobDefinitions request with the returnednextToken value. This value can be between 1 and 100. If this parameter is not used, thenDescribeJobDefinitions returns up to 100 results and a nextToken value if applicable.
Type: Integer
Required: No
API Version 2016-08-1030
AWS Batch API ReferenceResponse Syntax
nextToken (p. 30)
The nextToken value returned from a previous paginated DescribeJobDefinitions requestwhere maxResults was used and the results exceeded the value of that parameter. Paginationcontinues from the end of the previous results that returned the nextToken value. This value isnull when there are no more results to return.
NoteThis token should be treated as an opaque identifier that is only used to retrieve the nextitems in a list and not for other programmatic purposes.
Type: String
Required: No
status (p. 30)
The status with which to filter job definitions.
Type: String
Required: No
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "jobDefinitions": [ { "containerProperties": { "command": [ "string" ], "environment": [ { "name": "string", "value": "string" } ], "image": "string", "jobRoleArn": "string", "memory": number, "mountPoints": [ { "containerPath": "string", "readOnly": boolean, "sourceVolume": "string" } ], "privileged": boolean, "readonlyRootFilesystem": boolean, "ulimits": [ { "hardLimit": number, "name": "string", "softLimit": number } ], "user": "string", "vcpus": number, "volumes": [ {
API Version 2016-08-1031
AWS Batch API ReferenceResponse Elements
"host": { "sourcePath": "string" }, "name": "string" } ] }, "jobDefinitionArn": "string", "jobDefinitionName": "string", "parameters": { "string" : "string" }, "retryStrategy": { "attempts": number }, "revision": number, "status": "string", "timeout": { "attemptDurationSeconds": number }, "type": "string" } ], "nextToken": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
jobDefinitions (p. 31)
The list of job definitions.
Type: Array of JobDefinition (p. 93) objectsnextToken (p. 31)
The nextToken value to include in a future DescribeJobDefinitions request. When the resultsof a DescribeJobDefinitions request exceed maxResults, this value can be used to retrieve thenext page of results. This value is null when there are no more results to return.
Type: String
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
API Version 2016-08-1032
AWS Batch API ReferenceExample
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example describes all of your active job definitions.
Sample Request
POST /v1/describejobdefinitions HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 20Authorization: AUTHPARAMSX-Amz-Date: 20161128T221855ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "status": "ACTIVE"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 351Connection: keep-aliveDate: Mon, 28 Nov 2016 22:18:55 GMTx-amzn-RequestId: a6856a57-b5b8-11e6-b057-0594e7a2cf06X-Amzn-Trace-Id: Root=1-583cad4f-d67ae20374b79d9adbaca1fbX-Cache: Miss from cloudfrontVia: 1.1 688936cc730f240888e6a59a81892a3d.cloudfront.net (CloudFront)X-Amz-Cf-Id: hd-CAMqfaCJt-1oH7tBu9j5c-IhLQuMjFHFPck6F0MMt5CBea8mQBQ==
{ "jobDefinitions": [{ "jobDefinitionName": "sleep60", "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep60:1", "revision": 1, "status": "ACTIVE", "type": "container", "containerProperties": { "image": "busybox", "vcpus": 1, "memory": 128, "command": ["sleep", "60"], "volumes": [], "environment": [], "mountPoints": [], "ulimits": [] } }]
API Version 2016-08-1033
AWS Batch API ReferenceSee Also
}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1034
AWS Batch API ReferenceDescribeJobQueues
DescribeJobQueuesDescribes one or more of your job queues.
Request SyntaxPOST /v1/describejobqueues HTTP/1.1Content-type: application/json
{ "jobQueues": [ "string" ], "maxResults": number, "nextToken": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
jobQueues (p. 35)
A list of up to 100 queue names or full queue Amazon Resource Name (ARN) entries.
Type: Array of strings
Required: NomaxResults (p. 35)
The maximum number of results returned by DescribeJobQueues in paginated output. When thisparameter is used, DescribeJobQueues only returns maxResults results in a single page alongwith a nextToken response element. The remaining results of the initial request can be seen bysending another DescribeJobQueues request with the returned nextToken value. This value canbe between 1 and 100. If this parameter is not used, then DescribeJobQueues returns up to 100results and a nextToken value if applicable.
Type: Integer
Required: NonextToken (p. 35)
The nextToken value returned from a previous paginated DescribeJobQueues request wheremaxResults was used and the results exceeded the value of that parameter. Pagination continuesfrom the end of the previous results that returned the nextToken value. This value is null whenthere are no more results to return.
NoteThis token should be treated as an opaque identifier that is only used to retrieve the nextitems in a list and not for other programmatic purposes.
Type: String
Required: No
API Version 2016-08-1035
AWS Batch API ReferenceResponse Syntax
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "jobQueues": [ { "computeEnvironmentOrder": [ { "computeEnvironment": "string", "order": number } ], "jobQueueArn": "string", "jobQueueName": "string", "priority": number, "state": "string", "status": "string", "statusReason": "string" } ], "nextToken": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
jobQueues (p. 36)
The list of job queues.
Type: Array of JobQueueDetail (p. 99) objectsnextToken (p. 36)
The nextToken value to include in a future DescribeJobQueues request. When the results of aDescribeJobQueues request exceed maxResults, this value can be used to retrieve the next pageof results. This value is null when there are no more results to return.
Type: String
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
API Version 2016-08-1036
AWS Batch API ReferenceExample
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example describes the HighPriority job queue.
Sample Request
POST /v1/describejobqueues HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 31Authorization: AUTHPARAMSX-Amz-Date: 20161128T194731ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "jobQueues": [ "HighPriority" ]}
Sample Response
HTTP/1.1 200 OKDate: Mon, 28 Nov 2016 19:47:32 GMTContent-Type: application/jsonContent-Length: 336Connection: keep-alivex-amzn-RequestId: 8073d3c6-b5a3-11e6-848a-3577abb4ef72X-Amzn-Trace-Id: Root=1-583c89d4-dd8e9009bdc002a2f5f6f685X-Cache: Miss from cloudfrontVia: 1.1 7bfcc2251021d9dc94a87ff179d69731.cloudfront.net (CloudFront)X-Amz-Cf-Id: dwf7P2pnEYCxN1C3XdApqDtqzLfjpWAjbHvskd9oUqz4OUn9pvtx3Q==
{ "jobQueues": [{ "jobQueueName": "HighPriority", "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority", "state": "ENABLED", "status": "VALID", "statusReason": "JobQueue Healthy", "priority": 10, "computeEnvironmentOrder": [{ "order": 1, "computeEnvironment": "arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand" }] }]}
API Version 2016-08-1037
AWS Batch API ReferenceSee Also
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1038
AWS Batch API ReferenceDescribeJobs
DescribeJobsDescribes a list of AWS Batch jobs.
Request SyntaxPOST /v1/describejobs HTTP/1.1Content-type: application/json
{ "jobs": [ "string" ]}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
jobs (p. 39)
A space-separated list of up to 100 job IDs.
Type: Array of strings
Required: Yes
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "jobs": [ { "arrayProperties": { "index": number, "size": number, "statusSummary": { "string" : number } }, "attempts": [ { "container": { "containerInstanceArn": "string", "exitCode": number, "logStreamName": "string", "reason": "string", "taskArn": "string" }, "startedAt": number, "statusReason": "string", "stoppedAt": number
API Version 2016-08-1039
AWS Batch API ReferenceResponse Syntax
} ], "container": { "command": [ "string" ], "containerInstanceArn": "string", "environment": [ { "name": "string", "value": "string" } ], "exitCode": number, "image": "string", "jobRoleArn": "string", "logStreamName": "string", "memory": number, "mountPoints": [ { "containerPath": "string", "readOnly": boolean, "sourceVolume": "string" } ], "privileged": boolean, "readonlyRootFilesystem": boolean, "reason": "string", "taskArn": "string", "ulimits": [ { "hardLimit": number, "name": "string", "softLimit": number } ], "user": "string", "vcpus": number, "volumes": [ { "host": { "sourcePath": "string" }, "name": "string" } ] }, "createdAt": number, "dependsOn": [ { "jobId": "string", "type": "string" } ], "jobDefinition": "string", "jobId": "string", "jobName": "string", "jobQueue": "string", "parameters": { "string" : "string" }, "retryStrategy": { "attempts": number }, "startedAt": number, "status": "string", "statusReason": "string", "stoppedAt": number,
API Version 2016-08-1040
AWS Batch API ReferenceResponse Elements
"timeout": { "attemptDurationSeconds": number } } ]}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
jobs (p. 39)
The list of jobs.
Type: Array of JobDetail (p. 96) objects
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example describes a job with the specified job ID.
Sample Request
POST /v1/describejobs HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 50
API Version 2016-08-1041
AWS Batch API ReferenceExample
Authorization: AUTHPARAMSX-Amz-Date: 20170327T151323ZUser-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.1.0 botocore/1.4.79
{ "jobs": [ "0668da57-1bcc-478b-bc14-5d4f1c1cef48" ]}
Sample Response
HTTP/1.1 200 OKDate: Mon, 27 Mar 2017 15:13:13 GMTContent-Type: application/jsonContent-Length: 1883Connection: keep-alivex-amzn-RequestId: e5628975-12ff-11e7-ab46-a583c88f0f07X-Amzn-Trace-Id: Root=1-58d92c09-19ef6bec3f9f5a392d25738fX-Cache: Miss from cloudfrontVia: 1.1 8a78b675adb2cce925860f2fe4383e71.cloudfront.net (CloudFront)X-Amz-Cf-Id: TaW8k7yrDyXHgEU2udEEOAbliIY1iPmQr4LpN80ULdqyVGR6qP0q4Q==
{ "jobs": [ { "jobName": "EchoAttemptNumber", "jobId": "0668da57-1bcc-478b-bc14-5d4f1c1cef48", "jobQueue": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority", "status": "FAILED", "attempts": [ { "container": { "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/90bfe527-119c-494a-b8fe-f5999c66d214", "taskArn": "arn:aws:ecs:us-east-1:012345678910:task/af37d830-6978-4a2b-b796-e890e9b477b3", "exitCode": 1 }, "startedAt": 1490627002951, "stoppedAt": 1490627003065, "statusReason": "Essential container in task exited" }, { "container": { "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/90bfe527-119c-494a-b8fe-f5999c66d214", "taskArn": "arn:aws:ecs:us-east-1:012345678910:task/3dfd4d0e-a177-4798-9c13-21b7148217bc", "exitCode": 2 }, "startedAt": 1490627019948, "stoppedAt": 1490627020059, "statusReason": "Essential container in task exited" }, { "container": { "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/90bfe527-119c-494a-b8fe-f5999c66d214", "taskArn": "arn:aws:ecs:us-east-1:012345678910:task/22857040-182c-4af3-85f5-bb2c71edd282", "exitCode": 3 }, "startedAt": 1490627034798,
API Version 2016-08-1042
AWS Batch API ReferenceSee Also
"stoppedAt": 1490627034949, "statusReason": "Essential container in task exited" } ], "statusReason": "Essential container in task exited", "createdAt": 1490626709525, "retryStrategy": { "attempts": 3 }, "startedAt": 1490627034798, "stoppedAt": 1490627034949, "dependsOn": [], "jobDefinition": "arn:aws:batch:us-east-1:012345678910:job-definition/EchoAttemptNumber:1", "parameters": {}, "container": { "image": "amazonlinux", "vcpus": 1, "memory": 2, "command": [ "/bin/bash", "-c", "exit $AWS_BATCH_JOB_ATTEMPT" ], "volumes": [], "environment": [], "mountPoints": [], "ulimits": [], "exitCode": 3, "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/90bfe527-119c-494a-b8fe-f5999c66d214", "taskArn": "arn:aws:ecs:us-east-1:012345678910:task/22857040-182c-4af3-85f5-bb2c71edd282" } } ]}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1043
AWS Batch API ReferenceListJobs
ListJobsReturns a list of task jobs for a specified job queue. You can filter the results by job status with thejobStatus parameter. If you do not specify a status, only RUNNING jobs are returned.
Request SyntaxPOST /v1/listjobs HTTP/1.1Content-type: application/json
{ "arrayJobId": "string", "jobQueue": "string", "jobStatus": "string", "maxResults": number, "nextToken": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
arrayJobId (p. 44)
The job ID for an array job. Specifying an array job ID with this parameter lists all child jobs fromwithin the specified array.
Type: String
Required: NojobQueue (p. 44)
The name or full Amazon Resource Name (ARN) of the job queue with which to list jobs.
Type: String
Required: NojobStatus (p. 44)
The job status with which to filter jobs in the specified queue. If you do not specify a status, onlyRUNNING jobs are returned.
Type: String
Valid Values: SUBMITTED | PENDING | RUNNABLE | STARTING | RUNNING | SUCCEEDED |FAILED
Required: NomaxResults (p. 44)
The maximum number of results returned by ListJobs in paginated output. When this parameteris used, ListJobs only returns maxResults results in a single page along with a nextTokenresponse element. The remaining results of the initial request can be seen by sending another
API Version 2016-08-1044
AWS Batch API ReferenceResponse Syntax
ListJobs request with the returned nextToken value. This value can be between 1 and 100. Ifthis parameter is not used, then ListJobs returns up to 100 results and a nextToken value ifapplicable.
Type: Integer
Required: NonextToken (p. 44)
The nextToken value returned from a previous paginated ListJobs request where maxResultswas used and the results exceeded the value of that parameter. Pagination continues from the endof the previous results that returned the nextToken value. This value is null when there are nomore results to return.
NoteThis token should be treated as an opaque identifier that is only used to retrieve the nextitems in a list and not for other programmatic purposes.
Type: String
Required: No
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "jobSummaryList": [ { "arrayProperties": { "index": number, "size": number }, "container": { "exitCode": number, "reason": "string" }, "createdAt": number, "jobId": "string", "jobName": "string", "startedAt": number, "status": "string", "statusReason": "string", "stoppedAt": number } ], "nextToken": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
jobSummaryList (p. 45)
A list of job summaries that match the request.
API Version 2016-08-1045
AWS Batch API ReferenceErrors
Type: Array of JobSummary (p. 101) objectsnextToken (p. 45)
The nextToken value to include in a future ListJobs request. When the results of a ListJobsrequest exceed maxResults, this value can be used to retrieve the next page of results. This value isnull when there are no more results to return.
Type: String
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExamplesIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example lists the running jobs in the HighPriority job queue.
Sample Request
POST /v1/listjobs HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 28Authorization: AUTHPARAMSX-Amz-Date: 20161129T201622ZUser-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.1.0 botocore/1.4.79
{ "jobQueue": "HighPriority"}
Sample Response
HTTP/1.1 200 OK
API Version 2016-08-1046
AWS Batch API ReferenceSee Also
Content-Type: application/jsonContent-Length: 89Connection: keep-aliveDate: Tue, 29 Nov 2016 20:16:22 GMTx-amzn-RequestId: b264511f-b670-11e6-b8df-d7216c30de5eX-Amzn-Trace-Id: Root=1-583de216-c8d6ac58e2bd21ac2d8284cfX-Cache: Miss from cloudfrontVia: 1.1 7f3f42df8af148df1f9f1ee7175987ad.cloudfront.net (CloudFront)X-Amz-Cf-Id: idKR5mD8f7Luom03P9DV1bFGXsq_SIFNy_nMrTCOqZrRc0nXgHqZfg==
{ "jobSummaryList": [{ "jobId": "e66ff5fd-a1ff-4640-b1a2-0b0a142f49bb", "jobName": "example" }]}
ExampleThis example lists jobs in the HighPriority job queue that are in the SUBMITTED job status.
Sample Request
POST /v1/listjobs HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 54Authorization: AUTHPARAMSX-Amz-Date: 20161129T201642ZUser-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.1.0 botocore/1.4.79
{ "jobQueue": "HighPriority", "jobStatus": "SUBMITTED"}
Sample Response
HTTP/1.1 200 OKDate: Tue, 29 Nov 2016 20:16:42 GMTContent-Type: application/jsonContent-Length: 89Connection: keep-alivex-amzn-RequestId: be15ca04-b670-11e6-aa0e-ef9532a24bfeX-Amzn-Trace-Id: Root=1-583de22a-fdc493168642bc6d4de19ba7X-Cache: Miss from cloudfrontVia: 1.1 ebc28fb0ad14691ee5d6c1a49f41b878.cloudfront.net (CloudFront)X-Amz-Cf-Id: Ngsjm0gBg2y4cDFG4uwpAmaKaT6Dejh7oGlVDmewQrUaeW_SPst_Bw==
{ "jobSummaryList": [{ "jobId": "68f0c163-fbd4-44e6-9fd1-25b14a434786", "jobName": "example" }]}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
API Version 2016-08-1047
AWS Batch API ReferenceSee Also
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1048
AWS Batch API ReferenceRegisterJobDefinition
RegisterJobDefinitionRegisters an AWS Batch job definition.
Request Syntax
POST /v1/registerjobdefinition HTTP/1.1Content-type: application/json
{ "containerProperties": { "command": [ "string" ], "environment": [ { "name": "string", "value": "string" } ], "image": "string", "jobRoleArn": "string", "memory": number, "mountPoints": [ { "containerPath": "string", "readOnly": boolean, "sourceVolume": "string" } ], "privileged": boolean, "readonlyRootFilesystem": boolean, "ulimits": [ { "hardLimit": number, "name": "string", "softLimit": number } ], "user": "string", "vcpus": number, "volumes": [ { "host": { "sourcePath": "string" }, "name": "string" } ] }, "jobDefinitionName": "string", "parameters": { "string" : "string" }, "retryStrategy": { "attempts": number }, "timeout": { "attemptDurationSeconds": number }, "type": "string"}
API Version 2016-08-1049
AWS Batch API ReferenceURI Request Parameters
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
containerProperties (p. 49)
An object with various properties specific for container-based jobs. This parameter is required if thetype parameter is container.
Type: ContainerProperties (p. 88) object
Required: NojobDefinitionName (p. 49)
The name of the job definition to register. Up to 128 letters (uppercase and lowercase), numbers,hyphens, and underscores are allowed.
Type: String
Required: Yesparameters (p. 49)
Default parameter substitution placeholders to set in the job definition. Parameters are specifiedas a key-value pair mapping. Parameters in a SubmitJob request override any correspondingparameter defaults from the job definition.
Type: String to string map
Required: NoretryStrategy (p. 49)
The retry strategy to use for failed jobs that are submitted with this job definition. Any retry strategythat is specified during a SubmitJob (p. 55) operation overrides the retry strategy defined here. Ifa job is terminated due to a timeout, it is not retried.
Type: RetryStrategy (p. 106) object
Required: Notimeout (p. 49)
The timeout configuration for jobs that are submitted with this job definition, after which AWSBatch terminates your jobs if they have not finished. If a job is terminated due to a timeout, it isnot retried. The minimum value for the timeout is 60 seconds. Any timeout configuration that isspecified during a SubmitJob (p. 55) operation overrides the timeout configuration defined here.For more information, see Job Timeouts in the Amazon Elastic Container Service Developer Guide.
Type: JobTimeout (p. 103) object
Required: Notype (p. 49)
The type of job definition.
Type: String
Valid Values: container
API Version 2016-08-1050
AWS Batch API ReferenceResponse Syntax
Required: Yes
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "jobDefinitionArn": "string", "jobDefinitionName": "string", "revision": number}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
jobDefinitionArn (p. 51)
The Amazon Resource Name (ARN) of the job definition.
Type: StringjobDefinitionName (p. 51)
The name of the job definition.
Type: Stringrevision (p. 51)
The revision of the job definition.
Type: Integer
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExamplesIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
API Version 2016-08-1051
AWS Batch API ReferenceExamples
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example registers a job definition for a simple container job.
Sample Request
POST /v1/registerjobdefinition HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 153Authorization: AUTHPARAMSX-Amz-Date: 20161128T215526ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "containerProperties": { "image": "busybox", "command": [ "sleep", "10" ], "vcpus": 1, "memory": 128 }, "type": "container", "jobDefinitionName": "sleep10"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 127Connection: keep-aliveDate: Mon, 28 Nov 2016 21:55:27 GMTx-amzn-RequestId: 5f0a08ec-b5b5-11e6-90ed-f72854f7eb90X-Amzn-Trace-Id: Root=1-583ca7ce-bda1f338231616471b2efcedX-Cache: Miss from cloudfrontVia: 1.1 7a06af51e583997d8673ab89482dd45a.cloudfront.net (CloudFront)X-Amz-Cf-Id: Y14HPNWWcKgm1U0wJPfLBzLDvrMSdyuHo4GMi0oQwI0ukruLpi0nFw==
{ "jobDefinitionName": "sleep10", "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep10:1", "revision": 1}
ExampleThis example registers a job definition for a simple container job with retries.
Sample Request
POST /v1/registerjobdefinition HTTP/1.1
API Version 2016-08-1052
AWS Batch API ReferenceSee Also
Host: batch-beta.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 320Authorization: AUTHPARAMSX-Amz-Date: 20170327T145208ZUser-Agent: aws-cli/1.11.66 Python/2.7.10 Darwin/16.4.0 botocore/1.5.29
{ "containerProperties": { "mountPoints": [], "image": "amazonlinux", "environment": [], "vcpus": 1, "command": [ "/bin/bash", "-c", "exit $AWS_BATCH_JOB_ATTEMPT" ], "volumes": [], "memory": 2, "ulimits": [] }, "retryStrategy": { "attempts": 3 }, "jobDefinitionName": "EchoAttemptNumber", "parameters": {}, "type": "container"}
Sample Response
HTTP/1.1 200 OKDate: Mon, 27 Mar 2017 14:51:58 GMTContent-Type: application/jsonContent-Length: 147Connection: keep-alivex-amzn-RequestId: edbe4e89-12fc-11e7-a2c6-31d9fbe506fcX-Amzn-Trace-Id: Root=1-58d9270e-56b3c6e2a91e74ef4c35a9c5X-Cache: Miss from cloudfrontVia: 1.1 861b49a34b383ce3ac4ea8b7117b8953.cloudfront.net (CloudFront)X-Amz-Cf-Id: l3zCxHtlIx4c1-RN2vkqIlpSbU9tsZNxfMSg6oIf700wg1BX0V5f_A==
{ "jobDefinitionName": "EchoAttemptNumber", "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/EchoAttemptNumber:1", "revision": 1}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript
API Version 2016-08-1053
AWS Batch API ReferenceSee Also
• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1054
AWS Batch API ReferenceSubmitJob
SubmitJobSubmits an AWS Batch job from a job definition. Parameters specified during SubmitJob (p. 55)override parameters defined in the job definition.
Request SyntaxPOST /v1/submitjob HTTP/1.1Content-type: application/json
{ "arrayProperties": { "size": number }, "containerOverrides": { "command": [ "string" ], "environment": [ { "name": "string", "value": "string" } ], "memory": number, "vcpus": number }, "dependsOn": [ { "jobId": "string", "type": "string" } ], "jobDefinition": "string", "jobName": "string", "jobQueue": "string", "parameters": { "string" : "string" }, "retryStrategy": { "attempts": number }, "timeout": { "attemptDurationSeconds": number }}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
arrayProperties (p. 55)
The array properties for the submitted job, such as the size of the array. The array size can bebetween 2 and 10,000. If you specify array properties for a job, it becomes an array job. For moreinformation, see Array Jobs in the AWS Batch User Guide.
API Version 2016-08-1055
AWS Batch API ReferenceRequest Body
Type: ArrayProperties (p. 71) object
Required: NocontainerOverrides (p. 55)
A list of container overrides in JSON format that specify the name of a container in the specified jobdefinition and the overrides it should receive. You can override the default command for a container(that is specified in the job definition or the Docker image) with a command override. You can alsooverride existing environment variables (that are specified in the job definition or Docker image) on acontainer or add new environment variables to it with an environment override.
Type: ContainerOverrides (p. 87) object
Required: NodependsOn (p. 55)
A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify aSEQUENTIAL type dependency without specifying a job ID for array jobs so that each child array jobcompletes sequentially, starting at index 0. You can also specify an N_TO_N type dependency with ajob ID for array jobs so that each index child of this job must wait for the corresponding index childof each dependency to complete before it can begin.
Type: Array of JobDependency (p. 95) objects
Required: NojobDefinition (p. 55)
The job definition used by this job. This value can be either a name:revision or the AmazonResource Name (ARN) for the job definition.
Type: String
Required: YesjobName (p. 55)
The name of the job. The first character must be alphanumeric, and up to 128 letters (uppercase andlowercase), numbers, hyphens, and underscores are allowed.
Type: String
Required: YesjobQueue (p. 55)
The job queue into which the job is submitted. You can specify either the name or the AmazonResource Name (ARN) of the queue.
Type: String
Required: Yesparameters (p. 55)
Additional parameters passed to the job that replace parameter substitution placeholders that areset in the job definition. Parameters are specified as a key and value pair mapping. Parameters in aSubmitJob request override any corresponding parameter defaults from the job definition.
Type: String to string map
Required: No
API Version 2016-08-1056
AWS Batch API ReferenceResponse Syntax
retryStrategy (p. 55)
The retry strategy to use for failed jobs from this SubmitJob (p. 55) operation. When a retrystrategy is specified here, it overrides the retry strategy defined in the job definition.
Type: RetryStrategy (p. 106) object
Required: Notimeout (p. 55)
The timeout configuration for this SubmitJob (p. 55) operation. You can specify a timeoutduration after which AWS Batch terminates your jobs if they have not finished. If a job is terminateddue to a timeout, it is not retried. The minimum value for the timeout is 60 seconds. Thisconfiguration overrides any timeout configuration specified in the job definition. For array jobs, childjobs have the same timeout configuration as the parent job. For more information, see Job Timeoutsin the Amazon Elastic Container Service Developer Guide.
Type: JobTimeout (p. 103) object
Required: No
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "jobId": "string", "jobName": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
jobId (p. 57)
The unique identifier for the job.
Type: StringjobName (p. 57)
The name of the job.
Type: String
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400
API Version 2016-08-1057
AWS Batch API ReferenceExample
ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example submits a simple container job called example to the HighPriority job queue.
Sample Request
POST /v1/submitjob HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 78Authorization: AUTHPARAMSX-Amz-Date: 20161129T201034ZUser-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.1.0 botocore/1.4.79
{ "jobName": "example", "jobQueue": "HighPriority", "jobDefinition": "sleep60"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 82Connection: keep-aliveDate: Tue, 29 Nov 2016 20:10:34 GMTx-amzn-RequestId: e2e433cf-b66f-11e6-8321-7fedcfd554e5X-Amzn-Trace-Id: Root=1-583de0ba-d26be22c375ed3416b2e18b7X-Cache: Miss from cloudfrontVia: 1.1 6ba12aeff47e3e7677e084594bfce5e1.cloudfront.net (CloudFront)X-Amz-Cf-Id: QoWCvISTvYBbaP2hAoxC8_TWTl2JN-kNASYCjCJ5HztN0e1OuzvpSA==
{ "jobName": "example", "jobId": "876da822-4198-45f2-a252-6cea32512ea8"}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
API Version 2016-08-1058
AWS Batch API ReferenceSee Also
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1059
AWS Batch API ReferenceTerminateJob
TerminateJobTerminates 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 arecancelled.
Request Syntax
POST /v1/terminatejob HTTP/1.1Content-type: application/json
{ "jobId": "string", "reason": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
jobId (p. 60)
The AWS Batch job ID of the job to terminate.
Type: String
Required: Yes
reason (p. 60)
A message to attach to the job that explains the reason for canceling it. This message is returned byfuture DescribeJobs (p. 39) operations on the job. This message is also recorded in the AWS Batchactivity logs.
Type: String
Required: Yes
Response Syntax
HTTP/1.1 200
Response ElementsIf the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
API Version 2016-08-1060
AWS Batch API ReferenceErrors
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example terminates a job with the specified job ID.
Sample Request
POST /v1/terminatejob HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 79Authorization: AUTHPARAMSX-Amz-Date: 20161129T202905ZUser-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.1.0 botocore/1.4.79
{ "reason": "Terminating job.", "jobId": "61e743ed-35e4-48da-b2de-5c8333821c84"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 2Connection: keep-aliveDate: Tue, 29 Nov 2016 20:29:06 GMTx-amzn-RequestId: 795eee02-b672-11e6-8460-6d7ce4bf85d3X-Amzn-Trace-Id: Root=1-583de512-8c218eec31cef60008ef7d93X-Cache: Miss from cloudfrontVia: 1.1 16d2657cebef5191828b055567b4efeb.cloudfront.net (CloudFront)X-Amz-Cf-Id: 681NTs_bPulMwja2HekWMwngcUzx2a8w_oaG27W0L4Pjct7W1T-Fvw==
API Version 2016-08-1061
AWS Batch API ReferenceSee Also
{}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1062
AWS Batch API ReferenceUpdateComputeEnvironment
UpdateComputeEnvironmentUpdates an AWS Batch compute environment.
Request SyntaxPOST /v1/updatecomputeenvironment HTTP/1.1Content-type: application/json
{ "computeEnvironment": "string", "computeResources": { "desiredvCpus": number, "maxvCpus": number, "minvCpus": number }, "serviceRole": "string", "state": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
computeEnvironment (p. 63)
The name or full Amazon Resource Name (ARN) of the compute environment to update.
Type: String
Required: YescomputeResources (p. 63)
Details of the compute resources managed by the compute environment. Required for a managedcompute environment.
Type: ComputeResourceUpdate (p. 83) object
Required: NoserviceRole (p. 63)
The full Amazon Resource Name (ARN) of the IAM role that allows AWS Batch to make calls to otherAWS services on your behalf.
If your specified role has a path other than /, then you must either specify the full role ARN (this isrecommended) or prefix the role name with the path.
NoteDepending on how you created your AWS Batch service role, its ARN may contain theservice-role path prefix. When you only specify the name of the service role, AWS Batchassumes that your ARN does not use the service-role path prefix. Because of this, werecommend that you specify the full ARN of your service role when you create computeenvironments.
API Version 2016-08-1063
AWS Batch API ReferenceResponse Syntax
Type: String
Required: Nostate (p. 63)
The state of the compute environment. Compute environments in the ENABLED state can acceptjobs from a queue and scale in or out automatically based on the workload demand of its associatedqueues.
Type: String
Valid Values: ENABLED | DISABLED
Required: No
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "computeEnvironmentArn": "string", "computeEnvironmentName": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
computeEnvironmentArn (p. 64)
The Amazon Resource Name (ARN) of the compute environment.
Type: StringcomputeEnvironmentName (p. 64)
The name of compute environment.
Type: String
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
API Version 2016-08-1064
AWS Batch API ReferenceExample
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example disables the P3OnDemand compute environment so it can be deleted.
Sample Request
POST /v1/updatecomputeenvironment HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 57Authorization: AUTHPARAMSX-Amz-Date: 20161128T194248ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "computeEnvironment": "P3OnDemand", "state": "DISABLED"}
Sample Response
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 133Connection: keep-aliveDate: Mon, 28 Nov 2016 19:42:49 GMTx-amzn-RequestId: d7d41aba-b5a2-11e6-bbde-956d603f3192X-Amzn-Trace-Id: Root=1-583c88b9-c30dd12f24398eef8bd95ed7X-Cache: Miss from cloudfrontVia: 1.1 7f3f42df8af148df1f9f1ee7175987ad.cloudfront.net (CloudFront)X-Amz-Cf-Id: uxJn0P7cg_1RTxOs15FkCItWfmCeniKMZdXlFWaOfPfjqATHw3j-AA==
{ "computeEnvironmentName": "P3OnDemand", "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/P3OnDemand"}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go
API Version 2016-08-1065
AWS Batch API ReferenceSee Also
• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1066
AWS Batch API ReferenceUpdateJobQueue
UpdateJobQueueUpdates a job queue.
Request SyntaxPOST /v1/updatejobqueue HTTP/1.1Content-type: application/json
{ "computeEnvironmentOrder": [ { "computeEnvironment": "string", "order": number } ], "jobQueue": "string", "priority": number, "state": "string"}
URI Request ParametersThe request does not use any URI parameters.
Request BodyThe request accepts the following data in JSON format.
computeEnvironmentOrder (p. 67)
Details the set of compute environments mapped to a job queue and their order relative to eachother. This is one of the parameters used by the job scheduler to determine which computeenvironment should execute a given job.
Type: Array of ComputeEnvironmentOrder (p. 79) objects
Required: NojobQueue (p. 67)
The name or the Amazon Resource Name (ARN) of the job queue.
Type: String
Required: Yespriority (p. 67)
The priority of the job queue. Job queues with a higher priority (or a higher integer value for thepriority parameter) are evaluated first when associated with same compute environment. Priorityis determined in descending order, for example, a job queue with a priority value of 10 is givenscheduling preference over a job queue with a priority value of 1.
Type: Integer
Required: Nostate (p. 67)
Describes the queue's ability to accept new jobs.
API Version 2016-08-1067
AWS Batch API ReferenceResponse Syntax
Type: String
Valid Values: ENABLED | DISABLED
Required: No
Response SyntaxHTTP/1.1 200Content-type: application/json
{ "jobQueueArn": "string", "jobQueueName": "string"}
Response ElementsIf the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
jobQueueArn (p. 68)
The Amazon Resource Name (ARN) of the job queue.
Type: StringjobQueueName (p. 68)
The name of the job queue.
Type: String
ErrorsClientException
These errors are usually caused by a client action, such as using an action or resource on behalf ofa user that doesn't have permissions to use the action or resource, or specifying an identifier that isnot valid.
HTTP Status Code: 400ServerException
These errors are usually caused by a server issue.
HTTP Status Code: 500
ExampleIn the following example or examples, the Authorization header contents (AUTHPARAMS) must bereplaced with an AWS Signature Version 4 signature. For more information about creating thesesignatures, see Signature Version 4 Signing Process in the AWS General Reference.
API Version 2016-08-1068
AWS Batch API ReferenceSee Also
You only need to learn how to sign HTTP requests if you intend to manually create them. When you usethe AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, thesetools automatically sign the requests for you with the access key that you specify when you configure thetools. When you use these tools, you don't need to learn how to sign requests yourself.
ExampleThis example disables a job queue so that it can be deleted.
Sample Request
POST /v1/updatejobqueue HTTP/1.1Host: batch.us-east-1.amazonaws.comAccept-Encoding: identityContent-Length: 42Authorization: AUTHPARAMSX-Amz-Date: 20161128T201802ZUser-Agent: aws-cli/1.11.21 Python/2.7.12 Darwin/16.1.0 botocore/1.4.78
{ "state": "DISABLED", "jobQueue": "GPGPU"}
Sample Response
HTTP/1.1 200 OKDate: Mon, 28 Nov 2016 20:18:03 GMTContent-Type: application/jsonContent-Length: 93Connection: keep-alivex-amzn-RequestId: c3ad778b-b5a7-11e6-8ed7-ede4d5ff654aX-Amzn-Trace-Id: Root=1-583c90fa-b6f9f9acb4b6f8bc81725c75X-Cache: Miss from cloudfrontVia: 1.1 17de248e6d780f737234d37cc490dbe3.cloudfront.net (CloudFront)X-Amz-Cf-Id: aVju0hE8eLpjSFl8Y3fOuxgOZXdigQlLcDMwO0plxnynw0dEsOsEgw==
{ "jobQueueName": "GPGPU", "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/GPGPU"}
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface• AWS SDK for .NET• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for JavaScript• AWS SDK for PHP V3• AWS SDK for Python• AWS SDK for Ruby V2
API Version 2016-08-1069
AWS Batch API Reference
Data TypesThe AWS Batch API contains several data types that various actions use. This section describes each datatype in detail.
NoteThe order of each element in a data type structure is not guaranteed. Applications should notassume a particular order.
The following data types are supported:
• ArrayProperties (p. 71)• ArrayPropertiesDetail (p. 72)• ArrayPropertiesSummary (p. 73)• AttemptContainerDetail (p. 74)• AttemptDetail (p. 76)• ComputeEnvironmentDetail (p. 77)• ComputeEnvironmentOrder (p. 79)• ComputeResource (p. 80)• ComputeResourceUpdate (p. 83)• ContainerDetail (p. 84)• ContainerOverrides (p. 87)• ContainerProperties (p. 88)• ContainerSummary (p. 91)• Host (p. 92)• JobDefinition (p. 93)• JobDependency (p. 95)• JobDetail (p. 96)• JobQueueDetail (p. 99)• JobSummary (p. 101)• JobTimeout (p. 103)• KeyValuePair (p. 104)• MountPoint (p. 105)• RetryStrategy (p. 106)• Ulimit (p. 107)• Volume (p. 108)
API Version 2016-08-1070
AWS Batch API ReferenceArrayProperties
ArrayPropertiesAn object representing an AWS Batch array job.
Contentssize
The size of the array job.
Type: Integer
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1071
AWS Batch API ReferenceArrayPropertiesDetail
ArrayPropertiesDetailAn object representing the array properties of a job.
Contentsindex
The job index within the array that is associated with this job. This parameter is returned for arrayjob children.
Type: Integer
Required: Nosize
The size of the array job. This parameter is returned for parent array jobs.
Type: Integer
Required: NostatusSummary
A summary of the number of array job children in each available job status. This parameter isreturned for parent array jobs.
Type: String to integer map
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1072
AWS Batch API ReferenceArrayPropertiesSummary
ArrayPropertiesSummaryAn object representing the array properties of a job.
Contentsindex
The job index within the array that is associated with this job. This parameter is returned for childrenof array jobs.
Type: Integer
Required: Nosize
The size of the array job. This parameter is returned for parent array jobs.
Type: Integer
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1073
AWS Batch API ReferenceAttemptContainerDetail
AttemptContainerDetailAn object representing the details of a container that is part of a job attempt.
ContentscontainerInstanceArn
The Amazon Resource Name (ARN) of the Amazon ECS container instance that hosts the jobattempt.
Type: String
Required: NoexitCode
The exit code for the job attempt. A non-zero exit code is considered a failure.
Type: Integer
Required: NologStreamName
The name of the CloudWatch Logs log stream associated with the container. The log group for AWSBatch jobs is /aws/batch/job. Each container attempt receives a log stream name when theyreach the RUNNING status.
Type: String
Required: Noreason
A short (255 max characters) human-readable string to provide additional details about a running orstopped container.
Type: String
Required: NotaskArn
The Amazon Resource Name (ARN) of the Amazon ECS task that is associated with the job attempt.Each container attempt receives a task ARN when they reach the STARTING status.
Type: String
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1074
AWS Batch API ReferenceAttemptDetail
AttemptDetailAn object representing a job attempt.
Contentscontainer
Details about the container in this job attempt.
Type: AttemptContainerDetail (p. 74) object
Required: NostartedAt
The Unix time stamp (in seconds and milliseconds) for when the attempt was started (when theattempt transitioned from the STARTING state to the RUNNING state).
Type: Long
Required: NostatusReason
A short, human-readable string to provide additional details about the current status of the jobattempt.
Type: String
Required: NostoppedAt
The Unix time stamp (in seconds and milliseconds) for when the attempt was stopped (when theattempt transitioned from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED).
Type: Long
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1076
AWS Batch API ReferenceComputeEnvironmentDetail
ComputeEnvironmentDetailAn object representing an AWS Batch compute environment.
ContentscomputeEnvironmentArn
The Amazon Resource Name (ARN) of the compute environment.
Type: String
Required: YescomputeEnvironmentName
The name of the compute environment.
Type: String
Required: YescomputeResources
The compute resources defined for the compute environment.
Type: ComputeResource (p. 80) object
Required: NoecsClusterArn
The Amazon Resource Name (ARN) of the underlying Amazon ECS cluster used by the computeenvironment.
Type: String
Required: YesserviceRole
The service role associated with the compute environment that allows AWS Batch to make calls toAWS API operations on your behalf.
Type: String
Required: Nostate
The state of the compute environment. The valid values are ENABLED or DISABLED. An ENABLEDstate indicates that you can register instances with the compute environment and that theassociated instances can accept jobs.
Type: String
Valid Values: ENABLED | DISABLED
Required: Nostatus
The current status of the compute environment (for example, CREATING or VALID).
API Version 2016-08-1077
AWS Batch API ReferenceSee Also
Type: String
Valid Values: CREATING | UPDATING | DELETING | DELETED | VALID | INVALID
Required: NostatusReason
A short, human-readable string to provide additional details about the current status of the computeenvironment.
Type: String
Required: Notype
The type of the compute environment.
Type: String
Valid Values: MANAGED | UNMANAGED
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1078
AWS Batch API ReferenceComputeEnvironmentOrder
ComputeEnvironmentOrderThe order in which compute environments are tried for job placement within a queue. Computeenvironments are tried in ascending order. For example, if two compute environments are associatedwith a job queue, the compute environment with a lower order integer value is tried for job placementfirst.
ContentscomputeEnvironment
The Amazon Resource Name (ARN) of the compute environment.
Type: String
Required: Yesorder
The order of the compute environment.
Type: Integer
Required: Yes
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1079
AWS Batch API ReferenceComputeResource
ComputeResourceAn object representing an AWS Batch compute resource.
ContentsbidPercentage
The minimum percentage that a Spot Instance price must be when compared with the On-Demandprice for that instance type before instances are launched. For example, if your bidPercentage is20, then the Spot price must be below 20% of the current On-Demand price for that EC2 instance.
Type: Integer
Required: NodesiredvCpus
The desired number of EC2 vCPUS in the compute environment.
Type: Integer
Required: Noec2KeyPair
The EC2 key pair that is used for instances launched in the compute environment.
Type: String
Required: NoimageId
The Amazon Machine Image (AMI) ID used for instances launched in the compute environment.
Type: String
Required: NoinstanceRole
The Amazon ECS instance profile applied to Amazon EC2 instances in a compute environment.You can specify the short name or full Amazon Resource Name (ARN) of an instance profile. Forexample, ecsInstanceRole or arn:aws:iam::<aws_account_id>:instance-profile/ecsInstanceRole. For more information, see Amazon ECS Instance Role in the AWS Batch UserGuide.
Type: String
Required: YesinstanceTypes
The instances types that may be launched. You can specify instance families to launch any instancetype within those families (for example, c4 or p3), or you can specify specific sizes within a family(such as c4.8xlarge). You can also choose optimal to pick instance types (from the latest C, M,and R instance families) on the fly that match the demand of your job queues.
Type: Array of strings
Required: Yes
API Version 2016-08-1080
AWS Batch API ReferenceSee Also
maxvCpus
The maximum number of EC2 vCPUs that an environment can reach.
Type: Integer
Required: YesminvCpus
The minimum number of EC2 vCPUs that an environment should maintain.
Type: Integer
Required: YessecurityGroupIds
The EC2 security group that is associated with instances launched in the compute environment.
Type: Array of strings
Required: YesspotIamFleetRole
The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied to a SPOTcompute environment.
Type: String
Required: Nosubnets
The VPC subnets into which the compute resources are launched.
Type: Array of strings
Required: Yestags
Key-value pair tags to be applied to resources that are launched in the compute environment.
Type: String to string map
Required: Notype
The type of compute environment.
Type: String
Valid Values: EC2 | SPOT
Required: Yes
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
API Version 2016-08-1081
AWS Batch API ReferenceSee Also
• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1082
AWS Batch API ReferenceComputeResourceUpdate
ComputeResourceUpdateAn object representing the attributes of a compute environment that can be updated.
ContentsdesiredvCpus
The desired number of EC2 vCPUS in the compute environment.
Type: Integer
Required: NomaxvCpus
The maximum number of EC2 vCPUs that an environment can reach.
Type: Integer
Required: NominvCpus
The minimum number of EC2 vCPUs that an environment should maintain.
Type: Integer
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1083
AWS Batch API ReferenceContainerDetail
ContainerDetailAn object representing the details of a container that is part of a job.
Contentscommand
The command that is passed to the container.
Type: Array of strings
Required: NocontainerInstanceArn
The Amazon Resource Name (ARN) of the container instance on which the container is running.
Type: String
Required: Noenvironment
The environment variables to pass to a container.
NoteEnvironment variables must not start with AWS_BATCH; this naming convention is reservedfor variables that are set by the AWS Batch service.
Type: Array of KeyValuePair (p. 104) objects
Required: NoexitCode
The exit code to return upon completion.
Type: Integer
Required: Noimage
The image used to start the container.
Type: String
Required: NojobRoleArn
The Amazon Resource Name (ARN) associated with the job upon execution.
Type: String
Required: NologStreamName
The name of the CloudWatch Logs log stream associated with the container. The log group for AWSBatch jobs is /aws/batch/job. Each container attempt receives a log stream name when theyreach the RUNNING status.
API Version 2016-08-1084
AWS Batch API ReferenceContents
Type: String
Required: Nomemory
The number of MiB of memory reserved for the job.
Type: Integer
Required: NomountPoints
The mount points for data volumes in your container.
Type: Array of MountPoint (p. 105) objects
Required: Noprivileged
When this parameter is true, the container is given elevated privileges on the host container instance(similar to the root user).
Type: Boolean
Required: NoreadonlyRootFilesystem
When this parameter is true, the container is given read-only access to its root file system.
Type: Boolean
Required: Noreason
A short (255 max characters) human-readable string to provide additional details about a running orstopped container.
Type: String
Required: NotaskArn
The Amazon Resource Name (ARN) of the Amazon ECS task that is associated with the container job.Each container attempt receives a task ARN when they reach the STARTING status.
Type: String
Required: Noulimits
A list of ulimit values to set in the container.
Type: Array of Ulimit (p. 107) objects
Required: Nouser
The user name to use inside the container.
Type: String
API Version 2016-08-1085
AWS Batch API ReferenceSee Also
Required: Novcpus
The number of VCPUs allocated for the job.
Type: Integer
Required: Novolumes
A list of volumes associated with the job.
Type: Array of Volume (p. 108) objects
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1086
AWS Batch API ReferenceContainerOverrides
ContainerOverridesThe overrides that should be sent to a container.
Contentscommand
The command to send to the container that overrides the default command from the Docker imageor the job definition.
Type: Array of strings
Required: Noenvironment
The environment variables to send to the container. You can add new environment variables, whichare added to the container at launch, or you can override the existing environment variables fromthe Docker image or the job definition.
NoteEnvironment variables must not start with AWS_BATCH; this naming convention is reservedfor variables that are set by the AWS Batch service.
Type: Array of KeyValuePair (p. 104) objects
Required: Nomemory
The number of MiB of memory reserved for the job. This value overrides the value set in the jobdefinition.
Type: Integer
Required: Novcpus
The number of vCPUs to reserve for the container. This value overrides the value set in the jobdefinition.
Type: Integer
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1087
AWS Batch API ReferenceContainerProperties
ContainerPropertiesContainer properties are used in job definitions to describe the container that is launched as part of ajob.
Contentscommand
The command that is passed to the container. This parameter maps to Cmd in the Create a containersection of the Docker Remote API and the COMMAND parameter to docker run. For more information,see https://docs.docker.com/engine/reference/builder/#cmd.
Type: Array of strings
Required: Noenvironment
The environment variables to pass to a container. This parameter maps to Env in the Create acontainer section of the Docker Remote API and the --env option to docker run.
ImportantWe do not recommend using plaintext environment variables for sensitive information, suchas credential data.
NoteEnvironment variables must not start with AWS_BATCH; this naming convention is reservedfor variables that are set by the AWS Batch service.
Type: Array of KeyValuePair (p. 104) objects
Required: Noimage
The image used to start a container. This string is passed directly to the Docker daemon. Imagesin 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 mapsto Image in the Create a container section of the Docker Remote API and the IMAGE parameter ofdocker 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).
Type: String
Required: YesjobRoleArn
The Amazon Resource Name (ARN) of the IAM role that the container can assume for AWSpermissions.
Type: String
API Version 2016-08-1088
AWS Batch API ReferenceContents
Required: Nomemory
The hard limit (in MiB) of memory to present to the container. If your container attempts to exceedthe memory specified here, the container is killed. This parameter maps to Memory in the Createa container section of the Docker Remote API and the --memory option to docker run. You mustspecify at least 4 MiB of memory for a job.
NoteIf you are trying to maximize your resource utilization by providing your jobs as muchmemory as possible for a particular instance type, see Memory Management in the AWSBatch User Guide.
Type: Integer
Required: YesmountPoints
The mount points for data volumes in your container. This parameter maps to Volumes in theCreate a container section of the Docker Remote API and the --volume option to docker run.
Type: Array of MountPoint (p. 105) objects
Required: Noprivileged
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 ofthe Docker Remote API and the --privileged option to docker run.
Type: Boolean
Required: NoreadonlyRootFilesystem
When this parameter is true, the container is given read-only access to its root file system. Thisparameter maps to ReadonlyRootfs in the Create a container section of the Docker Remote APIand the --read-only option to docker run.
Type: Boolean
Required: Noulimits
A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a containersection of the Docker Remote API and the --ulimit option to docker run.
Type: Array of Ulimit (p. 107) objects
Required: Nouser
The user name to use inside the container. This parameter maps to User in the Create a containersection of the Docker Remote API and the --user option to docker run.
Type: String
Required: No
API Version 2016-08-1089
AWS Batch API ReferenceSee Also
vcpus
The number of vCPUs reserved for the container. This parameter maps to CpuShares in the Createa container section of the Docker Remote API and the --cpu-shares option to docker run. EachvCPU is equivalent to 1,024 CPU shares. You must specify at least one vCPU.
Type: Integer
Required: Yesvolumes
A list of data volumes used in a job.
Type: Array of Volume (p. 108) objects
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1090
AWS Batch API ReferenceContainerSummary
ContainerSummaryAn object representing summary details of a container within a job.
ContentsexitCode
The exit code to return upon completion.
Type: Integer
Required: Noreason
A short (255 max characters) human-readable string to provide additional details about a running orstopped container.
Type: String
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1091
AWS Batch API ReferenceHost
HostThe contents of the host parameter determine whether your data volume persists on the host containerinstance and where it is stored. If the host parameter is empty, then the Docker daemon assigns a hostpath for your data volume, but the data is not guaranteed to persist after the containers associated withit stop running.
ContentssourcePath
The path on the host container instance that is presented to the container. If this parameter isempty, then the Docker daemon has assigned a host path for you. If the host parameter containsa sourcePath file location, then the data volume persists at the specified location on the hostcontainer instance until you delete it manually. If the sourcePath value does not exist on the hostcontainer instance, the Docker daemon creates it. If the location does exist, the contents of thesource path folder are exported.
Type: String
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1092
AWS Batch API ReferenceJobDefinition
JobDefinitionAn object representing an AWS Batch job definition.
ContentscontainerProperties
An object with various properties specific to container-based jobs.
Type: ContainerProperties (p. 88) object
Required: NojobDefinitionArn
The Amazon Resource Name (ARN) for the job definition.
Type: String
Required: YesjobDefinitionName
The name of the job definition.
Type: String
Required: Yesparameters
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 overrideany corresponding parameter defaults from the job definition.
Type: String to string map
Required: NoretryStrategy
The retry strategy to use for failed jobs that are submitted with this job definition.
Type: RetryStrategy (p. 106) object
Required: Norevision
The revision of the job definition.
Type: Integer
Required: Yesstatus
The status of the job definition.
Type: String
Required: No
API Version 2016-08-1093
AWS Batch API ReferenceSee Also
timeout
The timeout configuration for jobs that are submitted with this job definition. You can specify atimeout duration after which AWS Batch terminates your jobs if they have not finished.
Type: JobTimeout (p. 103) object
Required: Notype
The type of job definition.
Type: String
Required: Yes
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1094
AWS Batch API ReferenceJobDependency
JobDependencyAn object representing an AWS Batch job dependency.
ContentsjobId
The job ID of the AWS Batch job associated with this dependency.
Type: String
Required: Notype
The type of the job dependency.
Type: String
Valid Values: N_TO_N | SEQUENTIAL
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1095
AWS Batch API ReferenceJobDetail
JobDetailAn object representing an AWS Batch job.
ContentsarrayProperties
The array properties of the job, if it is an array job.
Type: ArrayPropertiesDetail (p. 72) object
Required: Noattempts
A list of job attempts associated with this job.
Type: Array of AttemptDetail (p. 76) objects
Required: Nocontainer
An object representing the details of the container that is associated with the job.
Type: ContainerDetail (p. 84) object
Required: NocreatedAt
The Unix time stamp (in seconds and milliseconds) for when the job was created. For non-array jobs and parent array jobs, this is when the job entered the SUBMITTED state (at the timeSubmitJob (p. 55) was called). For array child jobs, this is when the child job was spawned by itsparent and entered the PENDING state.
Type: Long
Required: NodependsOn
A list of job names or IDs on which this job depends.
Type: Array of JobDependency (p. 95) objects
Required: NojobDefinition
The job definition that is used by this job.
Type: String
Required: YesjobId
The ID for the job.
Type: String
Required: Yes
API Version 2016-08-1096
AWS Batch API ReferenceContents
jobName
The name of the job.
Type: String
Required: YesjobQueue
The Amazon Resource Name (ARN) of the job queue with which the job is associated.
Type: String
Required: Yesparameters
Additional parameters passed to the job that replace parameter substitution placeholders oroverride any corresponding parameter defaults from the job definition.
Type: String to string map
Required: NoretryStrategy
The retry strategy to use for this job if an attempt fails.
Type: RetryStrategy (p. 106) object
Required: NostartedAt
The Unix time stamp (in seconds and milliseconds) for when the job was started (when the jobtransitioned from the STARTING state to the RUNNING state).
Type: Long
Required: Yesstatus
The current status for the job.
Type: String
Valid Values: SUBMITTED | PENDING | RUNNABLE | STARTING | RUNNING | SUCCEEDED |FAILED
Required: YesstatusReason
A short, human-readable string to provide additional details about the current status of the job.
Type: String
Required: NostoppedAt
The Unix time stamp (in seconds and milliseconds) for when the job was stopped (when the jobtransitioned from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED).
Type: Long
API Version 2016-08-1097
AWS Batch API ReferenceSee Also
Required: Notimeout
The timeout configuration for the job.
Type: JobTimeout (p. 103) object
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-1098
AWS Batch API ReferenceJobQueueDetail
JobQueueDetailAn object representing the details of an AWS Batch job queue.
ContentscomputeEnvironmentOrder
The compute environments that are attached to the job queue and the order in which job placementis preferred. Compute environments are selected for job placement in ascending order.
Type: Array of ComputeEnvironmentOrder (p. 79) objects
Required: YesjobQueueArn
The Amazon Resource Name (ARN) of the job queue.
Type: String
Required: YesjobQueueName
The name of the job queue.
Type: String
Required: Yespriority
The priority of the job queue.
Type: Integer
Required: Yesstate
Describes the ability of the queue to accept new jobs.
Type: String
Valid Values: ENABLED | DISABLED
Required: Yesstatus
The status of the job queue (for example, CREATING or VALID).
Type: String
Valid Values: CREATING | UPDATING | DELETING | DELETED | VALID | INVALID
Required: NostatusReason
A short, human-readable string to provide additional details about the current status of the jobqueue.
API Version 2016-08-1099
AWS Batch API ReferenceSee Also
Type: String
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-10100
AWS Batch API ReferenceJobSummary
JobSummaryAn object representing summary details of a job.
ContentsarrayProperties
The array properties of the job, if it is an array job.
Type: ArrayPropertiesSummary (p. 73) object
Required: Nocontainer
An object representing the details of the container that is associated with the job.
Type: ContainerSummary (p. 91) object
Required: NocreatedAt
The Unix time stamp for when the job was created. For non-array jobs and parent array jobs, thisis when the job entered the SUBMITTED state (at the time SubmitJob (p. 55) was called). For arraychild jobs, this is when the child job was spawned by its parent and entered the PENDING state.
Type: Long
Required: NojobId
The ID of the job.
Type: String
Required: YesjobName
The name of the job.
Type: String
Required: YesstartedAt
The Unix time stamp for when the job was started (when the job transitioned from the STARTINGstate to the RUNNING state).
Type: Long
Required: Nostatus
The current status for the job.
Type: String
API Version 2016-08-10101
AWS Batch API ReferenceSee Also
Valid Values: SUBMITTED | PENDING | RUNNABLE | STARTING | RUNNING | SUCCEEDED |FAILED
Required: NostatusReason
A short, human-readable string to provide additional details about the current status of the job.
Type: String
Required: NostoppedAt
The Unix time stamp for when the job was stopped (when the job transitioned from the RUNNINGstate to a terminal state, such as SUCCEEDED or FAILED).
Type: Long
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-10102
AWS Batch API ReferenceJobTimeout
JobTimeoutAn object representing a job timeout configuration.
ContentsattemptDurationSeconds
The time duration in seconds (measured from the job attempt's startedAt timestamp) after whichAWS Batch terminates your jobs if they have not finished.
Type: Integer
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-10103
AWS Batch API ReferenceKeyValuePair
KeyValuePairA key-value pair object.
Contentsname
The name of the key-value pair. For environment variables, this is the name of the environmentvariable.
Type: String
Required: Novalue
The value of the key-value pair. For environment variables, this is the value of the environmentvariable.
Type: String
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-10104
AWS Batch API ReferenceMountPoint
MountPointDetails on a Docker volume mount point that is used in a job's container properties.
ContentscontainerPath
The path on the container at which to mount the host volume.
Type: String
Required: NoreadOnly
If this value is true, the container has read-only access to the volume; otherwise, the container canwrite to the volume. The default value is false.
Type: Boolean
Required: NosourceVolume
The name of the volume to mount.
Type: String
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-10105
AWS Batch API ReferenceRetryStrategy
RetryStrategyThe retry strategy associated with a job.
Contentsattempts
The number of times to move a job to the RUNNABLE status. You may specify between 1 and 10attempts. If the value of attempts is greater than one, the job is retried if it fails until it has movedto RUNNABLE that many times.
Type: Integer
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-10106
AWS Batch API ReferenceUlimit
UlimitThe ulimit settings to pass to the container.
ContentshardLimit
The hard limit for the ulimit type.
Type: Integer
Required: Yesname
The type of the ulimit.
Type: String
Required: YessoftLimit
The soft limit for the ulimit type.
Type: Integer
Required: Yes
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-10107
AWS Batch API ReferenceVolume
VolumeA data volume used in a job's container properties.
Contentshost
The contents of the host parameter determine whether your data volume persists on the hostcontainer instance and where it is stored. If the host parameter is empty, then the Docker daemonassigns a host path for your data volume. However, the data is not guaranteed to persist after thecontainers associated with it stop running.
Type: Host (p. 92) object
Required: Noname
The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, hyphens, andunderscores are allowed. This name is referenced in the sourceVolume parameter of containerdefinition mountPoints.
Type: String
Required: No
See AlsoFor more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++• AWS SDK for Go• AWS SDK for Java• AWS SDK for Ruby V2
API Version 2016-08-10108
AWS Batch API Reference
Common ParametersThe following list contains the parameters that all actions use for signing Signature Version 4 requestswith a query string. Any action-specific parameters are listed in the topic for that action. For moreinformation about Signature Version 4, see Signature Version 4 Signing Process in the Amazon WebServices General Reference.
Action
The action to be performed.
Type: string
Required: YesVersion
The API version that the request is written for, expressed in the format YYYY-MM-DD.
Type: string
Required: YesX-Amz-Algorithm
The hash algorithm that you used to create the request signature.
Condition: Specify this parameter when you include authentication information in a query stringinstead of in the HTTP authorization header.
Type: string
Valid Values: AWS4-HMAC-SHA256
Required: ConditionalX-Amz-Credential
The credential scope value, which is a string that includes your access key, the date, the region youare targeting, the service you are requesting, and a termination string ("aws4_request"). The value isexpressed in the following format: access_key/YYYYMMDD/region/service/aws4_request.
For more information, see Task 2: Create a String to Sign for Signature Version 4 in the Amazon WebServices General Reference.
Condition: Specify this parameter when you include authentication information in a query stringinstead of in the HTTP authorization header.
Type: string
Required: ConditionalX-Amz-Date
The date that is used to create the signature. The format must be ISO 8601 basic format(YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value:20120325T120000Z.
Condition: X-Amz-Date is optional for all requests; it can be used to override the date used forsigning requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is
API Version 2016-08-10109
AWS Batch API Reference
not required. When X-Amz-Date is used, it always overrides the value of the Date header. Formore information, see Handling Dates in Signature Version 4 in the Amazon Web Services GeneralReference.
Type: string
Required: ConditionalX-Amz-Security-Token
The temporary security token that was obtained through a call to AWS Security Token Service (AWSSTS). For a list of services that support temporary security credentials from AWS Security TokenService, go to AWS Services That Work with IAM in the IAM User Guide.
Condition: If you're using temporary security credentials from the AWS Security Token Service, youmust include the security token.
Type: string
Required: ConditionalX-Amz-Signature
Specifies the hex-encoded signature that was calculated from the string to sign and the derivedsigning key.
Condition: Specify this parameter when you include authentication information in a query stringinstead of in the HTTP authorization header.
Type: string
Required: ConditionalX-Amz-SignedHeaders
Specifies all the HTTP headers that were included as part of the canonical request. For moreinformation about specifying signed headers, see Task 1: Create a Canonical Request For SignatureVersion 4 in the Amazon Web Services General Reference.
Condition: Specify this parameter when you include authentication information in a query stringinstead of in the HTTP authorization header.
Type: string
Required: Conditional
API Version 2016-08-10110