instance_fleets
Creates, updates, deletes, gets or lists an instance_fleets resource.
Overview
| Name | instance_fleets |
| Type | Resource |
| Id | aws.emr.instance_fleets |
Fields
The following fields are returned by SELECT queries:
- list_instance_fleets
| Name | Datatype | Description |
|---|---|---|
context | string | Reserved. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
id | string | The unique identifier of the instance fleet. |
instance_fleet_type | string | The node type that the instance fleet hosts. Valid values are MASTER, CORE, or TASK. (MASTER, CORE, TASK) |
instance_type_specifications | array | An array of specifications for the instance types that comprise an instance fleet. |
launch_specifications | object | Describes the launch specification for an instance fleet. |
name | string | A friendly name for the instance fleet. (pattern: <code>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*</code>) |
provisioned_on_demand_capacity | integer | The number of On-Demand units that have been provisioned for the instance fleet to fulfill TargetOnDemandCapacity. This provisioned capacity might be less than or greater than TargetOnDemandCapacity. |
provisioned_spot_capacity | integer | The number of Spot units that have been provisioned for this instance fleet to fulfill TargetSpotCapacity. This provisioned capacity might be less than or greater than TargetSpotCapacity. |
resize_specifications | object | The resize specification for the instance fleet. |
status | object | The current status of the instance fleet. |
target_on_demand_capacity | integer | The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand Instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand Instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand Instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedOnDemandCapacity to determine the Spot capacity units that have been provisioned for the instance fleet. If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1. |
target_spot_capacity | integer | The target capacity of Spot units for the instance fleet, which determines how many Spot Instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot Instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedSpotCapacity to determine the Spot capacity units that have been provisioned for the instance fleet. If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_instance_fleets | select | region | Lists all available details about the instance fleets in a cluster. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. | |
add_instance_fleet | update | region, ClusterId, InstanceFleet | 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. | |
modify_instance_fleet | exec | region, ClusterId, InstanceFleet | Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_instance_fleets
Lists all available details about the instance fleets in a cluster. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
SELECT
context,
id,
instance_fleet_type,
instance_type_specifications,
launch_specifications,
name,
provisioned_on_demand_capacity,
provisioned_spot_capacity,
resize_specifications,
status,
target_on_demand_capacity,
target_spot_capacity
FROM aws.emr.instance_fleets
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- add_instance_fleet
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.
UPDATE aws.emr.instance_fleets
SET
ClusterId = '{{ ClusterId }}',
InstanceFleet = '{{ InstanceFleet }}'
WHERE
region = '{{ region }}' --required
AND ClusterId = '{{ ClusterId }}' --required
AND InstanceFleet = '{{ InstanceFleet }}' --required
RETURNING
cluster_arn,
cluster_id,
instance_fleet_id;
Lifecycle Methods
- modify_instance_fleet
Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically. The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
EXEC aws.emr.instance_fleets.modify_instance_fleet
@region='{{ region }}' --required
@@json=
'{
"ClusterId": "{{ ClusterId }}",
"InstanceFleet": "{{ InstanceFleet }}"
}'
;