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

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

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing JobFlowInstancesConfig as input to an Aws::Client method, you can use a vanilla 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: {
          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
        },
        on_demand_specification: {
          allocation_strategy: "lowest-price", # required, accepts lowest-price
        },
      },
    },
  ],
  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.

Returned by:

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>)

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

#additional_slave_security_groupsArray<String>

A list of additional Amazon EC2 security group IDs for the core and task nodes.

Returns:

  • (Array<String>)

    A list of additional Amazon EC2 security group IDs for the core and task nodes.

#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)

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

#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 and your account supports EC2-Classic, the cluster launches in EC2-Classic.

Returns:

  • (String)

    Applies to clusters that use the uniform instance group configuration.

#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>)

    Applies to clusters that use the instance fleet configuration.

#emr_managed_master_security_groupString

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

Returns:

  • (String)

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

#emr_managed_slave_security_groupString

The identifier of the Amazon EC2 security group for the core and task nodes.

Returns:

  • (String)

    The identifier of the Amazon EC2 security group for the core and task nodes.

#hadoop_versionString

Applies only to Amazon EMR release versions earlier than 4.0. 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)

    Applies only to Amazon EMR release versions earlier than 4.0.

#instance_countInteger

The number of EC2 instances in the cluster.

Returns:

  • (Integer)

    The number of EC2 instances in the cluster.

#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:

  • (Array<Types::InstanceFleetConfig>)

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

#instance_groupsArray<Types::InstanceGroupConfig>

Configuration for the instance groups in a cluster.

Returns:

#keep_job_flow_alive_when_no_stepsBoolean

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

Returns:

  • (Boolean)

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

#master_instance_typeString

The EC2 instance type of the master node.

Returns:

  • (String)

    The EC2 instance type of the master node.

#placementTypes::PlacementType

The Availability Zone in which the cluster runs.

Returns:

#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)

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

#slave_instance_typeString

The EC2 instance type of the core and task nodes.

Returns:

  • (String)

    The EC2 instance type of the core and task nodes.

#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)

    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.