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

Describes an instance refresh for an Auto Scaling group.

See * Also:

AWS * API Reference

*/ class InstanceRefresh { public: AWS_AUTOSCALING_API InstanceRefresh(); AWS_AUTOSCALING_API InstanceRefresh(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_AUTOSCALING_API InstanceRefresh& 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 instance refresh ID.

*/ inline const Aws::String& GetInstanceRefreshId() const{ return m_instanceRefreshId; } /** *

The instance refresh ID.

*/ inline bool InstanceRefreshIdHasBeenSet() const { return m_instanceRefreshIdHasBeenSet; } /** *

The instance refresh ID.

*/ inline void SetInstanceRefreshId(const Aws::String& value) { m_instanceRefreshIdHasBeenSet = true; m_instanceRefreshId = value; } /** *

The instance refresh ID.

*/ inline void SetInstanceRefreshId(Aws::String&& value) { m_instanceRefreshIdHasBeenSet = true; m_instanceRefreshId = std::move(value); } /** *

The instance refresh ID.

*/ inline void SetInstanceRefreshId(const char* value) { m_instanceRefreshIdHasBeenSet = true; m_instanceRefreshId.assign(value); } /** *

The instance refresh ID.

*/ inline InstanceRefresh& WithInstanceRefreshId(const Aws::String& value) { SetInstanceRefreshId(value); return *this;} /** *

The instance refresh ID.

*/ inline InstanceRefresh& WithInstanceRefreshId(Aws::String&& value) { SetInstanceRefreshId(std::move(value)); return *this;} /** *

The instance refresh ID.

*/ inline InstanceRefresh& WithInstanceRefreshId(const char* value) { SetInstanceRefreshId(value); return *this;} /** *

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

The name of the Auto Scaling group.

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

The current status for the instance refresh operation:

  • * Pending - The request was created, but the instance refresh has not * started.

  • InProgress - An instance refresh is in * progress.

  • Successful - An instance refresh * completed successfully.

  • Failed - An instance * refresh failed to complete. You can troubleshoot using the status reason and the * scaling activities.

  • Cancelling - An ongoing * instance refresh is being cancelled.

  • Cancelled - * The instance refresh is cancelled.

  • * RollbackInProgress - An instance refresh is being rolled back.

    *
  • RollbackFailed - The rollback failed to complete. * You can troubleshoot using the status reason and the scaling activities.

    *
  • RollbackSuccessful - The rollback completed * successfully.

*/ inline const InstanceRefreshStatus& GetStatus() const{ return m_status; } /** *

The current status for the instance refresh operation:

  • * Pending - The request was created, but the instance refresh has not * started.

  • InProgress - An instance refresh is in * progress.

  • Successful - An instance refresh * completed successfully.

  • Failed - An instance * refresh failed to complete. You can troubleshoot using the status reason and the * scaling activities.

  • Cancelling - An ongoing * instance refresh is being cancelled.

  • Cancelled - * The instance refresh is cancelled.

  • * RollbackInProgress - An instance refresh is being rolled back.

    *
  • RollbackFailed - The rollback failed to complete. * You can troubleshoot using the status reason and the scaling activities.

    *
  • RollbackSuccessful - The rollback completed * successfully.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The current status for the instance refresh operation:

  • * Pending - The request was created, but the instance refresh has not * started.

  • InProgress - An instance refresh is in * progress.

  • Successful - An instance refresh * completed successfully.

  • Failed - An instance * refresh failed to complete. You can troubleshoot using the status reason and the * scaling activities.

  • Cancelling - An ongoing * instance refresh is being cancelled.

  • Cancelled - * The instance refresh is cancelled.

  • * RollbackInProgress - An instance refresh is being rolled back.

    *
  • RollbackFailed - The rollback failed to complete. * You can troubleshoot using the status reason and the scaling activities.

    *
  • RollbackSuccessful - The rollback completed * successfully.

*/ inline void SetStatus(const InstanceRefreshStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The current status for the instance refresh operation:

  • * Pending - The request was created, but the instance refresh has not * started.

  • InProgress - An instance refresh is in * progress.

  • Successful - An instance refresh * completed successfully.

  • Failed - An instance * refresh failed to complete. You can troubleshoot using the status reason and the * scaling activities.

  • Cancelling - An ongoing * instance refresh is being cancelled.

  • Cancelled - * The instance refresh is cancelled.

  • * RollbackInProgress - An instance refresh is being rolled back.

    *
  • RollbackFailed - The rollback failed to complete. * You can troubleshoot using the status reason and the scaling activities.

    *
  • RollbackSuccessful - The rollback completed * successfully.

*/ inline void SetStatus(InstanceRefreshStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The current status for the instance refresh operation:

  • * Pending - The request was created, but the instance refresh has not * started.

  • InProgress - An instance refresh is in * progress.

  • Successful - An instance refresh * completed successfully.

  • Failed - An instance * refresh failed to complete. You can troubleshoot using the status reason and the * scaling activities.

  • Cancelling - An ongoing * instance refresh is being cancelled.

  • Cancelled - * The instance refresh is cancelled.

  • * RollbackInProgress - An instance refresh is being rolled back.

    *
  • RollbackFailed - The rollback failed to complete. * You can troubleshoot using the status reason and the scaling activities.

    *
  • RollbackSuccessful - The rollback completed * successfully.

*/ inline InstanceRefresh& WithStatus(const InstanceRefreshStatus& value) { SetStatus(value); return *this;} /** *

The current status for the instance refresh operation:

  • * Pending - The request was created, but the instance refresh has not * started.

  • InProgress - An instance refresh is in * progress.

  • Successful - An instance refresh * completed successfully.

  • Failed - An instance * refresh failed to complete. You can troubleshoot using the status reason and the * scaling activities.

  • Cancelling - An ongoing * instance refresh is being cancelled.

  • Cancelled - * The instance refresh is cancelled.

  • * RollbackInProgress - An instance refresh is being rolled back.

    *
  • RollbackFailed - The rollback failed to complete. * You can troubleshoot using the status reason and the scaling activities.

    *
  • RollbackSuccessful - The rollback completed * successfully.

*/ inline InstanceRefresh& WithStatus(InstanceRefreshStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

The explanation for the specific status assigned to this operation.

*/ inline const Aws::String& GetStatusReason() const{ return m_statusReason; } /** *

The explanation for the specific status assigned to this operation.

*/ inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; } /** *

The explanation for the specific status assigned to this operation.

*/ inline void SetStatusReason(const Aws::String& value) { m_statusReasonHasBeenSet = true; m_statusReason = value; } /** *

The explanation for the specific status assigned to this operation.

*/ inline void SetStatusReason(Aws::String&& value) { m_statusReasonHasBeenSet = true; m_statusReason = std::move(value); } /** *

The explanation for the specific status assigned to this operation.

*/ inline void SetStatusReason(const char* value) { m_statusReasonHasBeenSet = true; m_statusReason.assign(value); } /** *

The explanation for the specific status assigned to this operation.

*/ inline InstanceRefresh& WithStatusReason(const Aws::String& value) { SetStatusReason(value); return *this;} /** *

The explanation for the specific status assigned to this operation.

*/ inline InstanceRefresh& WithStatusReason(Aws::String&& value) { SetStatusReason(std::move(value)); return *this;} /** *

The explanation for the specific status assigned to this operation.

*/ inline InstanceRefresh& WithStatusReason(const char* value) { SetStatusReason(value); return *this;} /** *

The date and time at which the instance refresh began.

*/ inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; } /** *

The date and time at which the instance refresh began.

*/ inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; } /** *

The date and time at which the instance refresh began.

*/ inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; } /** *

The date and time at which the instance refresh began.

*/ inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); } /** *

The date and time at which the instance refresh began.

*/ inline InstanceRefresh& WithStartTime(const Aws::Utils::DateTime& value) { SetStartTime(value); return *this;} /** *

The date and time at which the instance refresh began.

*/ inline InstanceRefresh& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;} /** *

The date and time at which the instance refresh ended.

*/ inline const Aws::Utils::DateTime& GetEndTime() const{ return m_endTime; } /** *

The date and time at which the instance refresh ended.

*/ inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; } /** *

The date and time at which the instance refresh ended.

*/ inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; } /** *

The date and time at which the instance refresh ended.

*/ inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); } /** *

The date and time at which the instance refresh ended.

*/ inline InstanceRefresh& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); return *this;} /** *

The date and time at which the instance refresh ended.

*/ inline InstanceRefresh& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;} /** *

The percentage of the instance refresh that is complete. For each instance * replacement, Amazon EC2 Auto Scaling tracks the instance's health status and * warm-up time. When the instance's health status changes to healthy and the * specified warm-up time passes, the instance is considered updated and is added * to the percentage complete.

PercentageComplete does * not include instances that are replaced during a rollback. This value gradually * goes back down to zero during a rollback.

*/ inline int GetPercentageComplete() const{ return m_percentageComplete; } /** *

The percentage of the instance refresh that is complete. For each instance * replacement, Amazon EC2 Auto Scaling tracks the instance's health status and * warm-up time. When the instance's health status changes to healthy and the * specified warm-up time passes, the instance is considered updated and is added * to the percentage complete.

PercentageComplete does * not include instances that are replaced during a rollback. This value gradually * goes back down to zero during a rollback.

*/ inline bool PercentageCompleteHasBeenSet() const { return m_percentageCompleteHasBeenSet; } /** *

The percentage of the instance refresh that is complete. For each instance * replacement, Amazon EC2 Auto Scaling tracks the instance's health status and * warm-up time. When the instance's health status changes to healthy and the * specified warm-up time passes, the instance is considered updated and is added * to the percentage complete.

PercentageComplete does * not include instances that are replaced during a rollback. This value gradually * goes back down to zero during a rollback.

*/ inline void SetPercentageComplete(int value) { m_percentageCompleteHasBeenSet = true; m_percentageComplete = value; } /** *

The percentage of the instance refresh that is complete. For each instance * replacement, Amazon EC2 Auto Scaling tracks the instance's health status and * warm-up time. When the instance's health status changes to healthy and the * specified warm-up time passes, the instance is considered updated and is added * to the percentage complete.

PercentageComplete does * not include instances that are replaced during a rollback. This value gradually * goes back down to zero during a rollback.

*/ inline InstanceRefresh& WithPercentageComplete(int value) { SetPercentageComplete(value); return *this;} /** *

The number of instances remaining to update before the instance refresh is * complete.

If you roll back the instance refresh, * InstancesToUpdate shows you the number of instances that were not * yet updated by the instance refresh. Therefore, these instances don't need to be * replaced as part of the rollback.

*/ inline int GetInstancesToUpdate() const{ return m_instancesToUpdate; } /** *

The number of instances remaining to update before the instance refresh is * complete.

If you roll back the instance refresh, * InstancesToUpdate shows you the number of instances that were not * yet updated by the instance refresh. Therefore, these instances don't need to be * replaced as part of the rollback.

*/ inline bool InstancesToUpdateHasBeenSet() const { return m_instancesToUpdateHasBeenSet; } /** *

The number of instances remaining to update before the instance refresh is * complete.

If you roll back the instance refresh, * InstancesToUpdate shows you the number of instances that were not * yet updated by the instance refresh. Therefore, these instances don't need to be * replaced as part of the rollback.

*/ inline void SetInstancesToUpdate(int value) { m_instancesToUpdateHasBeenSet = true; m_instancesToUpdate = value; } /** *

The number of instances remaining to update before the instance refresh is * complete.

If you roll back the instance refresh, * InstancesToUpdate shows you the number of instances that were not * yet updated by the instance refresh. Therefore, these instances don't need to be * replaced as part of the rollback.

*/ inline InstanceRefresh& WithInstancesToUpdate(int value) { SetInstancesToUpdate(value); return *this;} /** *

Additional progress details for an Auto Scaling group that has a warm * pool.

*/ inline const InstanceRefreshProgressDetails& GetProgressDetails() const{ return m_progressDetails; } /** *

Additional progress details for an Auto Scaling group that has a warm * pool.

*/ inline bool ProgressDetailsHasBeenSet() const { return m_progressDetailsHasBeenSet; } /** *

Additional progress details for an Auto Scaling group that has a warm * pool.

*/ inline void SetProgressDetails(const InstanceRefreshProgressDetails& value) { m_progressDetailsHasBeenSet = true; m_progressDetails = value; } /** *

Additional progress details for an Auto Scaling group that has a warm * pool.

*/ inline void SetProgressDetails(InstanceRefreshProgressDetails&& value) { m_progressDetailsHasBeenSet = true; m_progressDetails = std::move(value); } /** *

Additional progress details for an Auto Scaling group that has a warm * pool.

*/ inline InstanceRefresh& WithProgressDetails(const InstanceRefreshProgressDetails& value) { SetProgressDetails(value); return *this;} /** *

Additional progress details for an Auto Scaling group that has a warm * pool.

*/ inline InstanceRefresh& WithProgressDetails(InstanceRefreshProgressDetails&& value) { SetProgressDetails(std::move(value)); return *this;} /** *

The preferences for an instance refresh.

*/ inline const RefreshPreferences& GetPreferences() const{ return m_preferences; } /** *

The preferences for an instance refresh.

*/ inline bool PreferencesHasBeenSet() const { return m_preferencesHasBeenSet; } /** *

The preferences for an instance refresh.

*/ inline void SetPreferences(const RefreshPreferences& value) { m_preferencesHasBeenSet = true; m_preferences = value; } /** *

The preferences for an instance refresh.

*/ inline void SetPreferences(RefreshPreferences&& value) { m_preferencesHasBeenSet = true; m_preferences = std::move(value); } /** *

The preferences for an instance refresh.

*/ inline InstanceRefresh& WithPreferences(const RefreshPreferences& value) { SetPreferences(value); return *this;} /** *

The preferences for an instance refresh.

*/ inline InstanceRefresh& WithPreferences(RefreshPreferences&& value) { SetPreferences(std::move(value)); return *this;} /** *

Describes the desired configuration for the instance refresh.

*/ inline const DesiredConfiguration& GetDesiredConfiguration() const{ return m_desiredConfiguration; } /** *

Describes the desired configuration for the instance refresh.

*/ inline bool DesiredConfigurationHasBeenSet() const { return m_desiredConfigurationHasBeenSet; } /** *

Describes the desired configuration for the instance refresh.

*/ inline void SetDesiredConfiguration(const DesiredConfiguration& value) { m_desiredConfigurationHasBeenSet = true; m_desiredConfiguration = value; } /** *

Describes the desired configuration for the instance refresh.

*/ inline void SetDesiredConfiguration(DesiredConfiguration&& value) { m_desiredConfigurationHasBeenSet = true; m_desiredConfiguration = std::move(value); } /** *

Describes the desired configuration for the instance refresh.

*/ inline InstanceRefresh& WithDesiredConfiguration(const DesiredConfiguration& value) { SetDesiredConfiguration(value); return *this;} /** *

Describes the desired configuration for the instance refresh.

*/ inline InstanceRefresh& WithDesiredConfiguration(DesiredConfiguration&& value) { SetDesiredConfiguration(std::move(value)); return *this;} /** *

The rollback details.

*/ inline const RollbackDetails& GetRollbackDetails() const{ return m_rollbackDetails; } /** *

The rollback details.

*/ inline bool RollbackDetailsHasBeenSet() const { return m_rollbackDetailsHasBeenSet; } /** *

The rollback details.

*/ inline void SetRollbackDetails(const RollbackDetails& value) { m_rollbackDetailsHasBeenSet = true; m_rollbackDetails = value; } /** *

The rollback details.

*/ inline void SetRollbackDetails(RollbackDetails&& value) { m_rollbackDetailsHasBeenSet = true; m_rollbackDetails = std::move(value); } /** *

The rollback details.

*/ inline InstanceRefresh& WithRollbackDetails(const RollbackDetails& value) { SetRollbackDetails(value); return *this;} /** *

The rollback details.

*/ inline InstanceRefresh& WithRollbackDetails(RollbackDetails&& value) { SetRollbackDetails(std::move(value)); return *this;} private: Aws::String m_instanceRefreshId; bool m_instanceRefreshIdHasBeenSet = false; Aws::String m_autoScalingGroupName; bool m_autoScalingGroupNameHasBeenSet = false; InstanceRefreshStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_statusReason; bool m_statusReasonHasBeenSet = false; Aws::Utils::DateTime m_startTime; bool m_startTimeHasBeenSet = false; Aws::Utils::DateTime m_endTime; bool m_endTimeHasBeenSet = false; int m_percentageComplete; bool m_percentageCompleteHasBeenSet = false; int m_instancesToUpdate; bool m_instancesToUpdateHasBeenSet = false; InstanceRefreshProgressDetails m_progressDetails; bool m_progressDetailsHasBeenSet = false; RefreshPreferences m_preferences; bool m_preferencesHasBeenSet = false; DesiredConfiguration m_desiredConfiguration; bool m_desiredConfigurationHasBeenSet = false; RollbackDetails m_rollbackDetails; bool m_rollbackDetailsHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws