/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Describes the desired configuration for an instance refresh. If you
* specify a desired configuration, you must specify either a
* LaunchTemplate
or a MixedInstancesPolicy
.
* See Also:
AWS
* API Reference
Describes the launch template and the version of the launch template that * Amazon EC2 Auto Scaling uses to launch Amazon EC2 instances. For more * information about launch templates, see Launch * templates in the Amazon EC2 Auto Scaling User Guide.
*/ inline const LaunchTemplateSpecification& GetLaunchTemplate() const{ return m_launchTemplate; } /** *Describes the launch template and the version of the launch template that * Amazon EC2 Auto Scaling uses to launch Amazon EC2 instances. For more * information about launch templates, see Launch * templates in the Amazon EC2 Auto Scaling User Guide.
*/ inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; } /** *Describes the launch template and the version of the launch template that * Amazon EC2 Auto Scaling uses to launch Amazon EC2 instances. For more * information about launch templates, see Launch * templates in the Amazon EC2 Auto Scaling User Guide.
*/ inline void SetLaunchTemplate(const LaunchTemplateSpecification& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = value; } /** *Describes the launch template and the version of the launch template that * Amazon EC2 Auto Scaling uses to launch Amazon EC2 instances. For more * information about launch templates, see Launch * templates in the Amazon EC2 Auto Scaling User Guide.
*/ inline void SetLaunchTemplate(LaunchTemplateSpecification&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::move(value); } /** *Describes the launch template and the version of the launch template that * Amazon EC2 Auto Scaling uses to launch Amazon EC2 instances. For more * information about launch templates, see Launch * templates in the Amazon EC2 Auto Scaling User Guide.
*/ inline DesiredConfiguration& WithLaunchTemplate(const LaunchTemplateSpecification& value) { SetLaunchTemplate(value); return *this;} /** *Describes the launch template and the version of the launch template that * Amazon EC2 Auto Scaling uses to launch Amazon EC2 instances. For more * information about launch templates, see Launch * templates in the Amazon EC2 Auto Scaling User Guide.
*/ inline DesiredConfiguration& WithLaunchTemplate(LaunchTemplateSpecification&& value) { SetLaunchTemplate(std::move(value)); return *this;} /** *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.
*/ inline const MixedInstancesPolicy& GetMixedInstancesPolicy() const{ return m_mixedInstancesPolicy; } /** *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.
*/ inline bool MixedInstancesPolicyHasBeenSet() const { return m_mixedInstancesPolicyHasBeenSet; } /** *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.
*/ inline void SetMixedInstancesPolicy(const MixedInstancesPolicy& value) { m_mixedInstancesPolicyHasBeenSet = true; m_mixedInstancesPolicy = value; } /** *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.
*/ inline void SetMixedInstancesPolicy(MixedInstancesPolicy&& value) { m_mixedInstancesPolicyHasBeenSet = true; m_mixedInstancesPolicy = std::move(value); } /** *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.
*/ inline DesiredConfiguration& WithMixedInstancesPolicy(const MixedInstancesPolicy& value) { SetMixedInstancesPolicy(value); return *this;} /** *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.
*/ inline DesiredConfiguration& WithMixedInstancesPolicy(MixedInstancesPolicy&& value) { SetMixedInstancesPolicy(std::move(value)); return *this;} private: LaunchTemplateSpecification m_launchTemplate; bool m_launchTemplateHasBeenSet = false; MixedInstancesPolicy m_mixedInstancesPolicy; bool m_mixedInstancesPolicyHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws