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

com.amazonaws.services.ecs.model.ManagedScaling Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * 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.ecs.model;

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

/**
 * 

* The managed scaling settings for the Auto Scaling group capacity provider. *

*

* When managed scaling is enabled, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. * Amazon ECS manages a target tracking scaling policy using an Amazon ECS-managed CloudWatch metric with the specified * targetCapacity value as the target value for the metric. For more information, see Using Managed Scaling in the Amazon Elastic Container Service Developer Guide. *

*

* If managed scaling is disabled, the user must manage the scaling of the Auto Scaling group. *

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

* Whether or not to enable managed scaling for the capacity provider. *

*/ private String status; /** *

* The target capacity value for the capacity provider. The specified value must be greater than 0 and * less than or equal to 100. A value of 100 will result in the Amazon EC2 instances in * your Auto Scaling group being completely utilized. *

*/ private Integer targetCapacity; /** *

* The minimum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 1 is used. *

*/ private Integer minimumScalingStepSize; /** *

* The maximum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 10000 is used. *

*/ private Integer maximumScalingStepSize; /** *

* Whether or not to enable managed scaling for the capacity provider. *

* * @param status * Whether or not to enable managed scaling for the capacity provider. * @see ManagedScalingStatus */ public void setStatus(String status) { this.status = status; } /** *

* Whether or not to enable managed scaling for the capacity provider. *

* * @return Whether or not to enable managed scaling for the capacity provider. * @see ManagedScalingStatus */ public String getStatus() { return this.status; } /** *

* Whether or not to enable managed scaling for the capacity provider. *

* * @param status * Whether or not to enable managed scaling for the capacity provider. * @return Returns a reference to this object so that method calls can be chained together. * @see ManagedScalingStatus */ public ManagedScaling withStatus(String status) { setStatus(status); return this; } /** *

* Whether or not to enable managed scaling for the capacity provider. *

* * @param status * Whether or not to enable managed scaling for the capacity provider. * @return Returns a reference to this object so that method calls can be chained together. * @see ManagedScalingStatus */ public ManagedScaling withStatus(ManagedScalingStatus status) { this.status = status.toString(); return this; } /** *

* The target capacity value for the capacity provider. The specified value must be greater than 0 and * less than or equal to 100. A value of 100 will result in the Amazon EC2 instances in * your Auto Scaling group being completely utilized. *

* * @param targetCapacity * The target capacity value for the capacity provider. The specified value must be greater than * 0 and less than or equal to 100. A value of 100 will result in the * Amazon EC2 instances in your Auto Scaling group being completely utilized. */ public void setTargetCapacity(Integer targetCapacity) { this.targetCapacity = targetCapacity; } /** *

* The target capacity value for the capacity provider. The specified value must be greater than 0 and * less than or equal to 100. A value of 100 will result in the Amazon EC2 instances in * your Auto Scaling group being completely utilized. *

* * @return The target capacity value for the capacity provider. The specified value must be greater than * 0 and less than or equal to 100. A value of 100 will result in the * Amazon EC2 instances in your Auto Scaling group being completely utilized. */ public Integer getTargetCapacity() { return this.targetCapacity; } /** *

* The target capacity value for the capacity provider. The specified value must be greater than 0 and * less than or equal to 100. A value of 100 will result in the Amazon EC2 instances in * your Auto Scaling group being completely utilized. *

* * @param targetCapacity * The target capacity value for the capacity provider. The specified value must be greater than * 0 and less than or equal to 100. A value of 100 will result in the * Amazon EC2 instances in your Auto Scaling group being completely utilized. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedScaling withTargetCapacity(Integer targetCapacity) { setTargetCapacity(targetCapacity); return this; } /** *

* The minimum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 1 is used. *

* * @param minimumScalingStepSize * The minimum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 1 is used. */ public void setMinimumScalingStepSize(Integer minimumScalingStepSize) { this.minimumScalingStepSize = minimumScalingStepSize; } /** *

* The minimum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 1 is used. *

* * @return The minimum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 1 is used. */ public Integer getMinimumScalingStepSize() { return this.minimumScalingStepSize; } /** *

* The minimum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 1 is used. *

* * @param minimumScalingStepSize * The minimum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 1 is used. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedScaling withMinimumScalingStepSize(Integer minimumScalingStepSize) { setMinimumScalingStepSize(minimumScalingStepSize); return this; } /** *

* The maximum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 10000 is used. *

* * @param maximumScalingStepSize * The maximum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 10000 is used. */ public void setMaximumScalingStepSize(Integer maximumScalingStepSize) { this.maximumScalingStepSize = maximumScalingStepSize; } /** *

* The maximum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 10000 is used. *

* * @return The maximum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 10000 is used. */ public Integer getMaximumScalingStepSize() { return this.maximumScalingStepSize; } /** *

* The maximum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 10000 is used. *

* * @param maximumScalingStepSize * The maximum number of container instances that Amazon ECS will scale in or scale out at one time. If this * parameter is omitted, the default value of 10000 is used. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedScaling withMaximumScalingStepSize(Integer maximumScalingStepSize) { setMaximumScalingStepSize(maximumScalingStepSize); 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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getTargetCapacity() != null) sb.append("TargetCapacity: ").append(getTargetCapacity()).append(","); if (getMinimumScalingStepSize() != null) sb.append("MinimumScalingStepSize: ").append(getMinimumScalingStepSize()).append(","); if (getMaximumScalingStepSize() != null) sb.append("MaximumScalingStepSize: ").append(getMaximumScalingStepSize()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ManagedScaling == false) return false; ManagedScaling other = (ManagedScaling) obj; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getTargetCapacity() == null ^ this.getTargetCapacity() == null) return false; if (other.getTargetCapacity() != null && other.getTargetCapacity().equals(this.getTargetCapacity()) == false) return false; if (other.getMinimumScalingStepSize() == null ^ this.getMinimumScalingStepSize() == null) return false; if (other.getMinimumScalingStepSize() != null && other.getMinimumScalingStepSize().equals(this.getMinimumScalingStepSize()) == false) return false; if (other.getMaximumScalingStepSize() == null ^ this.getMaximumScalingStepSize() == null) return false; if (other.getMaximumScalingStepSize() != null && other.getMaximumScalingStepSize().equals(this.getMaximumScalingStepSize()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getTargetCapacity() == null) ? 0 : getTargetCapacity().hashCode()); hashCode = prime * hashCode + ((getMinimumScalingStepSize() == null) ? 0 : getMinimumScalingStepSize().hashCode()); hashCode = prime * hashCode + ((getMaximumScalingStepSize() == null) ? 0 : getMaximumScalingStepSize().hashCode()); return hashCode; } @Override public ManagedScaling clone() { try { return (ManagedScaling) 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.ecs.model.transform.ManagedScalingMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy