/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Contains the scaling configuration of an Aurora Serverless DB cluster. For more information, see Using
* Amazon Aurora Serverless in the Amazon Aurora User
* Guide.See Also:
AWS
* API Reference
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.
The time, in seconds, before an Aurora DB cluster in serverless
* mode is paused.
The time, in seconds, before an Aurora DB cluster in serverless
* mode is paused.
The time, in seconds, before an Aurora DB cluster in serverless
* mode is paused.
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 from finding a scaling point might be
* dropped.
For more information, see * Autoscaling for Aurora Serverless 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 from finding a scaling point might be
* dropped.
For more information, see * Autoscaling for Aurora Serverless 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 from finding a scaling point might be
* dropped.
For more information, see * Autoscaling for Aurora Serverless 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 from finding a scaling point might be
* dropped.
For more information, see * Autoscaling for Aurora Serverless 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 from finding a scaling point might be
* dropped.
For more information, see * Autoscaling for Aurora Serverless 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 from finding a scaling point might be
* dropped.
For more information, see * Autoscaling for Aurora Serverless 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 from finding a scaling point might be
* dropped.
For more information, see * Autoscaling for Aurora Serverless 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 from finding a scaling point might be
* dropped.
For more information, see * Autoscaling for Aurora Serverless in the Amazon Aurora User * Guide.
*/ inline ScalingConfiguration& WithTimeoutAction(const char* value) { SetTimeoutAction(value); return *this;} private: int m_minCapacity; bool m_minCapacityHasBeenSet; int m_maxCapacity; bool m_maxCapacityHasBeenSet; bool m_autoPause; bool m_autoPauseHasBeenSet; int m_secondsUntilAutoPause; bool m_secondsUntilAutoPauseHasBeenSet; Aws::String m_timeoutAction; bool m_timeoutActionHasBeenSet; }; } // namespace Model } // namespace RDS } // namespace Aws