/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace AutoScaling { namespace Model { /** *

Describes an EC2 instance associated with an Auto Scaling * group.

See Also:

AWS * API Reference

*/ class AutoScalingInstanceDetails { public: AWS_AUTOSCALING_API AutoScalingInstanceDetails(); AWS_AUTOSCALING_API AutoScalingInstanceDetails(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_AUTOSCALING_API AutoScalingInstanceDetails& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The ID of the instance.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance.

*/ inline AutoScalingInstanceDetails& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance.

*/ inline AutoScalingInstanceDetails& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance.

*/ inline AutoScalingInstanceDetails& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The instance type of the EC2 instance.

*/ inline const Aws::String& GetInstanceType() const{ return m_instanceType; } /** *

The instance type of the EC2 instance.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

The instance type of the EC2 instance.

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

The instance type of the EC2 instance.

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

The instance type of the EC2 instance.

*/ inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); } /** *

The instance type of the EC2 instance.

*/ inline AutoScalingInstanceDetails& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

The instance type of the EC2 instance.

*/ inline AutoScalingInstanceDetails& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

The instance type of the EC2 instance.

*/ inline AutoScalingInstanceDetails& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

The name of the Auto Scaling group for the instance.

*/ inline const Aws::String& GetAutoScalingGroupName() const{ return m_autoScalingGroupName; } /** *

The name of the Auto Scaling group for the instance.

*/ inline bool AutoScalingGroupNameHasBeenSet() const { return m_autoScalingGroupNameHasBeenSet; } /** *

The name of the Auto Scaling group for the instance.

*/ inline void SetAutoScalingGroupName(const Aws::String& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; } /** *

The name of the Auto Scaling group for the instance.

*/ inline void SetAutoScalingGroupName(Aws::String&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = std::move(value); } /** *

The name of the Auto Scaling group for the instance.

*/ inline void SetAutoScalingGroupName(const char* value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName.assign(value); } /** *

The name of the Auto Scaling group for the instance.

*/ inline AutoScalingInstanceDetails& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;} /** *

The name of the Auto Scaling group for the instance.

*/ inline AutoScalingInstanceDetails& WithAutoScalingGroupName(Aws::String&& value) { SetAutoScalingGroupName(std::move(value)); return *this;} /** *

The name of the Auto Scaling group for the instance.

*/ inline AutoScalingInstanceDetails& WithAutoScalingGroupName(const char* value) { SetAutoScalingGroupName(value); return *this;} /** *

The Availability Zone for the instance.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone for the instance.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone for the instance.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone for the instance.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone for the instance.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone for the instance.

*/ inline AutoScalingInstanceDetails& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone for the instance.

*/ inline AutoScalingInstanceDetails& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone for the instance.

*/ inline AutoScalingInstanceDetails& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

The lifecycle state for the instance. The Quarantined state is * not used. For information about lifecycle states, see Instance * lifecycle in the Amazon EC2 Auto Scaling User Guide.

Valid * values: Pending | Pending:Wait | * Pending:Proceed | Quarantined | InService * | Terminating | Terminating:Wait | * Terminating:Proceed | Terminated | * Detaching | Detached | EnteringStandby | * Standby | Warmed:Pending | * Warmed:Pending:Wait | Warmed:Pending:Proceed | * Warmed:Terminating | Warmed:Terminating:Wait | * Warmed:Terminating:Proceed | Warmed:Terminated | * Warmed:Stopped | Warmed:Running

*/ inline const Aws::String& GetLifecycleState() const{ return m_lifecycleState; } /** *

The lifecycle state for the instance. The Quarantined state is * not used. For information about lifecycle states, see Instance * lifecycle in the Amazon EC2 Auto Scaling User Guide.

Valid * values: Pending | Pending:Wait | * Pending:Proceed | Quarantined | InService * | Terminating | Terminating:Wait | * Terminating:Proceed | Terminated | * Detaching | Detached | EnteringStandby | * Standby | Warmed:Pending | * Warmed:Pending:Wait | Warmed:Pending:Proceed | * Warmed:Terminating | Warmed:Terminating:Wait | * Warmed:Terminating:Proceed | Warmed:Terminated | * Warmed:Stopped | Warmed:Running

*/ inline bool LifecycleStateHasBeenSet() const { return m_lifecycleStateHasBeenSet; } /** *

The lifecycle state for the instance. The Quarantined state is * not used. For information about lifecycle states, see Instance * lifecycle in the Amazon EC2 Auto Scaling User Guide.

Valid * values: Pending | Pending:Wait | * Pending:Proceed | Quarantined | InService * | Terminating | Terminating:Wait | * Terminating:Proceed | Terminated | * Detaching | Detached | EnteringStandby | * Standby | Warmed:Pending | * Warmed:Pending:Wait | Warmed:Pending:Proceed | * Warmed:Terminating | Warmed:Terminating:Wait | * Warmed:Terminating:Proceed | Warmed:Terminated | * Warmed:Stopped | Warmed:Running

*/ inline void SetLifecycleState(const Aws::String& value) { m_lifecycleStateHasBeenSet = true; m_lifecycleState = value; } /** *

The lifecycle state for the instance. The Quarantined state is * not used. For information about lifecycle states, see Instance * lifecycle in the Amazon EC2 Auto Scaling User Guide.

Valid * values: Pending | Pending:Wait | * Pending:Proceed | Quarantined | InService * | Terminating | Terminating:Wait | * Terminating:Proceed | Terminated | * Detaching | Detached | EnteringStandby | * Standby | Warmed:Pending | * Warmed:Pending:Wait | Warmed:Pending:Proceed | * Warmed:Terminating | Warmed:Terminating:Wait | * Warmed:Terminating:Proceed | Warmed:Terminated | * Warmed:Stopped | Warmed:Running

*/ inline void SetLifecycleState(Aws::String&& value) { m_lifecycleStateHasBeenSet = true; m_lifecycleState = std::move(value); } /** *

The lifecycle state for the instance. The Quarantined state is * not used. For information about lifecycle states, see Instance * lifecycle in the Amazon EC2 Auto Scaling User Guide.

Valid * values: Pending | Pending:Wait | * Pending:Proceed | Quarantined | InService * | Terminating | Terminating:Wait | * Terminating:Proceed | Terminated | * Detaching | Detached | EnteringStandby | * Standby | Warmed:Pending | * Warmed:Pending:Wait | Warmed:Pending:Proceed | * Warmed:Terminating | Warmed:Terminating:Wait | * Warmed:Terminating:Proceed | Warmed:Terminated | * Warmed:Stopped | Warmed:Running

*/ inline void SetLifecycleState(const char* value) { m_lifecycleStateHasBeenSet = true; m_lifecycleState.assign(value); } /** *

The lifecycle state for the instance. The Quarantined state is * not used. For information about lifecycle states, see Instance * lifecycle in the Amazon EC2 Auto Scaling User Guide.

Valid * values: Pending | Pending:Wait | * Pending:Proceed | Quarantined | InService * | Terminating | Terminating:Wait | * Terminating:Proceed | Terminated | * Detaching | Detached | EnteringStandby | * Standby | Warmed:Pending | * Warmed:Pending:Wait | Warmed:Pending:Proceed | * Warmed:Terminating | Warmed:Terminating:Wait | * Warmed:Terminating:Proceed | Warmed:Terminated | * Warmed:Stopped | Warmed:Running

*/ inline AutoScalingInstanceDetails& WithLifecycleState(const Aws::String& value) { SetLifecycleState(value); return *this;} /** *

The lifecycle state for the instance. The Quarantined state is * not used. For information about lifecycle states, see Instance * lifecycle in the Amazon EC2 Auto Scaling User Guide.

Valid * values: Pending | Pending:Wait | * Pending:Proceed | Quarantined | InService * | Terminating | Terminating:Wait | * Terminating:Proceed | Terminated | * Detaching | Detached | EnteringStandby | * Standby | Warmed:Pending | * Warmed:Pending:Wait | Warmed:Pending:Proceed | * Warmed:Terminating | Warmed:Terminating:Wait | * Warmed:Terminating:Proceed | Warmed:Terminated | * Warmed:Stopped | Warmed:Running

*/ inline AutoScalingInstanceDetails& WithLifecycleState(Aws::String&& value) { SetLifecycleState(std::move(value)); return *this;} /** *

The lifecycle state for the instance. The Quarantined state is * not used. For information about lifecycle states, see Instance * lifecycle in the Amazon EC2 Auto Scaling User Guide.

Valid * values: Pending | Pending:Wait | * Pending:Proceed | Quarantined | InService * | Terminating | Terminating:Wait | * Terminating:Proceed | Terminated | * Detaching | Detached | EnteringStandby | * Standby | Warmed:Pending | * Warmed:Pending:Wait | Warmed:Pending:Proceed | * Warmed:Terminating | Warmed:Terminating:Wait | * Warmed:Terminating:Proceed | Warmed:Terminated | * Warmed:Stopped | Warmed:Running

*/ inline AutoScalingInstanceDetails& WithLifecycleState(const char* value) { SetLifecycleState(value); return *this;} /** *

The last reported health status of this instance. Healthy means * that the instance is healthy and should remain in service. * Unhealthy means that the instance is unhealthy and Amazon EC2 Auto * Scaling should terminate and replace it.

*/ inline const Aws::String& GetHealthStatus() const{ return m_healthStatus; } /** *

The last reported health status of this instance. Healthy means * that the instance is healthy and should remain in service. * Unhealthy means that the instance is unhealthy and Amazon EC2 Auto * Scaling should terminate and replace it.

*/ inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; } /** *

The last reported health status of this instance. Healthy means * that the instance is healthy and should remain in service. * Unhealthy means that the instance is unhealthy and Amazon EC2 Auto * Scaling should terminate and replace it.

*/ inline void SetHealthStatus(const Aws::String& value) { m_healthStatusHasBeenSet = true; m_healthStatus = value; } /** *

The last reported health status of this instance. Healthy means * that the instance is healthy and should remain in service. * Unhealthy means that the instance is unhealthy and Amazon EC2 Auto * Scaling should terminate and replace it.

*/ inline void SetHealthStatus(Aws::String&& value) { m_healthStatusHasBeenSet = true; m_healthStatus = std::move(value); } /** *

The last reported health status of this instance. Healthy means * that the instance is healthy and should remain in service. * Unhealthy means that the instance is unhealthy and Amazon EC2 Auto * Scaling should terminate and replace it.

*/ inline void SetHealthStatus(const char* value) { m_healthStatusHasBeenSet = true; m_healthStatus.assign(value); } /** *

The last reported health status of this instance. Healthy means * that the instance is healthy and should remain in service. * Unhealthy means that the instance is unhealthy and Amazon EC2 Auto * Scaling should terminate and replace it.

*/ inline AutoScalingInstanceDetails& WithHealthStatus(const Aws::String& value) { SetHealthStatus(value); return *this;} /** *

The last reported health status of this instance. Healthy means * that the instance is healthy and should remain in service. * Unhealthy means that the instance is unhealthy and Amazon EC2 Auto * Scaling should terminate and replace it.

*/ inline AutoScalingInstanceDetails& WithHealthStatus(Aws::String&& value) { SetHealthStatus(std::move(value)); return *this;} /** *

The last reported health status of this instance. Healthy means * that the instance is healthy and should remain in service. * Unhealthy means that the instance is unhealthy and Amazon EC2 Auto * Scaling should terminate and replace it.

*/ inline AutoScalingInstanceDetails& WithHealthStatus(const char* value) { SetHealthStatus(value); return *this;} /** *

The launch configuration used to launch the instance. This value is not * available if you attached the instance to the Auto Scaling group.

*/ inline const Aws::String& GetLaunchConfigurationName() const{ return m_launchConfigurationName; } /** *

The launch configuration used to launch the instance. This value is not * available if you attached the instance to the Auto Scaling group.

*/ inline bool LaunchConfigurationNameHasBeenSet() const { return m_launchConfigurationNameHasBeenSet; } /** *

The launch configuration used to launch the instance. This value is not * available if you attached the instance to the Auto Scaling group.

*/ inline void SetLaunchConfigurationName(const Aws::String& value) { m_launchConfigurationNameHasBeenSet = true; m_launchConfigurationName = value; } /** *

The launch configuration used to launch the instance. This value is not * available if you attached the instance to the Auto Scaling group.

*/ inline void SetLaunchConfigurationName(Aws::String&& value) { m_launchConfigurationNameHasBeenSet = true; m_launchConfigurationName = std::move(value); } /** *

The launch configuration used to launch the instance. This value is not * available if you attached the instance to the Auto Scaling group.

*/ inline void SetLaunchConfigurationName(const char* value) { m_launchConfigurationNameHasBeenSet = true; m_launchConfigurationName.assign(value); } /** *

The launch configuration used to launch the instance. This value is not * available if you attached the instance to the Auto Scaling group.

*/ inline AutoScalingInstanceDetails& WithLaunchConfigurationName(const Aws::String& value) { SetLaunchConfigurationName(value); return *this;} /** *

The launch configuration used to launch the instance. This value is not * available if you attached the instance to the Auto Scaling group.

*/ inline AutoScalingInstanceDetails& WithLaunchConfigurationName(Aws::String&& value) { SetLaunchConfigurationName(std::move(value)); return *this;} /** *

The launch configuration used to launch the instance. This value is not * available if you attached the instance to the Auto Scaling group.

*/ inline AutoScalingInstanceDetails& WithLaunchConfigurationName(const char* value) { SetLaunchConfigurationName(value); return *this;} /** *

The launch template for the instance.

*/ inline const LaunchTemplateSpecification& GetLaunchTemplate() const{ return m_launchTemplate; } /** *

The launch template for the instance.

*/ inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; } /** *

The launch template for the instance.

*/ inline void SetLaunchTemplate(const LaunchTemplateSpecification& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = value; } /** *

The launch template for the instance.

*/ inline void SetLaunchTemplate(LaunchTemplateSpecification&& value) { m_launchTemplateHasBeenSet = true; m_launchTemplate = std::move(value); } /** *

The launch template for the instance.

*/ inline AutoScalingInstanceDetails& WithLaunchTemplate(const LaunchTemplateSpecification& value) { SetLaunchTemplate(value); return *this;} /** *

The launch template for the instance.

*/ inline AutoScalingInstanceDetails& WithLaunchTemplate(LaunchTemplateSpecification&& value) { SetLaunchTemplate(std::move(value)); return *this;} /** *

Indicates whether the instance is protected from termination by Amazon EC2 * Auto Scaling when scaling in.

*/ inline bool GetProtectedFromScaleIn() const{ return m_protectedFromScaleIn; } /** *

Indicates whether the instance is protected from termination by Amazon EC2 * Auto Scaling when scaling in.

*/ inline bool ProtectedFromScaleInHasBeenSet() const { return m_protectedFromScaleInHasBeenSet; } /** *

Indicates whether the instance is protected from termination by Amazon EC2 * Auto Scaling when scaling in.

*/ inline void SetProtectedFromScaleIn(bool value) { m_protectedFromScaleInHasBeenSet = true; m_protectedFromScaleIn = value; } /** *

Indicates whether the instance is protected from termination by Amazon EC2 * Auto Scaling when scaling in.

*/ inline AutoScalingInstanceDetails& WithProtectedFromScaleIn(bool value) { SetProtectedFromScaleIn(value); return *this;} /** *

The number of capacity units contributed by the instance based on its * instance type.

Valid Range: Minimum value of 1. Maximum value of 999.

*/ inline const Aws::String& GetWeightedCapacity() const{ return m_weightedCapacity; } /** *

The number of capacity units contributed by the instance based on its * instance type.

Valid Range: Minimum value of 1. Maximum value of 999.

*/ inline bool WeightedCapacityHasBeenSet() const { return m_weightedCapacityHasBeenSet; } /** *

The number of capacity units contributed by the instance based on its * instance type.

Valid Range: Minimum value of 1. Maximum value of 999.

*/ inline void SetWeightedCapacity(const Aws::String& value) { m_weightedCapacityHasBeenSet = true; m_weightedCapacity = value; } /** *

The number of capacity units contributed by the instance based on its * instance type.

Valid Range: Minimum value of 1. Maximum value of 999.

*/ inline void SetWeightedCapacity(Aws::String&& value) { m_weightedCapacityHasBeenSet = true; m_weightedCapacity = std::move(value); } /** *

The number of capacity units contributed by the instance based on its * instance type.

Valid Range: Minimum value of 1. Maximum value of 999.

*/ inline void SetWeightedCapacity(const char* value) { m_weightedCapacityHasBeenSet = true; m_weightedCapacity.assign(value); } /** *

The number of capacity units contributed by the instance based on its * instance type.

Valid Range: Minimum value of 1. Maximum value of 999.

*/ inline AutoScalingInstanceDetails& WithWeightedCapacity(const Aws::String& value) { SetWeightedCapacity(value); return *this;} /** *

The number of capacity units contributed by the instance based on its * instance type.

Valid Range: Minimum value of 1. Maximum value of 999.

*/ inline AutoScalingInstanceDetails& WithWeightedCapacity(Aws::String&& value) { SetWeightedCapacity(std::move(value)); return *this;} /** *

The number of capacity units contributed by the instance based on its * instance type.

Valid Range: Minimum value of 1. Maximum value of 999.

*/ inline AutoScalingInstanceDetails& WithWeightedCapacity(const char* value) { SetWeightedCapacity(value); return *this;} private: Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet = false; Aws::String m_autoScalingGroupName; bool m_autoScalingGroupNameHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; Aws::String m_lifecycleState; bool m_lifecycleStateHasBeenSet = false; Aws::String m_healthStatus; bool m_healthStatusHasBeenSet = false; Aws::String m_launchConfigurationName; bool m_launchConfigurationNameHasBeenSet = false; LaunchTemplateSpecification m_launchTemplate; bool m_launchTemplateHasBeenSet = false; bool m_protectedFromScaleIn; bool m_protectedFromScaleInHasBeenSet = false; Aws::String m_weightedCapacity; bool m_weightedCapacityHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws