Skip to content

Commit 3fe961f

Browse files
author
awstools
committed
docs(client-batch): Documentation updates for AWS Batch.
1 parent 59da2d5 commit 3fe961f

File tree

4 files changed

+94
-15
lines changed

4 files changed

+94
-15
lines changed

clients/client-batch/src/Batch.ts

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,11 @@ export class Batch extends BatchClient {
170170
* your container instances into that Amazon ECS cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html">Launching an Amazon ECS container instance</a> in the
171171
* <i>Amazon Elastic Container Service Developer Guide</i>.</p>
172172
* <note>
173-
* <p>Batch doesn't upgrade the AMIs in a compute environment after the environment is created. For example, it
174-
* doesn't update the AMIs when a newer version of the Amazon ECS optimized AMI is available. Therefore, you're responsible
175-
* for managing the guest operating system (including its updates and security patches) and any additional application
176-
* software or utilities that you install on the compute resources. To use a new AMI for your Batch jobs, complete
173+
* <p>Batch doesn't automatically upgrade the AMIs in a compute environment after it's created. For example, it
174+
* also doesn't update the AMIs in your compute environment when a newer version of the Amazon ECS optimized AMI is
175+
* available. You're responsible for the management of the guest operating system. This includes any updates and
176+
* security patches. You're also responsible for any additional application software or utilities that you install on
177+
* the compute resources. There are two ways to use a new AMI for your Batch jobs. The original method is to complete
177178
* these steps:</p>
178179
* <ol>
179180
* <li>
@@ -189,6 +190,41 @@ export class Batch extends BatchClient {
189190
* <p>Delete the earlier compute environment.</p>
190191
* </li>
191192
* </ol>
193+
* <p>In April 2022, Batch added enhanced support for updating compute environments. For more information, see
194+
* <a href="https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html">Updating compute
195+
* environments</a>. To use the enhanced updating of compute environments to update AMIs, follow these
196+
* rules:</p>
197+
* <ul>
198+
* <li>
199+
* <p>Either do not set the service role (<code>serviceRole</code>) parameter or set it to the <b>AWSBatchServiceRole</b> service-linked role.</p>
200+
* </li>
201+
* <li>
202+
* <p>Set the allocation strategy (<code>allocationStrategy</code>) parameter to <code>BEST_FIT_PROGRESSIVE</code>
203+
* or <code>SPOT_CAPACITY_OPTIMIZED</code>.</p>
204+
* </li>
205+
* <li>
206+
* <p>Set the update to latest image version (<code>updateToLatestImageVersion</code>) parameter to
207+
* <code>true</code>.</p>
208+
* </li>
209+
* <li>
210+
* <p>Do not specify an AMI ID in <code>imageId</code>, <code>imageIdOverride</code> (in <a href="https://docs.aws.amazon.com/batch/latest/APIReference/API_Ec2Configuration.html">
211+
* <code>ec2Configuration</code>
212+
* </a>), or in the launch template (<code>launchTemplate</code>). In that case
213+
* Batch will select the latest Amazon ECS optimized AMI supported by Batch at the time the infrastructure update is
214+
* initiated. Alternatively you can specify the AMI ID in the <code>imageId</code> or <code>imageIdOverride</code>
215+
* parameters, or the launch template identified by the <code>LaunchTemplate</code> properties. Changing any of these
216+
* properties will trigger an infrastructure update. If the AMI ID is specified in the launch template, it can not be
217+
* replaced by specifying an AMI ID in either the <code>imageId</code> or <code>imageIdOverride</code> parameters. It
218+
* can only be replaced by specifying a different launch template, or if the launch template version is set to
219+
* <code>$Default</code> or <code>$Latest</code>, by setting either a new default version for the launch template
220+
* (if <code>$Default</code>)or by adding a new version to the launch template (if <code>$Latest</code>).</p>
221+
* </li>
222+
* </ul>
223+
* <p>If these rules are followed, any update that triggers an infrastructure update will cause the AMI ID to be
224+
* re-selected. If the <code>version</code> setting in the launch template (<code>launchTemplate</code>) is set to
225+
* <code>$Latest</code> or <code>$Default</code>, the latest or default version of the launch template will be
226+
* evaluated up at the time of the infrastructure update, even if the <code>launchTemplate</code> was not
227+
* updated.</p>
192228
* </note>
193229
*/
194230
public createComputeEnvironment(

clients/client-batch/src/commands/CreateComputeEnvironmentCommand.ts

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ export interface CreateComputeEnvironmentCommandOutput extends CreateComputeEnvi
4242
* your container instances into that Amazon ECS cluster. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html">Launching an Amazon ECS container instance</a> in the
4343
* <i>Amazon Elastic Container Service Developer Guide</i>.</p>
4444
* <note>
45-
* <p>Batch doesn't upgrade the AMIs in a compute environment after the environment is created. For example, it
46-
* doesn't update the AMIs when a newer version of the Amazon ECS optimized AMI is available. Therefore, you're responsible
47-
* for managing the guest operating system (including its updates and security patches) and any additional application
48-
* software or utilities that you install on the compute resources. To use a new AMI for your Batch jobs, complete
45+
* <p>Batch doesn't automatically upgrade the AMIs in a compute environment after it's created. For example, it
46+
* also doesn't update the AMIs in your compute environment when a newer version of the Amazon ECS optimized AMI is
47+
* available. You're responsible for the management of the guest operating system. This includes any updates and
48+
* security patches. You're also responsible for any additional application software or utilities that you install on
49+
* the compute resources. There are two ways to use a new AMI for your Batch jobs. The original method is to complete
4950
* these steps:</p>
5051
* <ol>
5152
* <li>
@@ -61,6 +62,41 @@ export interface CreateComputeEnvironmentCommandOutput extends CreateComputeEnvi
6162
* <p>Delete the earlier compute environment.</p>
6263
* </li>
6364
* </ol>
65+
* <p>In April 2022, Batch added enhanced support for updating compute environments. For more information, see
66+
* <a href="https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html">Updating compute
67+
* environments</a>. To use the enhanced updating of compute environments to update AMIs, follow these
68+
* rules:</p>
69+
* <ul>
70+
* <li>
71+
* <p>Either do not set the service role (<code>serviceRole</code>) parameter or set it to the <b>AWSBatchServiceRole</b> service-linked role.</p>
72+
* </li>
73+
* <li>
74+
* <p>Set the allocation strategy (<code>allocationStrategy</code>) parameter to <code>BEST_FIT_PROGRESSIVE</code>
75+
* or <code>SPOT_CAPACITY_OPTIMIZED</code>.</p>
76+
* </li>
77+
* <li>
78+
* <p>Set the update to latest image version (<code>updateToLatestImageVersion</code>) parameter to
79+
* <code>true</code>.</p>
80+
* </li>
81+
* <li>
82+
* <p>Do not specify an AMI ID in <code>imageId</code>, <code>imageIdOverride</code> (in <a href="https://docs.aws.amazon.com/batch/latest/APIReference/API_Ec2Configuration.html">
83+
* <code>ec2Configuration</code>
84+
* </a>), or in the launch template (<code>launchTemplate</code>). In that case
85+
* Batch will select the latest Amazon ECS optimized AMI supported by Batch at the time the infrastructure update is
86+
* initiated. Alternatively you can specify the AMI ID in the <code>imageId</code> or <code>imageIdOverride</code>
87+
* parameters, or the launch template identified by the <code>LaunchTemplate</code> properties. Changing any of these
88+
* properties will trigger an infrastructure update. If the AMI ID is specified in the launch template, it can not be
89+
* replaced by specifying an AMI ID in either the <code>imageId</code> or <code>imageIdOverride</code> parameters. It
90+
* can only be replaced by specifying a different launch template, or if the launch template version is set to
91+
* <code>$Default</code> or <code>$Latest</code>, by setting either a new default version for the launch template
92+
* (if <code>$Default</code>)or by adding a new version to the launch template (if <code>$Latest</code>).</p>
93+
* </li>
94+
* </ul>
95+
* <p>If these rules are followed, any update that triggers an infrastructure update will cause the AMI ID to be
96+
* re-selected. If the <code>version</code> setting in the launch template (<code>launchTemplate</code>) is set to
97+
* <code>$Latest</code> or <code>$Default</code>, the latest or default version of the launch template will be
98+
* evaluated up at the time of the infrastructure update, even if the <code>launchTemplate</code> was not
99+
* updated.</p>
64100
* </note>
65101
* @example
66102
* Use a bare-bones client and the command you need to make an API call.

clients/client-batch/src/models/models_0.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,10 @@ export interface ComputeResource {
578578
* <p>Key-value pair tags to be applied to EC2 resources that are launched in the compute environment. For Batch,
579579
* these take the form of "String1": "String2", where String1 is the tag key and String2 is the tag value−for
580580
* example, <code>{ "Name": "Batch Instance - C4OnDemand" }</code>. This is helpful for recognizing your Batch
581-
* instances in the Amazon EC2 console. These tags can't be updated or removed after the compute environment is created. Any
582-
* changes to these tags require that you create a new compute environment and remove the old compute environment. These
583-
* tags aren't seen when using the Batch <code>ListTagsForResource</code> API operation.</p>
581+
* instances in the Amazon EC2 console. Updating these tags requires an infrastructure update to the compute environment. For
582+
* more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/updating-compute-environments.html">Updating compute
583+
* environments</a> in the <i>Batch User Guide</i>. These tags aren't seen when using the Batch
584+
* <code>ListTagsForResource</code> API operation.</p>
584585
* <note>
585586
* <p>This parameter isn't applicable to jobs that are running on Fargate resources, and shouldn't be
586587
* specified.</p>
@@ -4073,7 +4074,8 @@ export interface SubmitJobRequest {
40734074
jobQueue: string | undefined;
40744075

40754076
/**
4076-
* <p>The share identifier for the job.</p>
4077+
* <p>The share identifier for the job. If the job queue does not have a scheduling policy, then this parameter must
4078+
* not be specified. If the job queue has a scheduling policy, then this parameter must be specified.</p>
40774079
*/
40784080
shareIdentifier?: string;
40794081

0 commit comments

Comments
 (0)