Method: Aws::EMR::Client#add_instance_fleet
- Defined in:
- lib/aws-sdk-emr/client.rb
#add_instance_fleet(params = {}) ⇒ Types::AddInstanceFleetOutput
Adds an instance fleet to a running cluster.
<note markdown=“1”> The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x.
</note>
Examples:
Request syntax with placeholder values
Request syntax with placeholder values
resp = client.add_instance_fleet({
cluster_id: "XmlStringMaxLen256", # required
instance_fleet: { # required
name: "XmlStringMaxLen256",
instance_fleet_type: "MASTER", # required, accepts MASTER, CORE, TASK
target_on_demand_capacity: 1,
target_spot_capacity: 1,
instance_type_configs: [
{
instance_type: "InstanceType", # required
weighted_capacity: 1,
bid_price: "XmlStringMaxLen256",
bid_price_as_percentage_of_on_demand_price: 1.0,
ebs_configuration: {
ebs_block_device_configs: [
{
volume_specification: { # required
volume_type: "String", # required
iops: 1,
size_in_gb: 1, # required
throughput: 1,
},
volumes_per_instance: 1,
},
],
ebs_optimized: false,
},
configurations: [
{
classification: "String",
configurations: {
# recursive ConfigurationList
},
properties: {
"String" => "String",
},
},
],
custom_ami_id: "XmlStringMaxLen256",
priority: 1.0,
},
],
launch_specifications: {
spot_specification: {
timeout_duration_minutes: 1, # required
timeout_action: "SWITCH_TO_ON_DEMAND", # required, accepts SWITCH_TO_ON_DEMAND, TERMINATE_CLUSTER
block_duration_minutes: 1,
allocation_strategy: "capacity-optimized", # accepts capacity-optimized, price-capacity-optimized, lowest-price, diversified, capacity-optimized-prioritized
},
on_demand_specification: {
allocation_strategy: "lowest-price", # required, accepts lowest-price, prioritized
capacity_reservation_options: {
usage_strategy: "use-capacity-reservations-first", # accepts use-capacity-reservations-first
capacity_reservation_preference: "open", # accepts open, none
capacity_reservation_resource_group_arn: "XmlStringMaxLen256",
},
},
},
resize_specifications: {
spot_resize_specification: {
timeout_duration_minutes: 1,
allocation_strategy: "capacity-optimized", # accepts capacity-optimized, price-capacity-optimized, lowest-price, diversified, capacity-optimized-prioritized
},
on_demand_resize_specification: {
timeout_duration_minutes: 1,
allocation_strategy: "lowest-price", # accepts lowest-price, prioritized
capacity_reservation_options: {
usage_strategy: "use-capacity-reservations-first", # accepts use-capacity-reservations-first
capacity_reservation_preference: "open", # accepts open, none
capacity_reservation_resource_group_arn: "XmlStringMaxLen256",
},
},
},
context: "XmlStringMaxLen256",
},
})
Response structure
Response structure
resp.cluster_id #=> String
resp.instance_fleet_id #=> String
resp.cluster_arn #=> String
Parameters:
-
params
(Hash)
(defaults to: {})
—
({})
Options Hash (params):
-
:cluster_id
(required, String)
—
The unique identifier of the cluster.
-
:instance_fleet
(required, Types::InstanceFleetConfig)
—
Specifies the configuration of the instance fleet.
Returns:
-
(Types::AddInstanceFleetOutput)
—
Returns a response object which responds to the following methods:
-
#cluster_id => String
-
#instance_fleet_id => String
-
#cluster_arn => String
-
See Also:
594 595 596 597 |
# File 'lib/aws-sdk-emr/client.rb', line 594 def add_instance_fleet(params = {}, options = {}) req = build_request(:add_instance_fleet, params) req.send_request(options) end |