/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Use this structure to launch multiple instance types and On-Demand Instances
* and Spot Instances within a single Auto Scaling group. A mixed instances
* policy contains information that Amazon EC2 Auto Scaling can use to launch
* instances and help optimize your costs. For more information, see Auto
* Scaling groups with multiple instance types and purchase options in the
* Amazon EC2 Auto Scaling User Guide.See Also:
AWS
* API Reference
One or more launch templates and the instance types (overrides) that are used * to launch EC2 instances to fulfill On-Demand and Spot capacities.
*/ inline const LaunchTemplate& GetLaunchTemplate() const{ return m_launchTemplate; } /** *One or more launch templates and the instance types (overrides) that are used * to launch EC2 instances to fulfill On-Demand and Spot capacities.
*/ inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; } /** *One or more launch templates and the instance types (overrides) that are used * to launch EC2 instances to fulfill On-Demand and Spot capacities.
*/ inline void SetLaunchTemplate(const LaunchTemplate& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = value; } /** *One or more launch templates and the instance types (overrides) that are used * to launch EC2 instances to fulfill On-Demand and Spot capacities.
*/ inline void SetLaunchTemplate(LaunchTemplate&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::move(value); } /** *One or more launch templates and the instance types (overrides) that are used * to launch EC2 instances to fulfill On-Demand and Spot capacities.
*/ inline MixedInstancesPolicy& WithLaunchTemplate(const LaunchTemplate& value) { SetLaunchTemplate(value); return *this;} /** *One or more launch templates and the instance types (overrides) that are used * to launch EC2 instances to fulfill On-Demand and Spot capacities.
*/ inline MixedInstancesPolicy& WithLaunchTemplate(LaunchTemplate&& value) { SetLaunchTemplate(std::move(value)); return *this;} /** *The instances distribution.
*/ inline const InstancesDistribution& GetInstancesDistribution() const{ return m_instancesDistribution; } /** *The instances distribution.
*/ inline bool InstancesDistributionHasBeenSet() const { return m_instancesDistributionHasBeenSet; } /** *The instances distribution.
*/ inline void SetInstancesDistribution(const InstancesDistribution& value) { m_instancesDistributionHasBeenSet = true; m_instancesDistribution = value; } /** *The instances distribution.
*/ inline void SetInstancesDistribution(InstancesDistribution&& value) { m_instancesDistributionHasBeenSet = true; m_instancesDistribution = std::move(value); } /** *The instances distribution.
*/ inline MixedInstancesPolicy& WithInstancesDistribution(const InstancesDistribution& value) { SetInstancesDistribution(value); return *this;} /** *The instances distribution.
*/ inline MixedInstancesPolicy& WithInstancesDistribution(InstancesDistribution&& value) { SetInstancesDistribution(std::move(value)); return *this;} private: LaunchTemplate m_launchTemplate; bool m_launchTemplateHasBeenSet = false; InstancesDistribution m_instancesDistribution; bool m_instancesDistributionHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws