/** * 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 { /** *

Contains the scaling configuration of an Aurora Serverless v1 DB cluster.

*

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

See Also:

AWS * API Reference

*/ class ScalingConfiguration { public: AWS_RDS_API ScalingConfiguration(); AWS_RDS_API ScalingConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_RDS_API ScalingConfiguration& 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.

For Aurora MySQL, valid capacity values are 1, * 2, 4, 8, 16, * 32, 64, 128, and 256.

*

For Aurora PostgreSQL, valid capacity values are 2, * 4, 8, 16, 32, * 64, 192, and 384.

The minimum * capacity must be less than or equal to the maximum capacity.

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

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

For Aurora MySQL, valid capacity values are 1, * 2, 4, 8, 16, * 32, 64, 128, and 256.

*

For Aurora PostgreSQL, valid capacity values are 2, * 4, 8, 16, 32, * 64, 192, and 384.

The minimum * capacity must be less than or equal to the maximum capacity.

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

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

For Aurora MySQL, valid capacity values are 1, * 2, 4, 8, 16, * 32, 64, 128, and 256.

*

For Aurora PostgreSQL, valid capacity values are 2, * 4, 8, 16, 32, * 64, 192, and 384.

The minimum * capacity must be less than or equal to the maximum capacity.

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

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

For Aurora MySQL, valid capacity values are 1, * 2, 4, 8, 16, * 32, 64, 128, and 256.

*

For Aurora PostgreSQL, valid capacity values are 2, * 4, 8, 16, 32, * 64, 192, and 384.

The minimum * capacity must be less than or equal to the maximum capacity.

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

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

For Aurora MySQL, valid capacity values are 1, * 2, 4, 8, 16, * 32, 64, 128, and 256.

*

For Aurora PostgreSQL, valid capacity values are 2, * 4, 8, 16, 32, * 64, 192, and 384.

The maximum * capacity must be greater than or equal to the minimum capacity.

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

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

For Aurora MySQL, valid capacity values are 1, * 2, 4, 8, 16, * 32, 64, 128, and 256.

*

For Aurora PostgreSQL, valid capacity values are 2, * 4, 8, 16, 32, * 64, 192, and 384.

The maximum * capacity must be greater than or equal to the minimum capacity.

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

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

For Aurora MySQL, valid capacity values are 1, * 2, 4, 8, 16, * 32, 64, 128, and 256.

*

For Aurora PostgreSQL, valid capacity values are 2, * 4, 8, 16, 32, * 64, 192, and 384.

The maximum * capacity must be greater than or equal to the minimum capacity.

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

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

For Aurora MySQL, valid capacity values are 1, * 2, 4, 8, 16, * 32, 64, 128, and 256.

*

For Aurora PostgreSQL, valid capacity values are 2, * 4, 8, 16, 32, * 64, 192, and 384.

The maximum * capacity must be greater than or equal to the minimum capacity.

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

A value that indicates whether to allow or disallow automatic pause for an * Aurora DB cluster in serverless DB engine mode. A DB cluster can be * paused only when it's idle (it has no connections).

If a DB * cluster is paused for more than seven days, the DB cluster might be backed up * with a snapshot. In this case, the DB cluster is restored when there is a * request to connect to it.

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

A value that indicates whether to allow or disallow automatic pause for an * Aurora DB cluster in serverless DB engine mode. A DB cluster can be * paused only when it's idle (it has no connections).

If a DB * cluster is paused for more than seven days, the DB cluster might be backed up * with a snapshot. In this case, the DB cluster is restored when there is a * request to connect to it.

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

A value that indicates whether to allow or disallow automatic pause for an * Aurora DB cluster in serverless DB engine mode. A DB cluster can be * paused only when it's idle (it has no connections).

If a DB * cluster is paused for more than seven days, the DB cluster might be backed up * with a snapshot. In this case, the DB cluster is restored when there is a * request to connect to it.

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

A value that indicates whether to allow or disallow automatic pause for an * Aurora DB cluster in serverless DB engine mode. A DB cluster can be * paused only when it's idle (it has no connections).

If a DB * cluster is paused for more than seven days, the DB cluster might be backed up * with a snapshot. In this case, the DB cluster is restored when there is a * request to connect to it.

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

The time, in seconds, before an Aurora DB cluster in serverless * mode is paused.

Specify a value between 300 and 86,400 seconds.

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

The time, in seconds, before an Aurora DB cluster in serverless * mode is paused.

Specify a value between 300 and 86,400 seconds.

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

The time, in seconds, before an Aurora DB cluster in serverless * mode is paused.

Specify a value between 300 and 86,400 seconds.

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

The time, in seconds, before an Aurora DB cluster in serverless * mode is paused.

Specify a value between 300 and 86,400 seconds.

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

The action to take when the timeout is reached, either * ForceApplyCapacityChange or * RollbackCapacityChange.

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

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

If you specify ForceApplyCapacityChange, * connections that prevent Aurora Serverless v1 from finding a scaling point might * be dropped.

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

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

The action to take when the timeout is reached, either * ForceApplyCapacityChange or * RollbackCapacityChange.

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

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

If you specify ForceApplyCapacityChange, * connections that prevent Aurora Serverless v1 from finding a scaling point might * be dropped.

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

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

The action to take when the timeout is reached, either * ForceApplyCapacityChange or * RollbackCapacityChange.

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

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

If you specify ForceApplyCapacityChange, * connections that prevent Aurora Serverless v1 from finding a scaling point might * be dropped.

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

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

The action to take when the timeout is reached, either * ForceApplyCapacityChange or * RollbackCapacityChange.

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

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

If you specify ForceApplyCapacityChange, * connections that prevent Aurora Serverless v1 from finding a scaling point might * be dropped.

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

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

The action to take when the timeout is reached, either * ForceApplyCapacityChange or * RollbackCapacityChange.

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

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

If you specify ForceApplyCapacityChange, * connections that prevent Aurora Serverless v1 from finding a scaling point might * be dropped.

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

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

The action to take when the timeout is reached, either * ForceApplyCapacityChange or * RollbackCapacityChange.

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

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

If you specify ForceApplyCapacityChange, * connections that prevent Aurora Serverless v1 from finding a scaling point might * be dropped.

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

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

The action to take when the timeout is reached, either * ForceApplyCapacityChange or * RollbackCapacityChange.

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

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

If you specify ForceApplyCapacityChange, * connections that prevent Aurora Serverless v1 from finding a scaling point might * be dropped.

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

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

The action to take when the timeout is reached, either * ForceApplyCapacityChange or * RollbackCapacityChange.

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

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

If you specify ForceApplyCapacityChange, * connections that prevent Aurora Serverless v1 from finding a scaling point might * be dropped.

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

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

The amount of time, in seconds, that Aurora Serverless v1 tries to find a * scaling point to perform seamless scaling before enforcing the timeout action. * The default is 300.

Specify a value between 60 and 600 seconds.

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

The amount of time, in seconds, that Aurora Serverless v1 tries to find a * scaling point to perform seamless scaling before enforcing the timeout action. * The default is 300.

Specify a value between 60 and 600 seconds.

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

The amount of time, in seconds, that Aurora Serverless v1 tries to find a * scaling point to perform seamless scaling before enforcing the timeout action. * The default is 300.

Specify a value between 60 and 600 seconds.

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

The amount of time, in seconds, that Aurora Serverless v1 tries to find a * scaling point to perform seamless scaling before enforcing the timeout action. * The default is 300.

Specify a value between 60 and 600 seconds.

*/ inline ScalingConfiguration& 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