You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::EMR::Types::JobFlowInstancesConfig

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb

Overview

Note:

When making an API call, you may pass JobFlowInstancesConfig data as a hash:

{
  master_instance_type: "InstanceType",
  slave_instance_type: "InstanceType",
  instance_count: 1,
  instance_groups: [
    {
      name: "XmlStringMaxLen256",
      market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
      instance_role: "MASTER", # required, accepts MASTER, CORE, TASK
      bid_price: "XmlStringMaxLen256",
      instance_type: "InstanceType", # required
      instance_count: 1, # required
      configurations: [
        {
          classification: "String",
          configurations: {
            # recursive ConfigurationList
          },
          properties: {
            "String" => "String",
          },
        },
      ],
      ebs_configuration: {
        ebs_block_device_configs: [
          {
            volume_specification: { # required
              volume_type: "String", # required
              iops: 1,
              size_in_gb: 1, # required
            },
            volumes_per_instance: 1,
          },
        ],
        ebs_optimized: false,
      },
      auto_scaling_policy: {
        constraints: { # required
          min_capacity: 1, # required
          max_capacity: 1, # required
        },
        rules: [ # required
          {
            name: "String", # required
            description: "String",
            action: { # required
              market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
              simple_scaling_policy_configuration: { # required
                adjustment_type: "CHANGE_IN_CAPACITY", # accepts CHANGE_IN_CAPACITY, PERCENT_CHANGE_IN_CAPACITY, EXACT_CAPACITY
                scaling_adjustment: 1, # required
                cool_down: 1,
              },
            },
            trigger: { # required
              cloud_watch_alarm_definition: { # required
                comparison_operator: "GREATER_THAN_OR_EQUAL", # required, accepts GREATER_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN, LESS_THAN_OR_EQUAL
                evaluation_periods: 1,
                metric_name: "String", # required
                namespace: "String",
                period: 1, # required
                statistic: "SAMPLE_COUNT", # accepts SAMPLE_COUNT, AVERAGE, SUM, MINIMUM, MAXIMUM
                threshold: 1.0, # required
                unit: "NONE", # accepts NONE, SECONDS, MICRO_SECONDS, MILLI_SECONDS, BYTES, KILO_BYTES, MEGA_BYTES, GIGA_BYTES, TERA_BYTES, BITS, KILO_BITS, MEGA_BITS, GIGA_BITS, TERA_BITS, PERCENT, COUNT, BYTES_PER_SECOND, KILO_BYTES_PER_SECOND, MEGA_BYTES_PER_SECOND, GIGA_BYTES_PER_SECOND, TERA_BYTES_PER_SECOND, BITS_PER_SECOND, KILO_BITS_PER_SECOND, MEGA_BITS_PER_SECOND, GIGA_BITS_PER_SECOND, TERA_BITS_PER_SECOND, COUNT_PER_SECOND
                dimensions: [
                  {
                    key: "String",
                    value: "String",
                  },
                ],
              },
            },
          },
        ],
      },
    },
  ],
  instance_fleets: [
    {
      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
                },
                volumes_per_instance: 1,
              },
            ],
            ebs_optimized: false,
          },
          configurations: [
            {
              classification: "String",
              configurations: {
                # recursive ConfigurationList
              },
              properties: {
                "String" => "String",
              },
            },
          ],
        },
      ],
      launch_specifications: {
        spot_specification: { # required
          timeout_duration_minutes: 1, # required
          timeout_action: "SWITCH_TO_ON_DEMAND", # required, accepts SWITCH_TO_ON_DEMAND, TERMINATE_CLUSTER
          block_duration_minutes: 1,
        },
      },
    },
  ],
  ec2_key_name: "XmlStringMaxLen256",
  placement: {
    availability_zone: "XmlString",
    availability_zones: ["XmlStringMaxLen256"],
  },
  keep_job_flow_alive_when_no_steps: false,
  termination_protected: false,
  hadoop_version: "XmlStringMaxLen256",
  ec2_subnet_id: "XmlStringMaxLen256",
  ec2_subnet_ids: ["XmlStringMaxLen256"],
  emr_managed_master_security_group: "XmlStringMaxLen256",
  emr_managed_slave_security_group: "XmlStringMaxLen256",
  service_access_security_group: "XmlStringMaxLen256",
  additional_master_security_groups: ["XmlStringMaxLen256"],
  additional_slave_security_groups: ["XmlStringMaxLen256"],
}

A description of the Amazon EC2 instance on which the cluster (job flow) runs. A valid JobFlowInstancesConfig must contain either InstanceGroups or InstanceFleets, which is the recommended configuration. They cannot be used together. You may also have MasterInstanceType, SlaveInstanceType, and InstanceCount (all three must be present), but we don't recommend this configuration.

Instance Attribute Summary collapse

Instance Attribute Details

#additional_master_security_groupsArray<String>

A list of additional Amazon EC2 security group IDs for the master node.

Returns:

  • (Array<String>)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#additional_slave_security_groupsArray<String>

A list of additional Amazon EC2 security group IDs for the slave nodes.

Returns:

  • (Array<String>)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#ec2_key_nameString

The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop."

Returns:

  • (String)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#ec2_subnet_idString

Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, the cluster launches in the normal Amazon Web Services cloud, outside of an Amazon VPC, if the account launching the cluster supports EC2 Classic networks in the region where the cluster launches.

Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for clusters launched in an Amazon VPC.

Returns:

  • (String)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#ec2_subnet_idsArray<String>

Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.

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

Returns:

  • (Array<String>)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#emr_managed_master_security_groupString

The identifier of the Amazon EC2 security group for the master node.

Returns:

  • (String)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#emr_managed_slave_security_groupString

The identifier of the Amazon EC2 security group for the slave nodes.

Returns:

  • (String)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#hadoop_versionString

The Hadoop version for the cluster. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.

Returns:

  • (String)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#instance_countInteger

The number of EC2 instances in the cluster.

Returns:

  • (Integer)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#instance_fleetsArray<Types::InstanceFleetConfig>

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

Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.

Returns:



3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#instance_groupsArray<Types::InstanceGroupConfig>

Configuration for the instance groups in a cluster.

Returns:



3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#keep_job_flow_alive_when_no_stepsBoolean

Specifies whether the cluster should remain available after completing all steps.

Returns:

  • (Boolean)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#master_instance_typeString

The EC2 instance type of the master node.

Returns:

  • (String)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#placementTypes::PlacementType

The Availability Zone in which the cluster runs.



3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#service_access_security_groupString

The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.

Returns:

  • (String)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#slave_instance_typeString

The EC2 instance type of the slave nodes.

Returns:

  • (String)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end

#termination_protectedBoolean

Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.

Returns:

  • (Boolean)


3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/types.rb', line 3207

class JobFlowInstancesConfig < Struct.new(
  :master_instance_type,
  :slave_instance_type,
  :instance_count,
  :instance_groups,
  :instance_fleets,
  :ec2_key_name,
  :placement,
  :keep_job_flow_alive_when_no_steps,
  :termination_protected,
  :hadoop_version,
  :ec2_subnet_id,
  :ec2_subnet_ids,
  :emr_managed_master_security_group,
  :emr_managed_slave_security_group,
  :service_access_security_group,
  :additional_master_security_groups,
  :additional_slave_security_groups)
  include Aws::Structure
end