Class AutoScalingGroup

java.lang.Object
com.amazonaws.services.autoscaling.model.AutoScalingGroup
All Implemented Interfaces:
Serializable, Cloneable

public class AutoScalingGroup extends Object implements Serializable, Cloneable

Describes an Auto Scaling group.

See Also:
  • Constructor Details

    • AutoScalingGroup

      public AutoScalingGroup()
  • Method Details

    • setAutoScalingGroupName

      public void setAutoScalingGroupName(String autoScalingGroupName)

      The name of the group.

      Parameters:
      autoScalingGroupName - The name of the group.
    • getAutoScalingGroupName

      public String getAutoScalingGroupName()

      The name of the group.

      Returns:
      The name of the group.
    • withAutoScalingGroupName

      public AutoScalingGroup withAutoScalingGroupName(String autoScalingGroupName)

      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

      public void setAutoScalingGroupARN(String autoScalingGroupARN)

      The Amazon Resource Name (ARN) of the group.

      Parameters:
      autoScalingGroupARN - The Amazon Resource Name (ARN) of the group.
    • getAutoScalingGroupARN

      public String getAutoScalingGroupARN()

      The Amazon Resource Name (ARN) of the group.

      Returns:
      The Amazon Resource Name (ARN) of the group.
    • withAutoScalingGroupARN

      public AutoScalingGroup withAutoScalingGroupARN(String autoScalingGroupARN)

      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

      public void setLaunchConfigurationName(String launchConfigurationName)

      The name of the associated launch configuration.

      Parameters:
      launchConfigurationName - The name of the associated launch configuration.
    • getLaunchConfigurationName

      public String getLaunchConfigurationName()

      The name of the associated launch configuration.

      Returns:
      The name of the associated launch configuration.
    • withLaunchConfigurationName

      public AutoScalingGroup withLaunchConfigurationName(String launchConfigurationName)

      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

      public void setMinSize(Integer minSize)

      The minimum size of the group.

      Parameters:
      minSize - The minimum size of the group.
    • getMinSize

      public Integer getMinSize()

      The minimum size of the group.

      Returns:
      The minimum size of the group.
    • withMinSize

      public AutoScalingGroup withMinSize(Integer minSize)

      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

      public void setMaxSize(Integer maxSize)

      The maximum size of the group.

      Parameters:
      maxSize - The maximum size of the group.
    • getMaxSize

      public Integer getMaxSize()

      The maximum size of the group.

      Returns:
      The maximum size of the group.
    • withMaxSize

      public AutoScalingGroup withMaxSize(Integer maxSize)

      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

      public void setDesiredCapacity(Integer desiredCapacity)

      The desired size of the group.

      Parameters:
      desiredCapacity - The desired size of the group.
    • getDesiredCapacity

      public Integer getDesiredCapacity()

      The desired size of the group.

      Returns:
      The desired size of the group.
    • withDesiredCapacity

      public AutoScalingGroup withDesiredCapacity(Integer desiredCapacity)

      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

      public void setDefaultCooldown(Integer defaultCooldown)

      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

      public Integer 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

      public AutoScalingGroup withDefaultCooldown(Integer defaultCooldown)

      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

      public List<String> getAvailabilityZones()

      One or more Availability Zones for the group.

      Returns:
      One or more Availability Zones for the group.
    • setAvailabilityZones

      public void setAvailabilityZones(Collection<String> availabilityZones)

      One or more Availability Zones for the group.

      Parameters:
      availabilityZones - One or more Availability Zones for the group.
    • withAvailabilityZones

      public AutoScalingGroup withAvailabilityZones(String... availabilityZones)

      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) or withAvailabilityZones(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

      public AutoScalingGroup withAvailabilityZones(Collection<String> availabilityZones)

      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

      public List<String> getLoadBalancerNames()

      One or more load balancers associated with the group.

      Returns:
      One or more load balancers associated with the group.
    • setLoadBalancerNames

      public void setLoadBalancerNames(Collection<String> loadBalancerNames)

      One or more load balancers associated with the group.

      Parameters:
      loadBalancerNames - One or more load balancers associated with the group.
    • withLoadBalancerNames

      public AutoScalingGroup withLoadBalancerNames(String... loadBalancerNames)

      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) or withLoadBalancerNames(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

      public AutoScalingGroup withLoadBalancerNames(Collection<String> loadBalancerNames)

      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

      public void setHealthCheckType(String healthCheckType)

      The service to use for the health checks. The valid values are EC2 and ELB.

      Parameters:
      healthCheckType - The service to use for the health checks. The valid values are EC2 and ELB.
    • getHealthCheckType

      public String getHealthCheckType()

      The service to use for the health checks. The valid values are EC2 and ELB.

      Returns:
      The service to use for the health checks. The valid values are EC2 and ELB.
    • withHealthCheckType

      public AutoScalingGroup withHealthCheckType(String healthCheckType)

      The service to use for the health checks. The valid values are EC2 and ELB.

      Parameters:
      healthCheckType - The service to use for the health checks. The valid values are EC2 and ELB.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setHealthCheckGracePeriod

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

      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

      public Integer 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

      public AutoScalingGroup 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.

      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

      public List<Instance> getInstances()

      The EC2 instances associated with the group.

      Returns:
      The EC2 instances associated with the group.
    • setInstances

      public void setInstances(Collection<Instance> instances)

      The EC2 instances associated with the group.

      Parameters:
      instances - The EC2 instances associated with the group.
    • withInstances

      public AutoScalingGroup withInstances(Instance... instances)

      The EC2 instances associated with the group.

      NOTE: This method appends the values to the existing list (if any). Use setInstances(java.util.Collection) or withInstances(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

      public AutoScalingGroup withInstances(Collection<Instance> instances)

      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

      public void setCreatedTime(Date createdTime)

      The date and time the group was created.

      Parameters:
      createdTime - The date and time the group was created.
    • getCreatedTime

      public Date getCreatedTime()

      The date and time the group was created.

      Returns:
      The date and time the group was created.
    • withCreatedTime

      public AutoScalingGroup withCreatedTime(Date createdTime)

      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

      public List<SuspendedProcess> getSuspendedProcesses()

      The suspended processes associated with the group.

      Returns:
      The suspended processes associated with the group.
    • setSuspendedProcesses

      public void setSuspendedProcesses(Collection<SuspendedProcess> suspendedProcesses)

      The suspended processes associated with the group.

      Parameters:
      suspendedProcesses - The suspended processes associated with the group.
    • withSuspendedProcesses

      public AutoScalingGroup withSuspendedProcesses(SuspendedProcess... suspendedProcesses)

      The suspended processes associated with the group.

      NOTE: This method appends the values to the existing list (if any). Use setSuspendedProcesses(java.util.Collection) or withSuspendedProcesses(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

      public AutoScalingGroup withSuspendedProcesses(Collection<SuspendedProcess> suspendedProcesses)

      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

      public void setPlacementGroup(String 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.

      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

      public String 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

      public AutoScalingGroup withPlacementGroup(String 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.

      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

      public void setVPCZoneIdentifier(String vPCZoneIdentifier)

      One or more subnet IDs, if applicable, separated by commas.

      If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability Zones of the subnets match the values for AvailabilityZones.

      Parameters:
      vPCZoneIdentifier - One or more subnet IDs, if applicable, separated by commas.

      If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability Zones of the subnets match the values for AvailabilityZones.

    • getVPCZoneIdentifier

      public String getVPCZoneIdentifier()

      One or more subnet IDs, if applicable, separated by commas.

      If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability Zones of the subnets match the values for AvailabilityZones.

      Returns:
      One or more subnet IDs, if applicable, separated by commas.

      If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability Zones of the subnets match the values for AvailabilityZones.

    • withVPCZoneIdentifier

      public AutoScalingGroup withVPCZoneIdentifier(String vPCZoneIdentifier)

      One or more subnet IDs, if applicable, separated by commas.

      If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability Zones of the subnets match the values for AvailabilityZones.

      Parameters:
      vPCZoneIdentifier - One or more subnet IDs, if applicable, separated by commas.

      If you specify VPCZoneIdentifier and AvailabilityZones, ensure that the Availability Zones of the subnets match the values for AvailabilityZones.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getEnabledMetrics

      public List<EnabledMetric> getEnabledMetrics()

      The metrics enabled for the group.

      Returns:
      The metrics enabled for the group.
    • setEnabledMetrics

      public void setEnabledMetrics(Collection<EnabledMetric> enabledMetrics)

      The metrics enabled for the group.

      Parameters:
      enabledMetrics - The metrics enabled for the group.
    • withEnabledMetrics

      public AutoScalingGroup withEnabledMetrics(EnabledMetric... enabledMetrics)

      The metrics enabled for the group.

      NOTE: This method appends the values to the existing list (if any). Use setEnabledMetrics(java.util.Collection) or withEnabledMetrics(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

      public AutoScalingGroup withEnabledMetrics(Collection<EnabledMetric> enabledMetrics)

      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

      public void setStatus(String status)

      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

      public String 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

      public AutoScalingGroup withStatus(String status)

      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

      public List<TagDescription> getTags()

      The tags for the group.

      Returns:
      The tags for the group.
    • setTags

      public void setTags(Collection<TagDescription> tags)

      The tags for the group.

      Parameters:
      tags - The tags for the group.
    • withTags

      public AutoScalingGroup withTags(TagDescription... tags)

      The tags for the group.

      NOTE: This method appends the values to the existing list (if any). Use setTags(java.util.Collection) or withTags(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

      public AutoScalingGroup withTags(Collection<TagDescription> tags)

      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

      public List<String> getTerminationPolicies()

      The termination policies for the group.

      Returns:
      The termination policies for the group.
    • setTerminationPolicies

      public void setTerminationPolicies(Collection<String> terminationPolicies)

      The termination policies for the group.

      Parameters:
      terminationPolicies - The termination policies for the group.
    • withTerminationPolicies

      public AutoScalingGroup withTerminationPolicies(String... terminationPolicies)

      The termination policies for the group.

      NOTE: This method appends the values to the existing list (if any). Use setTerminationPolicies(java.util.Collection) or withTerminationPolicies(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

      public AutoScalingGroup withTerminationPolicies(Collection<String> terminationPolicies)

      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

      public void setNewInstancesProtectedFromScaleIn(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.
    • getNewInstancesProtectedFromScaleIn

      public Boolean 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

      public Boolean 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

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public AutoScalingGroup clone()
      Overrides:
      clone in class Object