diff --git a/clients/client-emr/src/commands/AddInstanceFleetCommand.ts b/clients/client-emr/src/commands/AddInstanceFleetCommand.ts index 2c337eeeb01a..637cd3a67b82 100644 --- a/clients/client-emr/src/commands/AddInstanceFleetCommand.ts +++ b/clients/client-emr/src/commands/AddInstanceFleetCommand.ts @@ -105,10 +105,17 @@ export interface AddInstanceFleetCommandOutput extends AddInstanceFleetOutput, _ * }, * ResizeSpecifications: { // InstanceFleetResizingSpecifications * SpotResizeSpecification: { // SpotResizingSpecification - * TimeoutDurationMinutes: Number("int"), // required + * TimeoutDurationMinutes: Number("int"), + * AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified" || "capacity-optimized-prioritized", * }, * OnDemandResizeSpecification: { // OnDemandResizingSpecification - * TimeoutDurationMinutes: Number("int"), // required + * TimeoutDurationMinutes: Number("int"), + * AllocationStrategy: "lowest-price" || "prioritized", + * CapacityReservationOptions: { + * UsageStrategy: "use-capacity-reservations-first", + * CapacityReservationPreference: "open" || "none", + * CapacityReservationResourceGroupArn: "STRING_VALUE", + * }, * }, * }, * }, diff --git a/clients/client-emr/src/commands/ListInstanceFleetsCommand.ts b/clients/client-emr/src/commands/ListInstanceFleetsCommand.ts index f035263abb91..4441d093e635 100644 --- a/clients/client-emr/src/commands/ListInstanceFleetsCommand.ts +++ b/clients/client-emr/src/commands/ListInstanceFleetsCommand.ts @@ -124,10 +124,17 @@ export interface ListInstanceFleetsCommandOutput extends ListInstanceFleetsOutpu * // }, * // ResizeSpecifications: { // InstanceFleetResizingSpecifications * // SpotResizeSpecification: { // SpotResizingSpecification - * // TimeoutDurationMinutes: Number("int"), // required + * // TimeoutDurationMinutes: Number("int"), + * // AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified" || "capacity-optimized-prioritized", * // }, * // OnDemandResizeSpecification: { // OnDemandResizingSpecification - * // TimeoutDurationMinutes: Number("int"), // required + * // TimeoutDurationMinutes: Number("int"), + * // AllocationStrategy: "lowest-price" || "prioritized", + * // CapacityReservationOptions: { + * // UsageStrategy: "use-capacity-reservations-first", + * // CapacityReservationPreference: "open" || "none", + * // CapacityReservationResourceGroupArn: "STRING_VALUE", + * // }, * // }, * // }, * // }, diff --git a/clients/client-emr/src/commands/ModifyInstanceFleetCommand.ts b/clients/client-emr/src/commands/ModifyInstanceFleetCommand.ts index 255bffc5f37b..7ac07aa775c7 100644 --- a/clients/client-emr/src/commands/ModifyInstanceFleetCommand.ts +++ b/clients/client-emr/src/commands/ModifyInstanceFleetCommand.ts @@ -49,12 +49,60 @@ export interface ModifyInstanceFleetCommandOutput extends __MetadataBearer {} * TargetSpotCapacity: Number("int"), * ResizeSpecifications: { // InstanceFleetResizingSpecifications * SpotResizeSpecification: { // SpotResizingSpecification - * TimeoutDurationMinutes: Number("int"), // required + * TimeoutDurationMinutes: Number("int"), + * AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified" || "capacity-optimized-prioritized", * }, * OnDemandResizeSpecification: { // OnDemandResizingSpecification - * TimeoutDurationMinutes: Number("int"), // required + * TimeoutDurationMinutes: Number("int"), + * AllocationStrategy: "lowest-price" || "prioritized", + * CapacityReservationOptions: { // OnDemandCapacityReservationOptions + * UsageStrategy: "use-capacity-reservations-first", + * CapacityReservationPreference: "open" || "none", + * CapacityReservationResourceGroupArn: "STRING_VALUE", + * }, * }, * }, + * InstanceTypeConfigs: [ // InstanceTypeConfigList + * { // InstanceTypeConfig + * InstanceType: "STRING_VALUE", // required + * WeightedCapacity: Number("int"), + * BidPrice: "STRING_VALUE", + * BidPriceAsPercentageOfOnDemandPrice: Number("double"), + * EbsConfiguration: { // EbsConfiguration + * EbsBlockDeviceConfigs: [ // EbsBlockDeviceConfigList + * { // EbsBlockDeviceConfig + * VolumeSpecification: { // VolumeSpecification + * VolumeType: "STRING_VALUE", // required + * Iops: Number("int"), + * SizeInGB: Number("int"), // required + * Throughput: Number("int"), + * }, + * VolumesPerInstance: Number("int"), + * }, + * ], + * EbsOptimized: true || false, + * }, + * Configurations: [ // ConfigurationList + * { // Configuration + * Classification: "STRING_VALUE", + * Configurations: [ + * { + * Classification: "STRING_VALUE", + * Configurations: "", + * Properties: { // StringMap + * "": "STRING_VALUE", + * }, + * }, + * ], + * Properties: { + * "": "STRING_VALUE", + * }, + * }, + * ], + * CustomAmiId: "STRING_VALUE", + * Priority: Number("double"), + * }, + * ], * }, * }; * const command = new ModifyInstanceFleetCommand(input); diff --git a/clients/client-emr/src/commands/RunJobFlowCommand.ts b/clients/client-emr/src/commands/RunJobFlowCommand.ts index b634196a64b5..21f5cbe623ff 100644 --- a/clients/client-emr/src/commands/RunJobFlowCommand.ts +++ b/clients/client-emr/src/commands/RunJobFlowCommand.ts @@ -196,10 +196,17 @@ export interface RunJobFlowCommandOutput extends RunJobFlowOutput, __MetadataBea * }, * ResizeSpecifications: { // InstanceFleetResizingSpecifications * SpotResizeSpecification: { // SpotResizingSpecification - * TimeoutDurationMinutes: Number("int"), // required + * TimeoutDurationMinutes: Number("int"), + * AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified" || "capacity-optimized-prioritized", * }, * OnDemandResizeSpecification: { // OnDemandResizingSpecification - * TimeoutDurationMinutes: Number("int"), // required + * TimeoutDurationMinutes: Number("int"), + * AllocationStrategy: "lowest-price" || "prioritized", + * CapacityReservationOptions: { + * UsageStrategy: "use-capacity-reservations-first", + * CapacityReservationPreference: "open" || "none", + * CapacityReservationResourceGroupArn: "STRING_VALUE", + * }, * }, * }, * }, diff --git a/clients/client-emr/src/models/models_0.ts b/clients/client-emr/src/models/models_0.ts index 633ab238466a..c58989102b8b 100644 --- a/clients/client-emr/src/models/models_0.ts +++ b/clients/client-emr/src/models/models_0.ts @@ -332,8 +332,7 @@ export interface SpotProvisioningSpecification { } /** - *

The launch specification for Spot Instances in the fleet, which determines the defined - * duration, provisioning timeout behavior, and allocation strategy.

+ *

The launch specification for On-Demand and Spot Instances in the fleet.

* *

The instance fleet configuration is available only in Amazon EMR releases * 4.8.0 and later, excluding 5.0.x versions. On-Demand and Spot instance allocation @@ -343,15 +342,15 @@ export interface SpotProvisioningSpecification { */ export interface InstanceFleetProvisioningSpecifications { /** - *

The launch specification for Spot instances in the fleet, which determines the defined - * duration, provisioning timeout behavior, and allocation strategy.

+ *

The launch specification for Spot instances in the fleet, which determines the allocation strategy, defined + * duration, and provisioning timeout behavior.

* @public */ SpotSpecification?: SpotProvisioningSpecification; /** *

The launch specification for On-Demand Instances in the instance fleet, which - * determines the allocation strategy.

+ * determines the allocation strategy and capacity reservation options.

* *

The instance fleet configuration is available only in Amazon EMR releases * 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is @@ -377,7 +376,20 @@ export interface OnDemandResizingSpecification { * Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

* @public */ - TimeoutDurationMinutes: number | undefined; + TimeoutDurationMinutes?: number; + + /** + *

Specifies the allocation strategy to use to launch On-Demand instances during a resize. The default is lowest-price.

+ * @public + */ + AllocationStrategy?: OnDemandProvisioningAllocationStrategy; + + /** + *

Describes the strategy for using unused Capacity Reservations for fulfilling On-Demand + * capacity.

+ * @public + */ + CapacityReservationOptions?: OnDemandCapacityReservationOptions; } /** @@ -395,7 +407,15 @@ export interface SpotResizingSpecification { * modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

* @public */ - TimeoutDurationMinutes: number | undefined; + TimeoutDurationMinutes?: number; + + /** + *

Specifies the allocation strategy to use to launch Spot instances during a resize. If you run Amazon EMR releases 6.9.0 or higher, + * the default is price-capacity-optimized. If you run Amazon EMR releases 6.8.0 or lower, the default is + * capacity-optimized.

+ * @public + */ + AllocationStrategy?: SpotProvisioningAllocationStrategy; } /** @@ -405,14 +425,14 @@ export interface SpotResizingSpecification { export interface InstanceFleetResizingSpecifications { /** *

The resize specification for Spot Instances in the instance fleet, which contains the - * resize timeout period.

+ * allocation strategy and the resize timeout period.

* @public */ SpotResizeSpecification?: SpotResizingSpecification; /** *

The resize specification for On-Demand Instances in the instance fleet, which contains - * the resize timeout period.

+ * the allocation strategy, capacity reservation options, and the resize timeout period.

* @public */ OnDemandResizeSpecification?: OnDemandResizingSpecification; @@ -5446,59 +5466,6 @@ export interface ModifyClusterOutput { StepConcurrencyLevel?: number; } -/** - *

Configuration parameters for an instance fleet modification request.

- * - *

The instance fleet configuration is available only in Amazon EMR releases - * 4.8.0 and later, excluding 5.0.x versions.

- *
- * @public - */ -export interface InstanceFleetModifyConfig { - /** - *

A unique identifier for the instance fleet.

- * @public - */ - InstanceFleetId: string | undefined; - - /** - *

The target capacity of On-Demand units for the instance fleet. For more information see - * InstanceFleetConfig$TargetOnDemandCapacity.

- * @public - */ - TargetOnDemandCapacity?: number; - - /** - *

The target capacity of Spot units for the instance fleet. For more information, see - * InstanceFleetConfig$TargetSpotCapacity.

- * @public - */ - TargetSpotCapacity?: number; - - /** - *

The resize specification for the instance fleet.

- * @public - */ - ResizeSpecifications?: InstanceFleetResizingSpecifications; -} - -/** - * @public - */ -export interface ModifyInstanceFleetInput { - /** - *

The unique identifier of the cluster.

- * @public - */ - ClusterId: string | undefined; - - /** - *

The configuration parameters of the instance fleet.

- * @public - */ - InstanceFleet: InstanceFleetModifyConfig | undefined; -} - /** * @public * @enum @@ -6981,6 +6948,49 @@ export interface InstanceFleetConfig { ResizeSpecifications?: InstanceFleetResizingSpecifications; } +/** + *

Configuration parameters for an instance fleet modification request.

+ * + *

The instance fleet configuration is available only in Amazon EMR releases + * 4.8.0 and later, excluding 5.0.x versions.

+ *
+ * @public + */ +export interface InstanceFleetModifyConfig { + /** + *

A unique identifier for the instance fleet.

+ * @public + */ + InstanceFleetId: string | undefined; + + /** + *

The target capacity of On-Demand units for the instance fleet. For more information see + * InstanceFleetConfig$TargetOnDemandCapacity.

+ * @public + */ + TargetOnDemandCapacity?: number; + + /** + *

The target capacity of Spot units for the instance fleet. For more information, see + * InstanceFleetConfig$TargetSpotCapacity.

+ * @public + */ + TargetSpotCapacity?: number; + + /** + *

The resize specification for the instance fleet.

+ * @public + */ + ResizeSpecifications?: InstanceFleetResizingSpecifications; + + /** + *

An array of InstanceTypeConfig objects that specify how Amazon EMR provisions Amazon EC2 instances + * when it fulfills On-Demand and Spot capacities. For more information, see InstanceTypeConfig.

+ * @public + */ + InstanceTypeConfigs?: InstanceTypeConfig[]; +} + /** *

Change the size of some instance groups.

* @public @@ -7146,6 +7156,23 @@ export interface InstanceGroup { CustomAmiId?: string; } +/** + * @public + */ +export interface ModifyInstanceFleetInput { + /** + *

The unique identifier of the cluster.

+ * @public + */ + ClusterId: string | undefined; + + /** + *

The configuration parameters of the instance fleet.

+ * @public + */ + InstanceFleet: InstanceFleetModifyConfig | undefined; +} + /** * @public */ diff --git a/clients/client-emr/src/protocols/Aws_json1_1.ts b/clients/client-emr/src/protocols/Aws_json1_1.ts index a8c66d524979..8dac6bc613c2 100644 --- a/clients/client-emr/src/protocols/Aws_json1_1.ts +++ b/clients/client-emr/src/protocols/Aws_json1_1.ts @@ -832,7 +832,7 @@ export const se_ModifyInstanceFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyInstanceFleet"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_ModifyInstanceFleetInput(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2428,7 +2428,18 @@ const se_InstanceFleetConfigList = (input: InstanceFleetConfig[], context: __Ser }); }; -// se_InstanceFleetModifyConfig omitted. +/** + * serializeAws_json1_1InstanceFleetModifyConfig + */ +const se_InstanceFleetModifyConfig = (input: InstanceFleetModifyConfig, context: __SerdeContext): any => { + return take(input, { + InstanceFleetId: [], + InstanceTypeConfigs: (_) => se_InstanceTypeConfigList(_, context), + ResizeSpecifications: _json, + TargetOnDemandCapacity: [], + TargetSpotCapacity: [], + }); +}; // se_InstanceFleetProvisioningSpecifications omitted. @@ -2609,7 +2620,15 @@ const se_ListNotebookExecutionsInput = (input: ListNotebookExecutionsInput, cont // se_ModifyClusterInput omitted. -// se_ModifyInstanceFleetInput omitted. +/** + * serializeAws_json1_1ModifyInstanceFleetInput + */ +const se_ModifyInstanceFleetInput = (input: ModifyInstanceFleetInput, context: __SerdeContext): any => { + return take(input, { + ClusterId: [], + InstanceFleet: (_) => se_InstanceFleetModifyConfig(_, context), + }); +}; /** * serializeAws_json1_1ModifyInstanceGroupsInput diff --git a/codegen/sdk-codegen/aws-models/emr.json b/codegen/sdk-codegen/aws-models/emr.json index b9fcd4b0875c..3baecf847d7d 100644 --- a/codegen/sdk-codegen/aws-models/emr.json +++ b/codegen/sdk-codegen/aws-models/emr.json @@ -1950,6 +1950,21 @@ ], "traits": { "smithy.api#documentation": "

Provides cluster-level details including status, hardware and software configuration,\n VPC settings, and so on.

", + "smithy.test#smokeTests": [ + { + "id": "DescribeClusterFailure", + "params": { + "ClusterId": "fake_cluster" + }, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "failure": {} + } + } + ], "smithy.waiters#waitable": { "ClusterRunning": { "acceptors": [ @@ -4654,6 +4669,12 @@ "traits": { "smithy.api#documentation": "

The resize specification for the instance fleet.

" } + }, + "InstanceTypeConfigs": { + "target": "com.amazonaws.emr#InstanceTypeConfigList", + "traits": { + "smithy.api#documentation": "

An array of InstanceTypeConfig objects that specify how Amazon EMR provisions Amazon EC2 instances\n when it fulfills On-Demand and Spot capacities. For more information, see InstanceTypeConfig.

" + } } }, "traits": { @@ -4666,18 +4687,18 @@ "SpotSpecification": { "target": "com.amazonaws.emr#SpotProvisioningSpecification", "traits": { - "smithy.api#documentation": "

The launch specification for Spot instances in the fleet, which determines the defined\n duration, provisioning timeout behavior, and allocation strategy.

" + "smithy.api#documentation": "

The launch specification for Spot instances in the fleet, which determines the allocation strategy, defined\n duration, and provisioning timeout behavior.

" } }, "OnDemandSpecification": { "target": "com.amazonaws.emr#OnDemandProvisioningSpecification", "traits": { - "smithy.api#documentation": "

The launch specification for On-Demand Instances in the instance fleet, which\n determines the allocation strategy.

\n \n

The instance fleet configuration is available only in Amazon EMR releases\n 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is\n available in Amazon EMR releases 5.12.1 and later.

\n
" + "smithy.api#documentation": "

The launch specification for On-Demand Instances in the instance fleet, which\n determines the allocation strategy and capacity reservation options.

\n \n

The instance fleet configuration is available only in Amazon EMR releases\n 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is\n available in Amazon EMR releases 5.12.1 and later.

\n
" } } }, "traits": { - "smithy.api#documentation": "

The launch specification for Spot Instances in the fleet, which determines the defined\n duration, provisioning timeout behavior, and allocation strategy.

\n \n

The instance fleet configuration is available only in Amazon EMR releases\n 4.8.0 and later, excluding 5.0.x versions. On-Demand and Spot instance allocation\n strategies are available in Amazon EMR releases 5.12.1 and later.

\n
" + "smithy.api#documentation": "

The launch specification for On-Demand and Spot Instances in the fleet.

\n \n

The instance fleet configuration is available only in Amazon EMR releases\n 4.8.0 and later, excluding 5.0.x versions. On-Demand and Spot instance allocation\n strategies are available in Amazon EMR releases 5.12.1 and later.

\n
" } }, "com.amazonaws.emr#InstanceFleetResizingSpecifications": { @@ -4686,13 +4707,13 @@ "SpotResizeSpecification": { "target": "com.amazonaws.emr#SpotResizingSpecification", "traits": { - "smithy.api#documentation": "

The resize specification for Spot Instances in the instance fleet, which contains the\n resize timeout period.

" + "smithy.api#documentation": "

The resize specification for Spot Instances in the instance fleet, which contains the\n allocation strategy and the resize timeout period.

" } }, "OnDemandResizeSpecification": { "target": "com.amazonaws.emr#OnDemandResizingSpecification", "traits": { - "smithy.api#documentation": "

The resize specification for On-Demand Instances in the instance fleet, which contains\n the resize timeout period.

" + "smithy.api#documentation": "

The resize specification for On-Demand Instances in the instance fleet, which contains\n the allocation strategy, capacity reservation options, and the resize timeout period.

" } } }, @@ -6448,7 +6469,20 @@ "inputToken": "Marker", "outputToken": "Marker", "items": "Clusters" - } + }, + "smithy.test#smokeTests": [ + { + "id": "ListClustersSuccess", + "params": {}, + "vendorParams": { + "region": "us-west-2" + }, + "vendorParamsShape": "aws.test#AwsVendorParams", + "expect": { + "success": {} + } + } + ] } }, "com.amazonaws.emr#ListClustersInput": { @@ -7856,10 +7890,17 @@ "TimeoutDurationMinutes": { "target": "com.amazonaws.emr#WholeNumber", "traits": { - "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

On-Demand resize timeout in minutes. If On-Demand Instances are not provisioned within\n this time, the resize workflow stops. The minimum value is 5 minutes, and the maximum value\n is 10,080 minutes (7 days). The timeout applies to all resize workflows on the Instance\n Fleet. The resize could be triggered by Amazon EMR Managed Scaling or by the\n customer (via Amazon EMR Console, Amazon EMR CLI modify-instance-fleet or\n Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

", - "smithy.api#required": {} + "smithy.api#documentation": "

On-Demand resize timeout in minutes. If On-Demand Instances are not provisioned within\n this time, the resize workflow stops. The minimum value is 5 minutes, and the maximum value\n is 10,080 minutes (7 days). The timeout applies to all resize workflows on the Instance\n Fleet. The resize could be triggered by Amazon EMR Managed Scaling or by the\n customer (via Amazon EMR Console, Amazon EMR CLI modify-instance-fleet or\n Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

" + } + }, + "AllocationStrategy": { + "target": "com.amazonaws.emr#OnDemandProvisioningAllocationStrategy", + "traits": { + "smithy.api#documentation": "

Specifies the allocation strategy to use to launch On-Demand instances during a resize. The default is lowest-price.

" } + }, + "CapacityReservationOptions": { + "target": "com.amazonaws.emr#OnDemandCapacityReservationOptions" } }, "traits": { @@ -9311,9 +9352,13 @@ "TimeoutDurationMinutes": { "target": "com.amazonaws.emr#WholeNumber", "traits": { - "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

Spot resize timeout in minutes. If Spot Instances are not provisioned within this time,\n the resize workflow will stop provisioning of Spot instances. Minimum value is 5 minutes\n and maximum value is 10,080 minutes (7 days). The timeout applies to all resize workflows\n on the Instance Fleet. The resize could be triggered by Amazon EMR Managed Scaling\n or by the customer (via Amazon EMR Console, Amazon EMR CLI\n modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Spot resize timeout in minutes. If Spot Instances are not provisioned within this time,\n the resize workflow will stop provisioning of Spot instances. Minimum value is 5 minutes\n and maximum value is 10,080 minutes (7 days). The timeout applies to all resize workflows\n on the Instance Fleet. The resize could be triggered by Amazon EMR Managed Scaling\n or by the customer (via Amazon EMR Console, Amazon EMR CLI\n modify-instance-fleet or Amazon EMR SDK ModifyInstanceFleet API) or by Amazon EMR due to Amazon EC2 Spot Reclamation.

" + } + }, + "AllocationStrategy": { + "target": "com.amazonaws.emr#SpotProvisioningAllocationStrategy", + "traits": { + "smithy.api#documentation": "

Specifies the allocation strategy to use to launch Spot instances during a resize. If you run Amazon EMR releases 6.9.0 or higher,\n the default is price-capacity-optimized. If you run Amazon EMR releases 6.8.0 or lower, the default is\n capacity-optimized.

" } } },