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. Used in combination with CreateAutoScalingGroup. For more information, see Auto Scaling Groups with Multiple Instance Types and Purchase Options in the Amazon EC2 Auto Scaling User Guide.

When you create your Auto Scaling group, you can specify a launch configuration or template as a parameter for the top-level object, or you can specify a mixed instances policy, but not both at the same time.

Instance Attribute Summary collapse

Instance Attribute Details

#instances_distributionTypes::InstancesDistribution

The instances distribution to use.

If you leave this parameter unspecified when creating the group, the default values are used.



3456
3457
3458
3459
3460
# File 'gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/types.rb', line 3456

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

#launch_templateTypes::LaunchTemplate

The launch template and overrides.

This parameter is required when creating an Auto Scaling group with a mixed instances policy, but is not required when updating the group.



3456
3457
3458
3459
3460
# File 'gems/aws-sdk-autoscaling/lib/aws-sdk-autoscaling/types.rb', line 3456

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