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

The scaling configuration for an Aurora DB cluster in serverless * DB engine mode.

For more information, see Using * Amazon Aurora Serverless v1 in the Amazon Aurora User * Guide.

See Also:

AWS * API Reference

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

The minimum capacity for an Aurora DB cluster in serverless DB * engine mode.

*/ inline int GetMinCapacity() const{ return m_minCapacity; } /** *

The minimum capacity for an Aurora DB cluster in serverless DB * engine mode.

*/ inline bool MinCapacityHasBeenSet() const { return m_minCapacityHasBeenSet; } /** *

The minimum capacity for an Aurora DB cluster in serverless DB * engine mode.

*/ inline void SetMinCapacity(int value) { m_minCapacityHasBeenSet = true; m_minCapacity = value; } /** *

The minimum capacity for an Aurora DB cluster in serverless DB * engine mode.

*/ inline ScalingConfigurationInfo& WithMinCapacity(int value) { SetMinCapacity(value); return *this;} /** *

The maximum capacity for an Aurora DB cluster in serverless DB * engine mode.

*/ inline int GetMaxCapacity() const{ return m_maxCapacity; } /** *

The maximum capacity for an Aurora DB cluster in serverless DB * engine mode.

*/ inline bool MaxCapacityHasBeenSet() const { return m_maxCapacityHasBeenSet; } /** *

The maximum capacity for an Aurora DB cluster in serverless DB * engine mode.

*/ inline void SetMaxCapacity(int value) { m_maxCapacityHasBeenSet = true; m_maxCapacity = value; } /** *

The maximum capacity for an Aurora DB cluster in serverless DB * engine mode.

*/ inline ScalingConfigurationInfo& WithMaxCapacity(int value) { SetMaxCapacity(value); return *this;} /** *

A value that indicates whether automatic pause is allowed for the Aurora DB * cluster in serverless DB engine mode.

When the value is set * to false for an Aurora Serverless v1 DB cluster, the DB cluster automatically * resumes.

*/ inline bool GetAutoPause() const{ return m_autoPause; } /** *

A value that indicates whether automatic pause is allowed for the Aurora DB * cluster in serverless DB engine mode.

When the value is set * to false for an Aurora Serverless v1 DB cluster, the DB cluster automatically * resumes.

*/ inline bool AutoPauseHasBeenSet() const { return m_autoPauseHasBeenSet; } /** *

A value that indicates whether automatic pause is allowed for the Aurora DB * cluster in serverless DB engine mode.

When the value is set * to false for an Aurora Serverless v1 DB cluster, the DB cluster automatically * resumes.

*/ inline void SetAutoPause(bool value) { m_autoPauseHasBeenSet = true; m_autoPause = value; } /** *

A value that indicates whether automatic pause is allowed for the Aurora DB * cluster in serverless DB engine mode.

When the value is set * to false for an Aurora Serverless v1 DB cluster, the DB cluster automatically * resumes.

*/ inline ScalingConfigurationInfo& WithAutoPause(bool value) { SetAutoPause(value); return *this;} /** *

The remaining amount of time, in seconds, before the Aurora DB cluster in * serverless mode is paused. A DB cluster can be paused only when * it's idle (it has no connections).

*/ inline int GetSecondsUntilAutoPause() const{ return m_secondsUntilAutoPause; } /** *

The remaining amount of time, in seconds, before the Aurora DB cluster in * serverless mode is paused. A DB cluster can be paused only when * it's idle (it has no connections).

*/ inline bool SecondsUntilAutoPauseHasBeenSet() const { return m_secondsUntilAutoPauseHasBeenSet; } /** *

The remaining amount of time, in seconds, before the Aurora DB cluster in * serverless mode is paused. A DB cluster can be paused only when * it's idle (it has no connections).

*/ inline void SetSecondsUntilAutoPause(int value) { m_secondsUntilAutoPauseHasBeenSet = true; m_secondsUntilAutoPause = value; } /** *

The remaining amount of time, in seconds, before the Aurora DB cluster in * serverless mode is paused. A DB cluster can be paused only when * it's idle (it has no connections).

*/ inline ScalingConfigurationInfo& WithSecondsUntilAutoPause(int value) { SetSecondsUntilAutoPause(value); return *this;} /** *

The action that occurs when Aurora times out while attempting to change the * capacity of an Aurora Serverless v1 cluster. The value is either * ForceApplyCapacityChange or * RollbackCapacityChange.

* ForceApplyCapacityChange, the default, sets the capacity to the * specified value as soon as possible.

RollbackCapacityChange * ignores the capacity change if a scaling point isn't found in the timeout * period.

*/ inline const Aws::String& GetTimeoutAction() const{ return m_timeoutAction; } /** *

The action that occurs when Aurora times out while attempting to change the * capacity of an Aurora Serverless v1 cluster. The value is either * ForceApplyCapacityChange or * RollbackCapacityChange.

* ForceApplyCapacityChange, the default, sets the capacity to the * specified value as soon as possible.

RollbackCapacityChange * ignores the capacity change if a scaling point isn't found in the timeout * period.

*/ inline bool TimeoutActionHasBeenSet() const { return m_timeoutActionHasBeenSet; } /** *

The action that occurs when Aurora times out while attempting to change the * capacity of an Aurora Serverless v1 cluster. The value is either * ForceApplyCapacityChange or * RollbackCapacityChange.

* ForceApplyCapacityChange, the default, sets the capacity to the * specified value as soon as possible.

RollbackCapacityChange * ignores the capacity change if a scaling point isn't found in the timeout * period.

*/ inline void SetTimeoutAction(const Aws::String& value) { m_timeoutActionHasBeenSet = true; m_timeoutAction = value; } /** *

The action that occurs when Aurora times out while attempting to change the * capacity of an Aurora Serverless v1 cluster. The value is either * ForceApplyCapacityChange or * RollbackCapacityChange.

* ForceApplyCapacityChange, the default, sets the capacity to the * specified value as soon as possible.

RollbackCapacityChange * ignores the capacity change if a scaling point isn't found in the timeout * period.

*/ inline void SetTimeoutAction(Aws::String&& value) { m_timeoutActionHasBeenSet = true; m_timeoutAction = std::move(value); } /** *

The action that occurs when Aurora times out while attempting to change the * capacity of an Aurora Serverless v1 cluster. The value is either * ForceApplyCapacityChange or * RollbackCapacityChange.

* ForceApplyCapacityChange, the default, sets the capacity to the * specified value as soon as possible.

RollbackCapacityChange * ignores the capacity change if a scaling point isn't found in the timeout * period.

*/ inline void SetTimeoutAction(const char* value) { m_timeoutActionHasBeenSet = true; m_timeoutAction.assign(value); } /** *

The action that occurs when Aurora times out while attempting to change the * capacity of an Aurora Serverless v1 cluster. The value is either * ForceApplyCapacityChange or * RollbackCapacityChange.

* ForceApplyCapacityChange, the default, sets the capacity to the * specified value as soon as possible.

RollbackCapacityChange * ignores the capacity change if a scaling point isn't found in the timeout * period.

*/ inline ScalingConfigurationInfo& WithTimeoutAction(const Aws::String& value) { SetTimeoutAction(value); return *this;} /** *

The action that occurs when Aurora times out while attempting to change the * capacity of an Aurora Serverless v1 cluster. The value is either * ForceApplyCapacityChange or * RollbackCapacityChange.

* ForceApplyCapacityChange, the default, sets the capacity to the * specified value as soon as possible.

RollbackCapacityChange * ignores the capacity change if a scaling point isn't found in the timeout * period.

*/ inline ScalingConfigurationInfo& WithTimeoutAction(Aws::String&& value) { SetTimeoutAction(std::move(value)); return *this;} /** *

The action that occurs when Aurora times out while attempting to change the * capacity of an Aurora Serverless v1 cluster. The value is either * ForceApplyCapacityChange or * RollbackCapacityChange.

* ForceApplyCapacityChange, the default, sets the capacity to the * specified value as soon as possible.

RollbackCapacityChange * ignores the capacity change if a scaling point isn't found in the timeout * period.

*/ inline ScalingConfigurationInfo& WithTimeoutAction(const char* value) { SetTimeoutAction(value); return *this;} /** *

The number of seconds before scaling times out. What happens when an * attempted scaling action times out is determined by the * TimeoutAction setting.

*/ inline int GetSecondsBeforeTimeout() const{ return m_secondsBeforeTimeout; } /** *

The number of seconds before scaling times out. What happens when an * attempted scaling action times out is determined by the * TimeoutAction setting.

*/ inline bool SecondsBeforeTimeoutHasBeenSet() const { return m_secondsBeforeTimeoutHasBeenSet; } /** *

The number of seconds before scaling times out. What happens when an * attempted scaling action times out is determined by the * TimeoutAction setting.

*/ inline void SetSecondsBeforeTimeout(int value) { m_secondsBeforeTimeoutHasBeenSet = true; m_secondsBeforeTimeout = value; } /** *

The number of seconds before scaling times out. What happens when an * attempted scaling action times out is determined by the * TimeoutAction setting.

*/ inline ScalingConfigurationInfo& WithSecondsBeforeTimeout(int value) { SetSecondsBeforeTimeout(value); return *this;} private: int m_minCapacity; bool m_minCapacityHasBeenSet = false; int m_maxCapacity; bool m_maxCapacityHasBeenSet = false; bool m_autoPause; bool m_autoPauseHasBeenSet = false; int m_secondsUntilAutoPause; bool m_secondsUntilAutoPauseHasBeenSet = false; Aws::String m_timeoutAction; bool m_timeoutActionHasBeenSet = false; int m_secondsBeforeTimeout; bool m_secondsBeforeTimeoutHasBeenSet = false; }; } // namespace Model } // namespace RDS } // namespace Aws