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

com.amazonaws.services.keyspaces.model.AutoScalingSettings Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Keyspaces module holds the client classes that are used for communicating with Amazon Keyspaces Service

The newest version!
/*
 * Copyright 2019-2024 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.keyspaces.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The optional auto scaling settings for a table with provisioned throughput capacity. *

*

* To turn on auto scaling for a table in throughputMode:PROVISIONED, you must specify the following * parameters. *

*

* Configure the minimum and maximum capacity units. The auto scaling policy ensures that capacity never goes below the * minimum or above the maximum range. *

*
    *
  • *

    * minimumUnits: The minimum level of throughput the table should always be ready to support. The value * must be between 1 and the max throughput per second quota for your account (40,000 by default). *

    *
  • *
  • *

    * maximumUnits: The maximum level of throughput the table should always be ready to support. The value * must be between 1 and the max throughput per second quota for your account (40,000 by default). *

    *
  • *
  • *

    * scalingPolicy: Amazon Keyspaces supports the target tracking scaling policy. The auto * scaling target is the provisioned capacity of the table. *

    *
      *
    • *

      * targetTrackingScalingPolicyConfiguration: To define the target tracking policy, you must define the * target value. *

      *
        *
      • *

        * targetValue: The target utilization rate of the table. Amazon Keyspaces auto scaling ensures that the * ratio of consumed capacity to provisioned capacity stays at or near this value. You define targetValue * as a percentage. A double between 20 and 90. (Required) *

        *
      • *
      • *

        * disableScaleIn: A boolean that specifies if scale-in is disabled or enabled * for the table. This parameter is disabled by default. To turn on scale-in, set the boolean * value to FALSE. This means that capacity for a table can be automatically scaled down on your behalf. * (Optional) *

        *
      • *
      • *

        * scaleInCooldown: A cooldown period in seconds between scaling activities that lets the table stabilize * before another scale in activity starts. If no value is provided, the default is 0. (Optional) *

        *
      • *
      • *

        * scaleOutCooldown: A cooldown period in seconds between scaling activities that lets the table stabilize * before another scale out activity starts. If no value is provided, the default is 0. (Optional) *

        *
      • *
      *
    • *
    *
  • *
*

* For more information, see Managing * throughput capacity automatically with Amazon Keyspaces auto scaling in the Amazon Keyspaces Developer * Guide. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AutoScalingSettings implements Serializable, Cloneable, StructuredPojo { /** *

* This optional parameter enables auto scaling for the table if set to false. *

*/ private Boolean autoScalingDisabled; /** *

* The minimum level of throughput the table should always be ready to support. The value must be between 1 and the * max throughput per second quota for your account (40,000 by default). *

*/ private Long minimumUnits; /** *

* Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and the max * throughput per second quota for your account (40,000 by default). *

*/ private Long maximumUnits; /** *

* Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon * Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the * target value that you specify. You define the target value as a percentage between 20 and 90. *

*/ private AutoScalingPolicy scalingPolicy; /** *

* This optional parameter enables auto scaling for the table if set to false. *

* * @param autoScalingDisabled * This optional parameter enables auto scaling for the table if set to false. */ public void setAutoScalingDisabled(Boolean autoScalingDisabled) { this.autoScalingDisabled = autoScalingDisabled; } /** *

* This optional parameter enables auto scaling for the table if set to false. *

* * @return This optional parameter enables auto scaling for the table if set to false. */ public Boolean getAutoScalingDisabled() { return this.autoScalingDisabled; } /** *

* This optional parameter enables auto scaling for the table if set to false. *

* * @param autoScalingDisabled * This optional parameter enables auto scaling for the table if set to false. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingSettings withAutoScalingDisabled(Boolean autoScalingDisabled) { setAutoScalingDisabled(autoScalingDisabled); return this; } /** *

* This optional parameter enables auto scaling for the table if set to false. *

* * @return This optional parameter enables auto scaling for the table if set to false. */ public Boolean isAutoScalingDisabled() { return this.autoScalingDisabled; } /** *

* The minimum level of throughput the table should always be ready to support. The value must be between 1 and the * max throughput per second quota for your account (40,000 by default). *

* * @param minimumUnits * The minimum level of throughput the table should always be ready to support. The value must be between 1 * and the max throughput per second quota for your account (40,000 by default). */ public void setMinimumUnits(Long minimumUnits) { this.minimumUnits = minimumUnits; } /** *

* The minimum level of throughput the table should always be ready to support. The value must be between 1 and the * max throughput per second quota for your account (40,000 by default). *

* * @return The minimum level of throughput the table should always be ready to support. The value must be between 1 * and the max throughput per second quota for your account (40,000 by default). */ public Long getMinimumUnits() { return this.minimumUnits; } /** *

* The minimum level of throughput the table should always be ready to support. The value must be between 1 and the * max throughput per second quota for your account (40,000 by default). *

* * @param minimumUnits * The minimum level of throughput the table should always be ready to support. The value must be between 1 * and the max throughput per second quota for your account (40,000 by default). * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingSettings withMinimumUnits(Long minimumUnits) { setMinimumUnits(minimumUnits); return this; } /** *

* Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and the max * throughput per second quota for your account (40,000 by default). *

* * @param maximumUnits * Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and * the max throughput per second quota for your account (40,000 by default). */ public void setMaximumUnits(Long maximumUnits) { this.maximumUnits = maximumUnits; } /** *

* Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and the max * throughput per second quota for your account (40,000 by default). *

* * @return Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and * the max throughput per second quota for your account (40,000 by default). */ public Long getMaximumUnits() { return this.maximumUnits; } /** *

* Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and the max * throughput per second quota for your account (40,000 by default). *

* * @param maximumUnits * Manage costs by specifying the maximum amount of throughput to provision. The value must be between 1 and * the max throughput per second quota for your account (40,000 by default). * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingSettings withMaximumUnits(Long maximumUnits) { setMaximumUnits(maximumUnits); return this; } /** *

* Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon * Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the * target value that you specify. You define the target value as a percentage between 20 and 90. *

* * @param scalingPolicy * Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon * Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near * the target value that you specify. You define the target value as a percentage between 20 and 90. */ public void setScalingPolicy(AutoScalingPolicy scalingPolicy) { this.scalingPolicy = scalingPolicy; } /** *

* Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon * Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the * target value that you specify. You define the target value as a percentage between 20 and 90. *

* * @return Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon * Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or * near the target value that you specify. You define the target value as a percentage between 20 and 90. */ public AutoScalingPolicy getScalingPolicy() { return this.scalingPolicy; } /** *

* Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon * Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near the * target value that you specify. You define the target value as a percentage between 20 and 90. *

* * @param scalingPolicy * Amazon Keyspaces supports the target tracking auto scaling policy. With this policy, Amazon * Keyspaces auto scaling ensures that the table's ratio of consumed to provisioned capacity stays at or near * the target value that you specify. You define the target value as a percentage between 20 and 90. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingSettings withScalingPolicy(AutoScalingPolicy scalingPolicy) { setScalingPolicy(scalingPolicy); 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 (getAutoScalingDisabled() != null) sb.append("AutoScalingDisabled: ").append(getAutoScalingDisabled()).append(","); if (getMinimumUnits() != null) sb.append("MinimumUnits: ").append(getMinimumUnits()).append(","); if (getMaximumUnits() != null) sb.append("MaximumUnits: ").append(getMaximumUnits()).append(","); if (getScalingPolicy() != null) sb.append("ScalingPolicy: ").append(getScalingPolicy()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AutoScalingSettings == false) return false; AutoScalingSettings other = (AutoScalingSettings) obj; if (other.getAutoScalingDisabled() == null ^ this.getAutoScalingDisabled() == null) return false; if (other.getAutoScalingDisabled() != null && other.getAutoScalingDisabled().equals(this.getAutoScalingDisabled()) == false) return false; if (other.getMinimumUnits() == null ^ this.getMinimumUnits() == null) return false; if (other.getMinimumUnits() != null && other.getMinimumUnits().equals(this.getMinimumUnits()) == false) return false; if (other.getMaximumUnits() == null ^ this.getMaximumUnits() == null) return false; if (other.getMaximumUnits() != null && other.getMaximumUnits().equals(this.getMaximumUnits()) == false) return false; if (other.getScalingPolicy() == null ^ this.getScalingPolicy() == null) return false; if (other.getScalingPolicy() != null && other.getScalingPolicy().equals(this.getScalingPolicy()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingDisabled() == null) ? 0 : getAutoScalingDisabled().hashCode()); hashCode = prime * hashCode + ((getMinimumUnits() == null) ? 0 : getMinimumUnits().hashCode()); hashCode = prime * hashCode + ((getMaximumUnits() == null) ? 0 : getMaximumUnits().hashCode()); hashCode = prime * hashCode + ((getScalingPolicy() == null) ? 0 : getScalingPolicy().hashCode()); return hashCode; } @Override public AutoScalingSettings clone() { try { return (AutoScalingSettings) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.keyspaces.model.transform.AutoScalingSettingsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy