AWS Batch
用户指南
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

作业定义模板

空作业定义模板如下所示。您可以使用此模板创建任务定义,随后可将任务定义保存到文件并与 AWS CLI --cli-input-json 选项结合使用。有关这些参数的更多信息,请参阅 作业定义参数

{ "jobDefinitionName": "", "type": "container", "parameters": { "KeyName": "" }, "containerProperties": { "image": "", "vcpus": 0, "memory": 0, "command": [ "" ], "jobRoleArn": "", "volumes": [ { "host": { "sourcePath": "" }, "name": "" } ], "environment": [ { "name": "", "value": "" } ], "mountPoints": [ { "containerPath": "", "readOnly": true, "sourceVolume": "" } ], "readonlyRootFilesystem": true, "privileged": true, "ulimits": [ { "hardLimit": 0, "name": "", "softLimit": 0 } ], "user": "", "instanceType": "" }, "nodeProperties": { "numNodes": 0, "mainNode": 0, "nodeRangeProperties": [ { "targetNodes": "", "container": { "image": "", "vcpus": 0, "memory": 0, "command": [ "" ], "jobRoleArn": "", "volumes": [ { "host": { "sourcePath": "" }, "name": "" } ], "environment": [ { "name": "", "value": "" } ], "mountPoints": [ { "containerPath": "", "readOnly": true, "sourceVolume": "" } ], "readonlyRootFilesystem": true, "privileged": true, "ulimits": [ { "hardLimit": 0, "name": "", "softLimit": 0 } ], "user": "", "instanceType": "" } } ] }, "retryStrategy": { "attempts": 0 }, "timeout": { "attemptDurationSeconds": 0 } }

注意

您可以使用以下 AWS CLI 命令生成上述作业定义模板:

$ aws batch register-job-definition --generate-cli-skeleton