All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.rds.model.ScalingConfiguration Maven / Gradle / Ivy

/*
 * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.rds.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* 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 AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ScalingConfiguration implements Serializable, Cloneable { /** *

* 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. *

*/ private Integer minCapacity; /** *

* 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. *

*/ private Integer maxCapacity; /** *

* 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. *

*
*/ private Boolean autoPause; /** *

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

*/ private Integer secondsUntilAutoPause; /** *

* 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. *

*/ private String timeoutAction; /** *

* 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. *

* * @param 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. */ public void setMinCapacity(Integer minCapacity) { this.minCapacity = 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. *

* * @return 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. */ public Integer getMinCapacity() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public ScalingConfiguration withMinCapacity(Integer minCapacity) { setMinCapacity(minCapacity); 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. *

* * @param 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. */ public void setMaxCapacity(Integer maxCapacity) { this.maxCapacity = 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. *

* * @return 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. */ public Integer getMaxCapacity() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public ScalingConfiguration withMaxCapacity(Integer maxCapacity) { setMaxCapacity(maxCapacity); 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. *

*
* * @param 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. *

*/ public void setAutoPause(Boolean autoPause) { this.autoPause = 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. *

*
* * @return 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. *

*/ public Boolean getAutoPause() { return this.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. *

*
* * @param 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public ScalingConfiguration withAutoPause(Boolean autoPause) { setAutoPause(autoPause); 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. *

*
* * @return 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. *

*/ public Boolean isAutoPause() { return this.autoPause; } /** *

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

* * @param secondsUntilAutoPause * The time, in seconds, before an Aurora DB cluster in serverless mode is paused. */ public void setSecondsUntilAutoPause(Integer secondsUntilAutoPause) { this.secondsUntilAutoPause = secondsUntilAutoPause; } /** *

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

* * @return The time, in seconds, before an Aurora DB cluster in serverless mode is paused. */ public Integer getSecondsUntilAutoPause() { return this.secondsUntilAutoPause; } /** *

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

* * @param secondsUntilAutoPause * The time, in seconds, before an Aurora DB cluster in serverless mode is paused. * @return Returns a reference to this object so that method calls can be chained together. */ public ScalingConfiguration withSecondsUntilAutoPause(Integer secondsUntilAutoPause) { setSecondsUntilAutoPause(secondsUntilAutoPause); 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. *

* * @param 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. */ public void setTimeoutAction(String timeoutAction) { this.timeoutAction = 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. *

* * @return 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. */ public String getTimeoutAction() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public ScalingConfiguration withTimeoutAction(String timeoutAction) { setTimeoutAction(timeoutAction); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getMinCapacity() != null) sb.append("MinCapacity: ").append(getMinCapacity()).append(","); if (getMaxCapacity() != null) sb.append("MaxCapacity: ").append(getMaxCapacity()).append(","); if (getAutoPause() != null) sb.append("AutoPause: ").append(getAutoPause()).append(","); if (getSecondsUntilAutoPause() != null) sb.append("SecondsUntilAutoPause: ").append(getSecondsUntilAutoPause()).append(","); if (getTimeoutAction() != null) sb.append("TimeoutAction: ").append(getTimeoutAction()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ScalingConfiguration == false) return false; ScalingConfiguration other = (ScalingConfiguration) obj; if (other.getMinCapacity() == null ^ this.getMinCapacity() == null) return false; if (other.getMinCapacity() != null && other.getMinCapacity().equals(this.getMinCapacity()) == false) return false; if (other.getMaxCapacity() == null ^ this.getMaxCapacity() == null) return false; if (other.getMaxCapacity() != null && other.getMaxCapacity().equals(this.getMaxCapacity()) == false) return false; if (other.getAutoPause() == null ^ this.getAutoPause() == null) return false; if (other.getAutoPause() != null && other.getAutoPause().equals(this.getAutoPause()) == false) return false; if (other.getSecondsUntilAutoPause() == null ^ this.getSecondsUntilAutoPause() == null) return false; if (other.getSecondsUntilAutoPause() != null && other.getSecondsUntilAutoPause().equals(this.getSecondsUntilAutoPause()) == false) return false; if (other.getTimeoutAction() == null ^ this.getTimeoutAction() == null) return false; if (other.getTimeoutAction() != null && other.getTimeoutAction().equals(this.getTimeoutAction()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMinCapacity() == null) ? 0 : getMinCapacity().hashCode()); hashCode = prime * hashCode + ((getMaxCapacity() == null) ? 0 : getMaxCapacity().hashCode()); hashCode = prime * hashCode + ((getAutoPause() == null) ? 0 : getAutoPause().hashCode()); hashCode = prime * hashCode + ((getSecondsUntilAutoPause() == null) ? 0 : getSecondsUntilAutoPause().hashCode()); hashCode = prime * hashCode + ((getTimeoutAction() == null) ? 0 : getTimeoutAction().hashCode()); return hashCode; } @Override public ScalingConfiguration clone() { try { return (ScalingConfiguration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy