Class AutoScalingGroup
- All Implemented Interfaces:
Serializable
,Cloneable
Describes an Auto Scaling group.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The Amazon Resource Name (ARN) of the group.The name of the group.One or more Availability Zones for the group.The date and time the group was created.The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.The desired size of the group.The metrics enabled for the group.The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.The service to use for the health checks.The EC2 instances associated with the group.The name of the associated launch configuration.One or more load balancers associated with the group.The maximum size of the group.The minimum size of the group.Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.The name of the placement group into which you'll launch your instances, if any.The current state of the group when DeleteAutoScalingGroup is in progress.The suspended processes associated with the group.getTags()
The tags for the group.The termination policies for the group.One or more subnet IDs, if applicable, separated by commas.int
hashCode()
Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.void
setAutoScalingGroupARN
(String autoScalingGroupARN) The Amazon Resource Name (ARN) of the group.void
setAutoScalingGroupName
(String autoScalingGroupName) The name of the group.void
setAvailabilityZones
(Collection<String> availabilityZones) One or more Availability Zones for the group.void
setCreatedTime
(Date createdTime) The date and time the group was created.void
setDefaultCooldown
(Integer defaultCooldown) The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.void
setDesiredCapacity
(Integer desiredCapacity) The desired size of the group.void
setEnabledMetrics
(Collection<EnabledMetric> enabledMetrics) The metrics enabled for the group.void
setHealthCheckGracePeriod
(Integer healthCheckGracePeriod) The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.void
setHealthCheckType
(String healthCheckType) The service to use for the health checks.void
setInstances
(Collection<Instance> instances) The EC2 instances associated with the group.void
setLaunchConfigurationName
(String launchConfigurationName) The name of the associated launch configuration.void
setLoadBalancerNames
(Collection<String> loadBalancerNames) One or more load balancers associated with the group.void
setMaxSize
(Integer maxSize) The maximum size of the group.void
setMinSize
(Integer minSize) The minimum size of the group.void
setNewInstancesProtectedFromScaleIn
(Boolean newInstancesProtectedFromScaleIn) Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.void
setPlacementGroup
(String placementGroup) The name of the placement group into which you'll launch your instances, if any.void
The current state of the group when DeleteAutoScalingGroup is in progress.void
setSuspendedProcesses
(Collection<SuspendedProcess> suspendedProcesses) The suspended processes associated with the group.void
setTags
(Collection<TagDescription> tags) The tags for the group.void
setTerminationPolicies
(Collection<String> terminationPolicies) The termination policies for the group.void
setVPCZoneIdentifier
(String vPCZoneIdentifier) One or more subnet IDs, if applicable, separated by commas.toString()
Returns a string representation of this object; useful for testing and debugging.withAutoScalingGroupARN
(String autoScalingGroupARN) The Amazon Resource Name (ARN) of the group.withAutoScalingGroupName
(String autoScalingGroupName) The name of the group.withAvailabilityZones
(String... availabilityZones) One or more Availability Zones for the group.withAvailabilityZones
(Collection<String> availabilityZones) One or more Availability Zones for the group.withCreatedTime
(Date createdTime) The date and time the group was created.withDefaultCooldown
(Integer defaultCooldown) The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.withDesiredCapacity
(Integer desiredCapacity) The desired size of the group.withEnabledMetrics
(EnabledMetric... enabledMetrics) The metrics enabled for the group.withEnabledMetrics
(Collection<EnabledMetric> enabledMetrics) The metrics enabled for the group.withHealthCheckGracePeriod
(Integer healthCheckGracePeriod) The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.withHealthCheckType
(String healthCheckType) The service to use for the health checks.withInstances
(Instance... instances) The EC2 instances associated with the group.withInstances
(Collection<Instance> instances) The EC2 instances associated with the group.withLaunchConfigurationName
(String launchConfigurationName) The name of the associated launch configuration.withLoadBalancerNames
(String... loadBalancerNames) One or more load balancers associated with the group.withLoadBalancerNames
(Collection<String> loadBalancerNames) One or more load balancers associated with the group.withMaxSize
(Integer maxSize) The maximum size of the group.withMinSize
(Integer minSize) The minimum size of the group.withNewInstancesProtectedFromScaleIn
(Boolean newInstancesProtectedFromScaleIn) Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.withPlacementGroup
(String placementGroup) The name of the placement group into which you'll launch your instances, if any.withStatus
(String status) The current state of the group when DeleteAutoScalingGroup is in progress.withSuspendedProcesses
(SuspendedProcess... suspendedProcesses) The suspended processes associated with the group.withSuspendedProcesses
(Collection<SuspendedProcess> suspendedProcesses) The suspended processes associated with the group.withTags
(TagDescription... tags) The tags for the group.withTags
(Collection<TagDescription> tags) The tags for the group.withTerminationPolicies
(String... terminationPolicies) The termination policies for the group.withTerminationPolicies
(Collection<String> terminationPolicies) The termination policies for the group.withVPCZoneIdentifier
(String vPCZoneIdentifier) One or more subnet IDs, if applicable, separated by commas.
-
Constructor Details
-
AutoScalingGroup
public AutoScalingGroup()
-
-
Method Details
-
setAutoScalingGroupName
The name of the group.
- Parameters:
autoScalingGroupName
- The name of the group.
-
getAutoScalingGroupName
The name of the group.
- Returns:
- The name of the group.
-
withAutoScalingGroupName
The name of the group.
- Parameters:
autoScalingGroupName
- The name of the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAutoScalingGroupARN
The Amazon Resource Name (ARN) of the group.
- Parameters:
autoScalingGroupARN
- The Amazon Resource Name (ARN) of the group.
-
getAutoScalingGroupARN
The Amazon Resource Name (ARN) of the group.
- Returns:
- The Amazon Resource Name (ARN) of the group.
-
withAutoScalingGroupARN
The Amazon Resource Name (ARN) of the group.
- Parameters:
autoScalingGroupARN
- The Amazon Resource Name (ARN) of the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLaunchConfigurationName
The name of the associated launch configuration.
- Parameters:
launchConfigurationName
- The name of the associated launch configuration.
-
getLaunchConfigurationName
The name of the associated launch configuration.
- Returns:
- The name of the associated launch configuration.
-
withLaunchConfigurationName
The name of the associated launch configuration.
- Parameters:
launchConfigurationName
- The name of the associated launch configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMinSize
The minimum size of the group.
- Parameters:
minSize
- The minimum size of the group.
-
getMinSize
The minimum size of the group.
- Returns:
- The minimum size of the group.
-
withMinSize
The minimum size of the group.
- Parameters:
minSize
- The minimum size of the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMaxSize
The maximum size of the group.
- Parameters:
maxSize
- The maximum size of the group.
-
getMaxSize
The maximum size of the group.
- Returns:
- The maximum size of the group.
-
withMaxSize
The maximum size of the group.
- Parameters:
maxSize
- The maximum size of the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDesiredCapacity
The desired size of the group.
- Parameters:
desiredCapacity
- The desired size of the group.
-
getDesiredCapacity
The desired size of the group.
- Returns:
- The desired size of the group.
-
withDesiredCapacity
The desired size of the group.
- Parameters:
desiredCapacity
- The desired size of the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDefaultCooldown
The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Parameters:
defaultCooldown
- The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
-
getDefaultCooldown
The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Returns:
- The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
-
withDefaultCooldown
The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.
- Parameters:
defaultCooldown
- The amount of time, in seconds, after a scaling activity completes before another scaling activity can start.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getAvailabilityZones
One or more Availability Zones for the group.
- Returns:
- One or more Availability Zones for the group.
-
setAvailabilityZones
One or more Availability Zones for the group.
- Parameters:
availabilityZones
- One or more Availability Zones for the group.
-
withAvailabilityZones
One or more Availability Zones for the group.
NOTE: This method appends the values to the existing list (if any). Use
setAvailabilityZones(java.util.Collection)
orwithAvailabilityZones(java.util.Collection)
if you want to override the existing values.- Parameters:
availabilityZones
- One or more Availability Zones for the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withAvailabilityZones
One or more Availability Zones for the group.
- Parameters:
availabilityZones
- One or more Availability Zones for the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getLoadBalancerNames
One or more load balancers associated with the group.
- Returns:
- One or more load balancers associated with the group.
-
setLoadBalancerNames
One or more load balancers associated with the group.
- Parameters:
loadBalancerNames
- One or more load balancers associated with the group.
-
withLoadBalancerNames
One or more load balancers associated with the group.
NOTE: This method appends the values to the existing list (if any). Use
setLoadBalancerNames(java.util.Collection)
orwithLoadBalancerNames(java.util.Collection)
if you want to override the existing values.- Parameters:
loadBalancerNames
- One or more load balancers associated with the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withLoadBalancerNames
One or more load balancers associated with the group.
- Parameters:
loadBalancerNames
- One or more load balancers associated with the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setHealthCheckType
The service to use for the health checks. The valid values are
EC2
andELB
.- Parameters:
healthCheckType
- The service to use for the health checks. The valid values areEC2
andELB
.
-
getHealthCheckType
The service to use for the health checks. The valid values are
EC2
andELB
.- Returns:
- The service to use for the health checks. The valid values are
EC2
andELB
.
-
withHealthCheckType
The service to use for the health checks. The valid values are
EC2
andELB
.- Parameters:
healthCheckType
- The service to use for the health checks. The valid values areEC2
andELB
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setHealthCheckGracePeriod
The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.
- Parameters:
healthCheckGracePeriod
- The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.
-
getHealthCheckGracePeriod
The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.
- Returns:
- The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.
-
withHealthCheckGracePeriod
The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.
- Parameters:
healthCheckGracePeriod
- The amount of time, in seconds, that Auto Scaling waits before checking the health status of an EC2 instance that has come into service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getInstances
The EC2 instances associated with the group.
- Returns:
- The EC2 instances associated with the group.
-
setInstances
The EC2 instances associated with the group.
- Parameters:
instances
- The EC2 instances associated with the group.
-
withInstances
The EC2 instances associated with the group.
NOTE: This method appends the values to the existing list (if any). Use
setInstances(java.util.Collection)
orwithInstances(java.util.Collection)
if you want to override the existing values.- Parameters:
instances
- The EC2 instances associated with the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withInstances
The EC2 instances associated with the group.
- Parameters:
instances
- The EC2 instances associated with the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreatedTime
The date and time the group was created.
- Parameters:
createdTime
- The date and time the group was created.
-
getCreatedTime
The date and time the group was created.
- Returns:
- The date and time the group was created.
-
withCreatedTime
The date and time the group was created.
- Parameters:
createdTime
- The date and time the group was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getSuspendedProcesses
The suspended processes associated with the group.
- Returns:
- The suspended processes associated with the group.
-
setSuspendedProcesses
The suspended processes associated with the group.
- Parameters:
suspendedProcesses
- The suspended processes associated with the group.
-
withSuspendedProcesses
The suspended processes associated with the group.
NOTE: This method appends the values to the existing list (if any). Use
setSuspendedProcesses(java.util.Collection)
orwithSuspendedProcesses(java.util.Collection)
if you want to override the existing values.- Parameters:
suspendedProcesses
- The suspended processes associated with the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSuspendedProcesses
The suspended processes associated with the group.
- Parameters:
suspendedProcesses
- The suspended processes associated with the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPlacementGroup
The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
placementGroup
- The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups in the Amazon Elastic Compute Cloud User Guide.
-
getPlacementGroup
The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups in the Amazon Elastic Compute Cloud User Guide.
- Returns:
- The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups in the Amazon Elastic Compute Cloud User Guide.
-
withPlacementGroup
The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
placementGroup
- The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups in the Amazon Elastic Compute Cloud User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVPCZoneIdentifier
One or more subnet IDs, if applicable, separated by commas.
If you specify
VPCZoneIdentifier
andAvailabilityZones
, ensure that the Availability Zones of the subnets match the values forAvailabilityZones
.- Parameters:
vPCZoneIdentifier
- One or more subnet IDs, if applicable, separated by commas.If you specify
VPCZoneIdentifier
andAvailabilityZones
, ensure that the Availability Zones of the subnets match the values forAvailabilityZones
.
-
getVPCZoneIdentifier
One or more subnet IDs, if applicable, separated by commas.
If you specify
VPCZoneIdentifier
andAvailabilityZones
, ensure that the Availability Zones of the subnets match the values forAvailabilityZones
.- Returns:
- One or more subnet IDs, if applicable, separated by commas.
If you specify
VPCZoneIdentifier
andAvailabilityZones
, ensure that the Availability Zones of the subnets match the values forAvailabilityZones
.
-
withVPCZoneIdentifier
One or more subnet IDs, if applicable, separated by commas.
If you specify
VPCZoneIdentifier
andAvailabilityZones
, ensure that the Availability Zones of the subnets match the values forAvailabilityZones
.- Parameters:
vPCZoneIdentifier
- One or more subnet IDs, if applicable, separated by commas.If you specify
VPCZoneIdentifier
andAvailabilityZones
, ensure that the Availability Zones of the subnets match the values forAvailabilityZones
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getEnabledMetrics
The metrics enabled for the group.
- Returns:
- The metrics enabled for the group.
-
setEnabledMetrics
The metrics enabled for the group.
- Parameters:
enabledMetrics
- The metrics enabled for the group.
-
withEnabledMetrics
The metrics enabled for the group.
NOTE: This method appends the values to the existing list (if any). Use
setEnabledMetrics(java.util.Collection)
orwithEnabledMetrics(java.util.Collection)
if you want to override the existing values.- Parameters:
enabledMetrics
- The metrics enabled for the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withEnabledMetrics
The metrics enabled for the group.
- Parameters:
enabledMetrics
- The metrics enabled for the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatus
The current state of the group when DeleteAutoScalingGroup is in progress.
- Parameters:
status
- The current state of the group when DeleteAutoScalingGroup is in progress.
-
getStatus
The current state of the group when DeleteAutoScalingGroup is in progress.
- Returns:
- The current state of the group when DeleteAutoScalingGroup is in progress.
-
withStatus
The current state of the group when DeleteAutoScalingGroup is in progress.
- Parameters:
status
- The current state of the group when DeleteAutoScalingGroup is in progress.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getTags
The tags for the group.
- Returns:
- The tags for the group.
-
setTags
The tags for the group.
- Parameters:
tags
- The tags for the group.
-
withTags
The tags for the group.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection)
orwithTags(java.util.Collection)
if you want to override the existing values.- Parameters:
tags
- The tags for the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withTags
The tags for the group.
- Parameters:
tags
- The tags for the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getTerminationPolicies
The termination policies for the group.
- Returns:
- The termination policies for the group.
-
setTerminationPolicies
The termination policies for the group.
- Parameters:
terminationPolicies
- The termination policies for the group.
-
withTerminationPolicies
The termination policies for the group.
NOTE: This method appends the values to the existing list (if any). Use
setTerminationPolicies(java.util.Collection)
orwithTerminationPolicies(java.util.Collection)
if you want to override the existing values.- Parameters:
terminationPolicies
- The termination policies for the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withTerminationPolicies
The termination policies for the group.
- Parameters:
terminationPolicies
- The termination policies for the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setNewInstancesProtectedFromScaleIn
Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.
- Parameters:
newInstancesProtectedFromScaleIn
- Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.
-
getNewInstancesProtectedFromScaleIn
Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.
- Returns:
- Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.
-
withNewInstancesProtectedFromScaleIn
public AutoScalingGroup withNewInstancesProtectedFromScaleIn(Boolean newInstancesProtectedFromScaleIn) Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.
- Parameters:
newInstancesProtectedFromScaleIn
- Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isNewInstancesProtectedFromScaleIn
Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.
- Returns:
- Indicates whether newly launched instances are protected from termination by Auto Scaling when scaling in.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-