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

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

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

Overview

Note:

When making an API call, you may pass MixedInstancesPolicy data as a 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.

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.



3673
3674
3675
3676
3677
# File 'gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/types.rb', line 3673

class MixedInstancesPolicy < Struct.new(
  :launch_template,
  :instances_distribution)
  include Aws::Structure
end

#launch_templateTypes::LaunchTemplate

The launch template and instance types (overrides).

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



3673
3674
3675
3676
3677
# File 'gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/types.rb', line 3673

class MixedInstancesPolicy < Struct.new(
  :launch_template,
  :instances_distribution)
  include Aws::Structure
end