计算环境模板 - Amazon Batch
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

计算环境模板

下面的示例演示了一个空计算环境模板。您可以使用此模板创建计算环境,随后可将计算环境保存到文件并与 Amazon CLI --cli-input-json 选项结合使用。有关这些参数的更多信息,请参阅CreateComputeEnvironment中的Amazon BatchAPI 参考

{ "computeEnvironmentName": "", "type": "UNMANAGED", "state": "ENABLED", "computeResources": { "type": "SPOT", "allocationStrategy": "SPOT_CAPACITY_OPTIMIZED", "minvCpus": 0, "maxvCpus": 0, "desiredvCpus": 0, "instanceTypes": [ "" ], "imageId": "", "subnets": [ "" ], "securityGroupIds": [ "" ], "ec2KeyPair": "", "instanceRole": "", "tags": { "KeyName": "" }, "placementGroup": "", "bidPercentage": 0, "spotIamFleetRole": "", "launchTemplate": { "launchTemplateId": "", "launchTemplateName": "", "version": "" }, "ec2Configuration": [ { "imageType": "", "imageIdOverride": "" } ] }, "serviceRole": "", "tags": { "KeyName": "" } }
注意

您可以使用以下命令生成上述计算环境模板Amazon CLI命令。

$ aws batch create-compute-environment --generate-cli-skeleton