Class InstanceResizePolicy
- All Implemented Interfaces:
Serializable
,Cloneable
Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Specific list of instances to be protected when shrinking an instance group.Specific list of instances to be terminated when shrinking an instance group.Decommissioning timeout override for the specific list of instances to be terminated.int
hashCode()
void
setInstancesToProtect
(Collection<String> instancesToProtect) Specific list of instances to be protected when shrinking an instance group.void
setInstancesToTerminate
(Collection<String> instancesToTerminate) Specific list of instances to be terminated when shrinking an instance group.void
setInstanceTerminationTimeout
(Integer instanceTerminationTimeout) Decommissioning timeout override for the specific list of instances to be terminated.toString()
Returns a string representation of this object; useful for testing and debugging.withInstancesToProtect
(String... instancesToProtect) Specific list of instances to be protected when shrinking an instance group.withInstancesToProtect
(Collection<String> instancesToProtect) Specific list of instances to be protected when shrinking an instance group.withInstancesToTerminate
(String... instancesToTerminate) Specific list of instances to be terminated when shrinking an instance group.withInstancesToTerminate
(Collection<String> instancesToTerminate) Specific list of instances to be terminated when shrinking an instance group.withInstanceTerminationTimeout
(Integer instanceTerminationTimeout) Decommissioning timeout override for the specific list of instances to be terminated.
-
Constructor Details
-
InstanceResizePolicy
public InstanceResizePolicy()
-
-
Method Details
-
getInstancesToTerminate
Specific list of instances to be terminated when shrinking an instance group.
- Returns:
- Specific list of instances to be terminated when shrinking an instance group.
-
setInstancesToTerminate
Specific list of instances to be terminated when shrinking an instance group.
- Parameters:
instancesToTerminate
- Specific list of instances to be terminated when shrinking an instance group.
-
withInstancesToTerminate
Specific list of instances to be terminated when shrinking an instance group.
NOTE: This method appends the values to the existing list (if any). Use
setInstancesToTerminate(java.util.Collection)
orwithInstancesToTerminate(java.util.Collection)
if you want to override the existing values.- Parameters:
instancesToTerminate
- Specific list of instances to be terminated when shrinking an instance group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withInstancesToTerminate
Specific list of instances to be terminated when shrinking an instance group.
- Parameters:
instancesToTerminate
- Specific list of instances to be terminated when shrinking an instance group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getInstancesToProtect
Specific list of instances to be protected when shrinking an instance group.
- Returns:
- Specific list of instances to be protected when shrinking an instance group.
-
setInstancesToProtect
Specific list of instances to be protected when shrinking an instance group.
- Parameters:
instancesToProtect
- Specific list of instances to be protected when shrinking an instance group.
-
withInstancesToProtect
Specific list of instances to be protected when shrinking an instance group.
NOTE: This method appends the values to the existing list (if any). Use
setInstancesToProtect(java.util.Collection)
orwithInstancesToProtect(java.util.Collection)
if you want to override the existing values.- Parameters:
instancesToProtect
- Specific list of instances to be protected when shrinking an instance group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withInstancesToProtect
Specific list of instances to be protected when shrinking an instance group.
- Parameters:
instancesToProtect
- Specific list of instances to be protected when shrinking an instance group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceTerminationTimeout
Decommissioning timeout override for the specific list of instances to be terminated.
- Parameters:
instanceTerminationTimeout
- Decommissioning timeout override for the specific list of instances to be terminated.
-
getInstanceTerminationTimeout
Decommissioning timeout override for the specific list of instances to be terminated.
- Returns:
- Decommissioning timeout override for the specific list of instances to be terminated.
-
withInstanceTerminationTimeout
Decommissioning timeout override for the specific list of instances to be terminated.
- Parameters:
instanceTerminationTimeout
- Decommissioning timeout override for the specific list of instances to be terminated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-