Skip to content

Commit 988b75a

Browse files
author
awstools
committed
feat(client-emr): This release provides the support for new allocation strategies i.e. CAPACITY_OPTIMIZED_PRIORITIZED for Spot and PRIORITIZED for On-Demand by taking input of priority value for each instance type for instance fleet clusters.
1 parent b75a706 commit 988b75a

File tree

6 files changed

+62
-13
lines changed

6 files changed

+62
-13
lines changed

clients/client-emr/src/commands/AddInstanceFleetCommand.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,18 @@ export interface AddInstanceFleetCommandOutput extends AddInstanceFleetOutput, _
8484
* },
8585
* ],
8686
* CustomAmiId: "STRING_VALUE",
87+
* Priority: Number("double"),
8788
* },
8889
* ],
8990
* LaunchSpecifications: { // InstanceFleetProvisioningSpecifications
9091
* SpotSpecification: { // SpotProvisioningSpecification
9192
* TimeoutDurationMinutes: Number("int"), // required
9293
* TimeoutAction: "SWITCH_TO_ON_DEMAND" || "TERMINATE_CLUSTER", // required
9394
* BlockDurationMinutes: Number("int"),
94-
* AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified",
95+
* AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified" || "capacity-optimized-prioritized",
9596
* },
9697
* OnDemandSpecification: { // OnDemandProvisioningSpecification
97-
* AllocationStrategy: "lowest-price", // required
98+
* AllocationStrategy: "lowest-price" || "prioritized", // required
9899
* CapacityReservationOptions: { // OnDemandCapacityReservationOptions
99100
* UsageStrategy: "use-capacity-reservations-first",
100101
* CapacityReservationPreference: "open" || "none",

clients/client-emr/src/commands/ListInstanceFleetsCommand.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,18 @@ export interface ListInstanceFleetsCommandOutput extends ListInstanceFleetsOutpu
103103
* // ],
104104
* // EbsOptimized: true || false,
105105
* // CustomAmiId: "STRING_VALUE",
106+
* // Priority: Number("double"),
106107
* // },
107108
* // ],
108109
* // LaunchSpecifications: { // InstanceFleetProvisioningSpecifications
109110
* // SpotSpecification: { // SpotProvisioningSpecification
110111
* // TimeoutDurationMinutes: Number("int"), // required
111112
* // TimeoutAction: "SWITCH_TO_ON_DEMAND" || "TERMINATE_CLUSTER", // required
112113
* // BlockDurationMinutes: Number("int"),
113-
* // AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified",
114+
* // AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified" || "capacity-optimized-prioritized",
114115
* // },
115116
* // OnDemandSpecification: { // OnDemandProvisioningSpecification
116-
* // AllocationStrategy: "lowest-price", // required
117+
* // AllocationStrategy: "lowest-price" || "prioritized", // required
117118
* // CapacityReservationOptions: { // OnDemandCapacityReservationOptions
118119
* // UsageStrategy: "use-capacity-reservations-first",
119120
* // CapacityReservationPreference: "open" || "none",

clients/client-emr/src/commands/RunJobFlowCommand.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,18 @@ export interface RunJobFlowCommandOutput extends RunJobFlowOutput, __MetadataBea
175175
* },
176176
* Configurations: "<ConfigurationList>",
177177
* CustomAmiId: "STRING_VALUE",
178+
* Priority: Number("double"),
178179
* },
179180
* ],
180181
* LaunchSpecifications: { // InstanceFleetProvisioningSpecifications
181182
* SpotSpecification: { // SpotProvisioningSpecification
182183
* TimeoutDurationMinutes: Number("int"), // required
183184
* TimeoutAction: "SWITCH_TO_ON_DEMAND" || "TERMINATE_CLUSTER", // required
184185
* BlockDurationMinutes: Number("int"),
185-
* AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified",
186+
* AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified" || "capacity-optimized-prioritized",
186187
* },
187188
* OnDemandSpecification: { // OnDemandProvisioningSpecification
188-
* AllocationStrategy: "lowest-price", // required
189+
* AllocationStrategy: "lowest-price" || "prioritized", // required
189190
* CapacityReservationOptions: { // OnDemandCapacityReservationOptions
190191
* UsageStrategy: "use-capacity-reservations-first",
191192
* CapacityReservationPreference: "open" || "none",

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export interface EbsConfiguration {
116116
*/
117117
export const OnDemandProvisioningAllocationStrategy = {
118118
LOWEST_PRICE: "lowest-price",
119+
PRIORITIZED: "prioritized",
119120
} as const;
120121

121122
/**
@@ -213,9 +214,11 @@ export interface OnDemandCapacityReservationOptions {
213214
*/
214215
export interface OnDemandProvisioningSpecification {
215216
/**
216-
* <p>Specifies the strategy to use in launching On-Demand instance fleets. Currently, the
217-
* only option is <code>lowest-price</code> (the default), which launches the lowest price
218-
* first.</p>
217+
* <p>Specifies the strategy to use in launching On-Demand instance fleets. Available
218+
* options are <code>lowest-price</code> and <code>prioritized</code>. <code>lowest-price</code>
219+
* specifies to launch the instances with the lowest price first, and <code>prioritized</code> specifies
220+
* that Amazon EMR should launch the instances with the highest priority first. The default is
221+
* <code>lowest-price</code>.</p>
219222
* @public
220223
*/
221224
AllocationStrategy: OnDemandProvisioningAllocationStrategy | undefined;
@@ -234,6 +237,7 @@ export interface OnDemandProvisioningSpecification {
234237
*/
235238
export const SpotProvisioningAllocationStrategy = {
236239
CAPACITY_OPTIMIZED: "capacity-optimized",
240+
CAPACITY_OPTIMIZED_PRIORITIZED: "capacity-optimized-prioritized",
237241
DIVERSIFIED: "diversified",
238242
LOWEST_PRICE: "lowest-price",
239243
PRICE_CAPACITY_OPTIMIZED: "price-capacity-optimized",
@@ -316,7 +320,9 @@ export interface SpotProvisioningSpecification {
316320
BlockDurationMinutes?: number;
317321

318322
/**
319-
* <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>
323+
* <p>Specifies one of the following strategies to launch Spot Instance fleets:
324+
* <code>capacity-optimized</code>, <code>price-capacity-optimized</code>, <code>lowest-price</code>, or
325+
* <code>diversified</code>, and <code>capacity-optimized-prioritized</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>
320326
* <note>
321327
* <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>
322328
* </note>
@@ -6595,6 +6601,13 @@ export interface InstanceTypeConfig {
65956601
* @public
65966602
*/
65976603
CustomAmiId?: string;
6604+
6605+
/**
6606+
* <p>The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type.
6607+
* Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.</p>
6608+
* @public
6609+
*/
6610+
Priority?: number;
65986611
}
65996612

66006613
/**
@@ -6662,6 +6675,13 @@ export interface InstanceTypeSpecification {
66626675
* @public
66636676
*/
66646677
CustomAmiId?: string;
6678+
6679+
/**
6680+
* <p>The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type.
6681+
* Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.</p>
6682+
* @public
6683+
*/
6684+
Priority?: number;
66656685
}
66666686

66676687
/**

clients/client-emr/src/protocols/Aws_json1_1.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,6 +2505,7 @@ const se_InstanceTypeConfig = (input: InstanceTypeConfig, context: __SerdeContex
25052505
CustomAmiId: [],
25062506
EbsConfiguration: _json,
25072507
InstanceType: [],
2508+
Priority: __serializeFloat,
25082509
WeightedCapacity: [],
25092510
});
25102511
};
@@ -3393,6 +3394,7 @@ const de_InstanceTypeSpecification = (output: any, context: __SerdeContext): Ins
33933394
EbsBlockDevices: _json,
33943395
EbsOptimized: __expectBoolean,
33953396
InstanceType: __expectString,
3397+
Priority: __limitedParseDouble,
33963398
WeightedCapacity: __expectInt32,
33973399
}) as any;
33983400
};

codegen/sdk-codegen/aws-models/emr.json

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,7 +2833,7 @@
28332833
"sdkId": "EMR",
28342834
"arnNamespace": "elasticmapreduce",
28352835
"cloudFormationName": "EMR",
2836-
"cloudTrailEventSource": "emr.amazonaws.com",
2836+
"cloudTrailEventSource": "elasticmapreduce.amazonaws.com",
28372837
"docId": "elasticmapreduce-2009-03-31",
28382838
"endpointPrefix": "elasticmapreduce"
28392839
},
@@ -5715,6 +5715,12 @@
57155715
"traits": {
57165716
"smithy.api#documentation": "<p>The custom AMI ID to use for the instance type.</p>"
57175717
}
5718+
},
5719+
"Priority": {
5720+
"target": "com.amazonaws.emr#NonNegativeDouble",
5721+
"traits": {
5722+
"smithy.api#documentation": "<p>The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type. \n Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.</p>"
5723+
}
57185724
}
57195725
},
57205726
"traits": {
@@ -5777,6 +5783,12 @@
57775783
"traits": {
57785784
"smithy.api#documentation": "<p>The custom AMI ID to use for the instance type.</p>"
57795785
}
5786+
},
5787+
"Priority": {
5788+
"target": "com.amazonaws.emr#NonNegativeDouble",
5789+
"traits": {
5790+
"smithy.api#documentation": "<p>The priority at which Amazon EMR launches the Amazon EC2 instances with this instance type. \n Priority starts at 0, which is the highest priority. Amazon EMR considers the highest priority first.</p>"
5791+
}
57805792
}
57815793
},
57825794
"traits": {
@@ -7807,6 +7819,12 @@
78077819
"traits": {
78087820
"smithy.api#enumValue": "lowest-price"
78097821
}
7822+
},
7823+
"PRIORITIZED": {
7824+
"target": "smithy.api#Unit",
7825+
"traits": {
7826+
"smithy.api#enumValue": "prioritized"
7827+
}
78107828
}
78117829
}
78127830
},
@@ -7817,7 +7835,7 @@
78177835
"target": "com.amazonaws.emr#OnDemandProvisioningAllocationStrategy",
78187836
"traits": {
78197837
"smithy.api#clientOptional": {},
7820-
"smithy.api#documentation": "<p>Specifies the strategy to use in launching On-Demand instance fleets. Currently, the\n only option is <code>lowest-price</code> (the default), which launches the lowest price\n first.</p>",
7838+
"smithy.api#documentation": "<p>Specifies the strategy to use in launching On-Demand instance fleets. Available\n options are <code>lowest-price</code> and <code>prioritized</code>. <code>lowest-price</code>\n specifies to launch the instances with the lowest price first, and <code>prioritized</code> specifies\n that Amazon EMR should launch the instances with the highest priority first. The default is\n <code>lowest-price</code>.</p>",
78217839
"smithy.api#required": {}
78227840
}
78237841
},
@@ -9225,6 +9243,12 @@
92259243
"traits": {
92269244
"smithy.api#enumValue": "diversified"
92279245
}
9246+
},
9247+
"CAPACITY_OPTIMIZED_PRIORITIZED": {
9248+
"target": "smithy.api#Unit",
9249+
"traits": {
9250+
"smithy.api#enumValue": "capacity-optimized-prioritized"
9251+
}
92289252
}
92299253
}
92309254
},
@@ -9256,7 +9280,7 @@
92569280
"AllocationStrategy": {
92579281
"target": "com.amazonaws.emr#SpotProvisioningAllocationStrategy",
92589282
"traits": {
9259-
"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>"
9283+
"smithy.api#documentation": "<p>Specifies one of the following strategies to launch Spot Instance fleets: \n <code>capacity-optimized</code>, <code>price-capacity-optimized</code>, <code>lowest-price</code>, or \n <code>diversified</code>, and <code>capacity-optimized-prioritized</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>"
92609284
}
92619285
}
92629286
},

0 commit comments

Comments
 (0)