Skip to content

Commit

Permalink
feat(client-batch): This release adds support for price capacity opti…
Browse files Browse the repository at this point in the history
…mized allocation strategy for Spot Instances.
  • Loading branch information
awstools committed Aug 1, 2023
1 parent ee7aaf6 commit be1dfe2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ export interface CreateComputeEnvironmentCommandOutput extends CreateComputeEnvi
* <p>Either don't set the service role (<code>serviceRole</code>) parameter or set it to the <b>AWSBatchServiceRole</b> service-linked role.</p>
* </li>
* <li>
* <p>Set the allocation strategy (<code>allocationStrategy</code>) parameter to <code>BEST_FIT_PROGRESSIVE</code>
* or <code>SPOT_CAPACITY_OPTIMIZED</code>.</p>
* <p>Set the allocation strategy (<code>allocationStrategy</code>) parameter to <code>BEST_FIT_PROGRESSIVE</code>,
* <code>SPOT_CAPACITY_OPTIMIZED</code>, or <code>SPOT_PRICE_CAPACITY_OPTIMIZED</code>.</p>
* </li>
* <li>
* <p>Set the update to latest image version (<code>updateToLatestImageVersion</code>)
Expand Down Expand Up @@ -132,7 +132,7 @@ export interface CreateComputeEnvironmentCommandOutput extends CreateComputeEnvi
* unmanagedvCpus: Number("int"),
* computeResources: { // ComputeResource
* type: "EC2" || "SPOT" || "FARGATE" || "FARGATE_SPOT", // required
* allocationStrategy: "BEST_FIT" || "BEST_FIT_PROGRESSIVE" || "SPOT_CAPACITY_OPTIMIZED",
* allocationStrategy: "BEST_FIT" || "BEST_FIT_PROGRESSIVE" || "SPOT_CAPACITY_OPTIMIZED" || "SPOT_PRICE_CAPACITY_OPTIMIZED",
* minvCpus: Number("int"),
* maxvCpus: Number("int"), // required
* desiredvCpus: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export interface DescribeComputeEnvironmentsCommandOutput
* // statusReason: "STRING_VALUE",
* // computeResources: { // ComputeResource
* // type: "EC2" || "SPOT" || "FARGATE" || "FARGATE_SPOT", // required
* // allocationStrategy: "BEST_FIT" || "BEST_FIT_PROGRESSIVE" || "SPOT_CAPACITY_OPTIMIZED",
* // allocationStrategy: "BEST_FIT" || "BEST_FIT_PROGRESSIVE" || "SPOT_CAPACITY_OPTIMIZED" || "SPOT_PRICE_CAPACITY_OPTIMIZED",
* // minvCpus: Number("int"),
* // maxvCpus: Number("int"), // required
* // desiredvCpus: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface UpdateComputeEnvironmentCommandOutput extends UpdateComputeEnvi
* securityGroupIds: [
* "STRING_VALUE",
* ],
* allocationStrategy: "BEST_FIT_PROGRESSIVE" || "SPOT_CAPACITY_OPTIMIZED",
* allocationStrategy: "BEST_FIT_PROGRESSIVE" || "SPOT_CAPACITY_OPTIMIZED" || "SPOT_PRICE_CAPACITY_OPTIMIZED",
* instanceTypes: [
* "STRING_VALUE",
* ],
Expand Down
28 changes: 22 additions & 6 deletions clients/client-batch/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export const CRAllocationStrategy = {
BEST_FIT: "BEST_FIT",
BEST_FIT_PROGRESSIVE: "BEST_FIT_PROGRESSIVE",
SPOT_CAPACITY_OPTIMIZED: "SPOT_CAPACITY_OPTIMIZED",
SPOT_PRICE_CAPACITY_OPTIMIZED: "SPOT_PRICE_CAPACITY_OPTIMIZED",
} as const;

/**
Expand Down Expand Up @@ -488,8 +489,15 @@ export interface ComputeResource {
* interrupted. This allocation strategy is only available for Spot Instance compute
* resources.</p>
* </dd>
* <dt>SPOT_PRICE_CAPACITY_OPTIMIZED</dt>
* <dd>
* <p>The price and capacity optimized allocation strategy looks at both price and capacity to
* select the Spot Instance pools that are the least likely to be interrupted and have the lowest
* possible price. This allocation strategy is only available for Spot Instance compute
* resources.</p>
* </dd>
* </dl>
* <p>With both <code>BEST_FIT_PROGRESSIVE</code> and <code>SPOT_CAPACITY_OPTIMIZED</code>
* <p>With <code>BEST_FIT_PROGRESSIVE</code>,<code>SPOT_CAPACITY_OPTIMIZED</code> and <code>SPOT_PRICE_CAPACITY_OPTIMIZED</code>
* strategies using On-Demand or Spot Instances, and the <code>BEST_FIT</code> strategy using Spot
* Instances, Batch might need to exceed <code>maxvCpus</code> to meet your capacity requirements.
* In this event, Batch never exceeds <code>maxvCpus</code> by more than a single instance.</p>
Expand All @@ -516,7 +524,7 @@ export interface ComputeResource {
* compute environment can
* support.</p>
* <note>
* <p>With both <code>BEST_FIT_PROGRESSIVE</code> and <code>SPOT_CAPACITY_OPTIMIZED</code>
* <p>With <code>BEST_FIT_PROGRESSIVE</code>, <code>SPOT_CAPACITY_OPTIMIZED</code> and <code>SPOT_PRICE_CAPACITY_OPTIMIZED</code>
* allocation strategies using On-Demand or Spot Instances, and the <code>BEST_FIT</code> strategy
* using Spot Instances, Batch might need to exceed <code>maxvCpus</code> to meet your capacity
* requirements. In this event, Batch never exceeds <code>maxvCpus</code> by more than a single
Expand Down Expand Up @@ -2183,8 +2191,8 @@ export interface RuntimePlatform {

/**
* @public
* <p>The vCPU architecture. The default value is <code>X86_64</code>. Valid values are <code>X86_64</code> and
* <code> ARM64</code>.</p>
* <p>The vCPU architecture. The default value is <code>X86_64</code>. Valid values are
* <code>X86_64</code> and <code>ARM64</code>.</p>
* <note>
* <p>This parameter must be set to
* <code>X86_64</code>
Expand Down Expand Up @@ -5456,6 +5464,7 @@ export interface UntagResourceResponse {}
export const CRUpdateAllocationStrategy = {
BEST_FIT_PROGRESSIVE: "BEST_FIT_PROGRESSIVE",
SPOT_CAPACITY_OPTIMIZED: "SPOT_CAPACITY_OPTIMIZED",
SPOT_PRICE_CAPACITY_OPTIMIZED: "SPOT_PRICE_CAPACITY_OPTIMIZED",
} as const;

/**
Expand Down Expand Up @@ -5485,7 +5494,7 @@ export interface ComputeResourceUpdate {
* @public
* <p>The maximum number of Amazon EC2 vCPUs that an environment can reach.</p>
* <note>
* <p>With both <code>BEST_FIT_PROGRESSIVE</code> and <code>SPOT_CAPACITY_OPTIMIZED</code>
* <p>With <code>BEST_FIT_PROGRESSIVE</code>, <code>SPOT_CAPACITY_OPTIMIZED</code>, and <code>SPOT_PRICE_CAPACITY_OPTIMIZED</code>
* allocation strategies using On-Demand or Spot Instances, and the <code>BEST_FIT</code> strategy
* using Spot Instances, Batch might need to exceed <code>maxvCpus</code> to meet your capacity
* requirements. In this event, Batch never exceeds <code>maxvCpus</code> by more than a single
Expand Down Expand Up @@ -5581,8 +5590,15 @@ export interface ComputeResourceUpdate {
* interrupted. This allocation strategy is only available for Spot Instance compute
* resources.</p>
* </dd>
* <dt>SPOT_PRICE_CAPACITY_OPTIMIZED</dt>
* <dd>
* <p>The price and capacity optimized allocation strategy looks at both price and capacity to
* select the Spot Instance pools that are the least likely to be interrupted and have the lowest
* possible price. This allocation strategy is only available for Spot Instance compute
* resources.</p>
* </dd>
* </dl>
* <p>With both <code>BEST_FIT_PROGRESSIVE</code> and <code>SPOT_CAPACITY_OPTIMIZED</code>
* <p>With both <code>BEST_FIT_PROGRESSIVE</code>, <code>SPOT_CAPACITY_OPTIMIZED</code>, and <code>SPOT_PRICE_CAPACITY_OPTIMIZED</code>
* strategies using On-Demand or Spot Instances, and the <code>BEST_FIT</code> strategy using Spot
* Instances, Batch might need to exceed <code>maxvCpus</code> to meet your capacity requirements.
* In this event, Batch never exceeds <code>maxvCpus</code> by more than a single instance.</p>
Expand Down

0 comments on commit be1dfe2

Please sign in to comment.