We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.
Protected
Adds an instance fleet to a running cluster.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x.
Use a bare-bones client and the command you need to make an API call.
import { EMRClient, AddInstanceFleetCommand } from "@aws-sdk/client-emr"; // ES Modules import// const { EMRClient, AddInstanceFleetCommand } = require("@aws-sdk/client-emr"); // CommonJS importconst client = new EMRClient(config);const input = { // AddInstanceFleetInput ClusterId: "STRING_VALUE", // required InstanceFleet: { // InstanceFleetConfig Name: "STRING_VALUE", InstanceFleetType: "MASTER" || "CORE" || "TASK", // required TargetOnDemandCapacity: Number("int"), TargetSpotCapacity: Number("int"), 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: "<ConfigurationList>", Properties: { // StringMap "<keys>": "STRING_VALUE", }, }, ], Properties: { "<keys>": "STRING_VALUE", }, }, ], CustomAmiId: "STRING_VALUE", }, ], LaunchSpecifications: { // InstanceFleetProvisioningSpecifications SpotSpecification: { // SpotProvisioningSpecification TimeoutDurationMinutes: Number("int"), // required TimeoutAction: "SWITCH_TO_ON_DEMAND" || "TERMINATE_CLUSTER", // required BlockDurationMinutes: Number("int"), AllocationStrategy: "capacity-optimized" || "price-capacity-optimized" || "lowest-price" || "diversified", }, OnDemandSpecification: { // OnDemandProvisioningSpecification AllocationStrategy: "lowest-price", // required CapacityReservationOptions: { // OnDemandCapacityReservationOptions UsageStrategy: "use-capacity-reservations-first", CapacityReservationPreference: "open" || "none", CapacityReservationResourceGroupArn: "STRING_VALUE", }, }, }, ResizeSpecifications: { // InstanceFleetResizingSpecifications SpotResizeSpecification: { // SpotResizingSpecification TimeoutDurationMinutes: Number("int"), // required }, OnDemandResizeSpecification: { // OnDemandResizingSpecification TimeoutDurationMinutes: Number("int"), // required }, }, },};const command = new AddInstanceFleetCommand(input);const response = await client.send(command);// { // AddInstanceFleetOutput// ClusterId: "STRING_VALUE",// InstanceFleetId: "STRING_VALUE",// ClusterArn: "STRING_VALUE",// };
AddInstanceFleetCommandInput
AddInstanceFleetCommandOutput
input
response
config
InternalServerException (server fault)
This exception occurs when there is an internal failure in the Amazon EMR service.
InvalidRequestException (client fault)
This exception occurs when there is something wrong with user input.
EMRServiceException
Base exception class for all service exceptions from EMR service.
Readonly
Static
Adds an instance fleet to a running cluster.
The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x.
Example
Use a bare-bones client and the command you need to make an API call.
Param
AddInstanceFleetCommandInput
Returns
AddInstanceFleetCommandOutput
See
input
shape.response
shape.config
shape.Throws
InternalServerException (server fault)
This exception occurs when there is an internal failure in the Amazon EMR service.
Throws
InvalidRequestException (client fault)
This exception occurs when there is something wrong with user input.
Throws
EMRServiceException
Base exception class for all service exceptions from EMR service.