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

Class: Aws::AutoScaling::Types::MixedInstancesPolicy

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

Overview

Note:

When passing MixedInstancesPolicy as input to an Aws::Client method, you can use a vanilla Hash:

{
  launch_template: {
    launch_template_specification: {
      launch_template_id: "XmlStringMaxLen255",
      launch_template_name: "LaunchTemplateName",
      version: "XmlStringMaxLen255",
    },
    overrides: [
      {
        instance_type: "XmlStringMaxLen255",
      },
    ],
  },
  instances_distribution: {
    on_demand_allocation_strategy: "XmlString",
    on_demand_base_capacity: 1,
    on_demand_percentage_above_base_capacity: 1,
    spot_allocation_strategy: "XmlString",
    spot_instance_pools: 1,
    spot_max_price: "MixedInstanceSpotPrice",
  },
}

Describes a mixed instances policy for an Auto Scaling group. With mixed instances, your Auto Scaling group can provision a combination of On-Demand Instances and Spot Instances across multiple instance types. For more information, see Auto Scaling Groups with Multiple Instance Types and Purchase Options in the Amazon EC2 Auto Scaling User Guide.

You can create a mixed instances policy for a new Auto Scaling group, or you can create it for an existing group by updating the group to specify MixedInstancesPolicy as the top-level parameter instead of a launch configuration or template. For more information, see CreateAutoScalingGroup and UpdateAutoScalingGroup.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#instances_distributionTypes::InstancesDistribution

The instances distribution to use.

If you leave this parameter unspecified when creating a mixed instances policy, the default values are used.

Returns:

#launch_templateTypes::LaunchTemplate

The launch template and instance types (overrides).

This parameter must be specified when creating a mixed instances policy.

Returns: