AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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",
        weighted_capacity: "XmlStringMaxLen32",
        launch_template_specification: {
          launch_template_id: "XmlStringMaxLen255",
          launch_template_name: "LaunchTemplateName",
          version: "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 launch template.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#instances_distributionTypes::InstancesDistribution

Specifies the instances distribution. If not provided, the value for each parameter in InstancesDistribution uses a default value.

Returns:

#launch_templateTypes::LaunchTemplate

Specifies the launch template to use and optionally the instance types (overrides) that are used to provision EC2 instances to fulfill On-Demand and Spot capacities. Required when creating a mixed instances policy.

Returns:

  • (Types::LaunchTemplate)

    Specifies the launch template to use and optionally the instance types (overrides) that are used to provision EC2 instances to fulfill On-Demand and Spot capacities.