Skip to content

Commit

Permalink
feat(client-emr): This release provides customers the ability to spec…
Browse files Browse the repository at this point in the history
…ify an allocation strategies amongst PRICE_CAPACITY_OPTIMIZED, CAPACITY_OPTIMIZED, LOWEST_PRICE, DIVERSIFIED for Spot instances in Instance Feet cluster. This enables customers to choose an allocation strategy best suited for their workload.
  • Loading branch information
awstools committed Jun 6, 2023
1 parent 5c7b40e commit ada81f8
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion clients/client-emr/src/commands/AddInstanceFleetCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export interface AddInstanceFleetCommandOutput extends AddInstanceFleetOutput, _
* TimeoutDurationMinutes: Number("int"), // required
* TimeoutAction: "SWITCH_TO_ON_DEMAND" || "TERMINATE_CLUSTER", // required
* BlockDurationMinutes: Number("int"),
* AllocationStrategy: "capacity-optimized",
* AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified",
* },
* OnDemandSpecification: { // OnDemandProvisioningSpecification
* AllocationStrategy: "lowest-price", // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export interface ListInstanceFleetsCommandOutput extends ListInstanceFleetsOutpu
* // TimeoutDurationMinutes: Number("int"), // required
* // TimeoutAction: "SWITCH_TO_ON_DEMAND" || "TERMINATE_CLUSTER", // required
* // BlockDurationMinutes: Number("int"),
* // AllocationStrategy: "capacity-optimized",
* // AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified",
* // },
* // OnDemandSpecification: { // OnDemandProvisioningSpecification
* // AllocationStrategy: "lowest-price", // required
Expand Down
2 changes: 1 addition & 1 deletion clients/client-emr/src/commands/RunJobFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export interface RunJobFlowCommandOutput extends RunJobFlowOutput, __MetadataBea
* TimeoutDurationMinutes: Number("int"), // required
* TimeoutAction: "SWITCH_TO_ON_DEMAND" || "TERMINATE_CLUSTER", // required
* BlockDurationMinutes: Number("int"),
* AllocationStrategy: "capacity-optimized",
* AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified",
* },
* OnDemandSpecification: { // OnDemandProvisioningSpecification
* AllocationStrategy: "lowest-price", // required
Expand Down
10 changes: 7 additions & 3 deletions clients/client-emr/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ export interface OnDemandProvisioningSpecification {
*/
export const SpotProvisioningAllocationStrategy = {
CAPACITY_OPTIMIZED: "capacity-optimized",
DIVERSIFIED: "diversified",
LOWEST_PRICE: "lowest-price",
PRICE_CAPACITY_OPTIMIZED: "price-capacity-optimized",
} as const;

/**
Expand Down Expand Up @@ -297,9 +300,10 @@ export interface SpotProvisioningSpecification {
BlockDurationMinutes?: number;

/**
* <p> Specifies the strategy to use in launching Spot Instance fleets. Currently, the only
* option is capacity-optimized (the default), which launches instances from Spot Instance
* pools with optimal capacity for the number of instances that are launching. </p>
* <p>Specifies one of the following strategies to launch Spot Instance fleets: <code>price-capacity-optimized</code>, <code>capacity-optimized</code>, <code>lowest-price</code>, or <code>diversified</code>. For more information on the provisioning strategies, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>
* <note>
* <p>When you launch a Spot Instance fleet with the old console, it automatically launches with the <code>capacity-optimized</code> strategy. You can't change the allocation strategy from the old console.</p>
* </note>
*/
AllocationStrategy?: SpotProvisioningAllocationStrategy | string;
}
Expand Down
20 changes: 19 additions & 1 deletion codegen/sdk-codegen/aws-models/emr.json
Original file line number Diff line number Diff line change
Expand Up @@ -8897,6 +8897,24 @@
"traits": {
"smithy.api#enumValue": "capacity-optimized"
}
},
"PRICE_CAPACITY_OPTIMIZED": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "price-capacity-optimized"
}
},
"LOWEST_PRICE": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "lowest-price"
}
},
"DIVERSIFIED": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "diversified"
}
}
}
},
Expand Down Expand Up @@ -8926,7 +8944,7 @@
"AllocationStrategy": {
"target": "com.amazonaws.emr#SpotProvisioningAllocationStrategy",
"traits": {
"smithy.api#documentation": "<p> Specifies the strategy to use in launching Spot Instance fleets. Currently, the only\n option is capacity-optimized (the default), which launches instances from Spot Instance\n pools with optimal capacity for the number of instances that are launching. </p>"
"smithy.api#documentation": "<p>Specifies one of the following strategies to launch Spot Instance fleets: <code>price-capacity-optimized</code>, <code>capacity-optimized</code>, <code>lowest-price</code>, or <code>diversified</code>. For more information on the provisioning strategies, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html\">Allocation strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide for Linux Instances</i>.</p>\n <note>\n <p>When you launch a Spot Instance fleet with the old console, it automatically launches with the <code>capacity-optimized</code> strategy. You can't change the allocation strategy from the old console.</p>\n </note>"
}
}
},
Expand Down

0 comments on commit ada81f8

Please sign in to comment.