Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 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.autoscaling.model;
  

Describes an Auto Scaling group.

  
  public class AutoScalingGroup implements SerializableCloneable {

    
The name of the group.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String autoScalingGroupName;

    
The Amazon Resource Name (ARN) of the group.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String autoScalingGroupARN;

    
The name of the associated launch configuration.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String launchConfigurationName;

    
The minimum size of the group.
  
      private Integer minSize;

    
The maximum size of the group.
  
      private Integer maxSize;

    
The desired size of the group.
  
      private Integer desiredCapacity;

    
The number of seconds after a scaling activity completes before any further scaling activities can start.
  
      private Integer defaultCooldown;

    
One or more Availability Zones for the group.

Constraints:
Length: 1 -

  
One or more load balancers associated with the group.
  
The service of interest for the health status check, which can be either EC2 for Amazon EC2 or ELB for Elastic Load Balancing.

Constraints:
Length: 1 - 32
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

  
      private String healthCheckType;

    
The amount of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service.
 
     private Integer healthCheckGracePeriod;

    
The EC2 instances associated with the group.
 
The date and time the group was created.
 
     private java.util.Date createdTime;

    
The suspended processes associated with the group.
 
The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String placementGroup;

    
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.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String vPCZoneIdentifier;

    
The metrics enabled for the group.
 
The current state of the group when DeleteAutoScalingGroup is in progress.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String status;

    
The tags for the group.
 
The termination policies for the group.
 
The name of the group.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name of the group.
 
     public String getAutoScalingGroupName() {
         return ;
     }
    
    
The name of the group.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
autoScalingGroupName The name of the group.
 
     public void setAutoScalingGroupName(String autoScalingGroupName) {
         this. = autoScalingGroupName;
     }
    
    
The name of the group.

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

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
autoScalingGroupName The name of the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withAutoScalingGroupName(String autoScalingGroupName) {
         this. = autoScalingGroupName;
         return this;
     }

    
The Amazon Resource Name (ARN) of the group.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The Amazon Resource Name (ARN) of the group.
 
     public String getAutoScalingGroupARN() {
         return ;
     }
    
    
The Amazon Resource Name (ARN) of the group.

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
autoScalingGroupARN The Amazon Resource Name (ARN) of the group.
 
     public void setAutoScalingGroupARN(String autoScalingGroupARN) {
         this. = autoScalingGroupARN;
     }
    
    
The Amazon Resource Name (ARN) of the group.

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

Constraints:
Length: 1 - 1600
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
autoScalingGroupARN The Amazon Resource Name (ARN) of the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withAutoScalingGroupARN(String autoScalingGroupARN) {
         this. = autoScalingGroupARN;
         return this;
     }

    
The name of the associated launch configuration.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name of the associated launch configuration.
 
     public String getLaunchConfigurationName() {
         return ;
     }
    
    
The name of the associated launch configuration.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
launchConfigurationName The name of the associated launch configuration.
 
     public void setLaunchConfigurationName(String launchConfigurationName) {
         this. = launchConfigurationName;
     }
    
    
The name of the associated launch configuration.

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

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
launchConfigurationName The name of the associated launch configuration.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withLaunchConfigurationName(String launchConfigurationName) {
         this. = launchConfigurationName;
         return this;
     }

    
The minimum size of the group.

Returns:
The minimum size of the group.
 
     public Integer getMinSize() {
         return ;
     }
    
    
The minimum size of the group.

Parameters:
minSize The minimum size of the group.
 
     public void setMinSize(Integer minSize) {
         this. = minSize;
     }
    
    
The minimum size of the group.

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

Parameters:
minSize The minimum size of the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withMinSize(Integer minSize) {
         this. = minSize;
         return this;
     }

    
The maximum size of the group.

Returns:
The maximum size of the group.
 
     public Integer getMaxSize() {
         return ;
     }
    
    
The maximum size of the group.

Parameters:
maxSize The maximum size of the group.
 
     public void setMaxSize(Integer maxSize) {
         this. = maxSize;
     }
    
    
The maximum size of the group.

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

Parameters:
maxSize The maximum size of the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withMaxSize(Integer maxSize) {
         this. = maxSize;
         return this;
     }

    
The desired size of the group.

Returns:
The desired size of the group.
 
     public Integer getDesiredCapacity() {
         return ;
     }
    
    
The desired size of the group.

Parameters:
desiredCapacity The desired size of the group.
 
     public void setDesiredCapacity(Integer desiredCapacity) {
         this. = desiredCapacity;
     }
    
    
The desired size of the group.

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

Parameters:
desiredCapacity The desired size of the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withDesiredCapacity(Integer desiredCapacity) {
         this. = desiredCapacity;
         return this;
     }

    
The number of seconds after a scaling activity completes before any further scaling activities can start.

Returns:
The number of seconds after a scaling activity completes before any further scaling activities can start.
 
     public Integer getDefaultCooldown() {
         return ;
     }
    
    
The number of seconds after a scaling activity completes before any further scaling activities can start.

Parameters:
defaultCooldown The number of seconds after a scaling activity completes before any further scaling activities can start.
 
     public void setDefaultCooldown(Integer defaultCooldown) {
         this. = defaultCooldown;
     }
    
    
The number of seconds after a scaling activity completes before any further scaling activities can start.

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

Parameters:
defaultCooldown The number of seconds after a scaling activity completes before any further scaling activities can start.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withDefaultCooldown(Integer defaultCooldown) {
         this. = defaultCooldown;
         return this;
     }

    
One or more Availability Zones for the group.

Constraints:
Length: 1 -

Returns:
One or more Availability Zones for the group.
 
     public java.util.List<StringgetAvailabilityZones() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
One or more Availability Zones for the group.

Constraints:
Length: 1 -

Parameters:
availabilityZones One or more Availability Zones for the group.
 
     public void setAvailabilityZones(java.util.Collection<StringavailabilityZones) {
         if (availabilityZones == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringavailabilityZonesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(availabilityZones.size());
         availabilityZonesCopy.addAll(availabilityZones);
         this. = availabilityZonesCopy;
     }
    
    
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.

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

Constraints:
Length: 1 -

Parameters:
availabilityZones One or more Availability Zones for the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withAvailabilityZones(String... availabilityZones) {
         if (getAvailabilityZones() == nullsetAvailabilityZones(new java.util.ArrayList<String>(availabilityZones.length));
         for (String value : availabilityZones) {
             getAvailabilityZones().add(value);
         }
         return this;
     }
    
    
One or more Availability Zones for the group.

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

Constraints:
Length: 1 -

Parameters:
availabilityZones One or more Availability Zones for the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withAvailabilityZones(java.util.Collection<StringavailabilityZones) {
         if (availabilityZones == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringavailabilityZonesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(availabilityZones.size());
             availabilityZonesCopy.addAll(availabilityZones);
             this. = availabilityZonesCopy;
         }
 
         return this;
     }

    
One or more load balancers associated with the group.

Returns:
One or more load balancers associated with the group.
 
     public java.util.List<StringgetLoadBalancerNames() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
One or more load balancers associated with the group.

Parameters:
loadBalancerNames One or more load balancers associated with the group.
 
     public void setLoadBalancerNames(java.util.Collection<StringloadBalancerNames) {
         if (loadBalancerNames == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringloadBalancerNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(loadBalancerNames.size());
         loadBalancerNamesCopy.addAll(loadBalancerNames);
         this. = loadBalancerNamesCopy;
     }
    
    
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.

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

Parameters:
loadBalancerNames One or more load balancers associated with the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withLoadBalancerNames(String... loadBalancerNames) {
         if (getLoadBalancerNames() == nullsetLoadBalancerNames(new java.util.ArrayList<String>(loadBalancerNames.length));
         for (String value : loadBalancerNames) {
             getLoadBalancerNames().add(value);
         }
         return this;
     }
    
    
One or more load balancers associated with the group.

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

Parameters:
loadBalancerNames One or more load balancers associated with the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withLoadBalancerNames(java.util.Collection<StringloadBalancerNames) {
         if (loadBalancerNames == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringloadBalancerNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(loadBalancerNames.size());
             loadBalancerNamesCopy.addAll(loadBalancerNames);
             this. = loadBalancerNamesCopy;
         }
 
         return this;
     }

    
The service of interest for the health status check, which can be either EC2 for Amazon EC2 or ELB for Elastic Load Balancing.

Constraints:
Length: 1 - 32
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The service of interest for the health status check, which can be either EC2 for Amazon EC2 or ELB for Elastic Load Balancing.
 
     public String getHealthCheckType() {
         return ;
     }
    
    
The service of interest for the health status check, which can be either EC2 for Amazon EC2 or ELB for Elastic Load Balancing.

Constraints:
Length: 1 - 32
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
healthCheckType The service of interest for the health status check, which can be either EC2 for Amazon EC2 or ELB for Elastic Load Balancing.
 
     public void setHealthCheckType(String healthCheckType) {
         this. = healthCheckType;
     }
    
    
The service of interest for the health status check, which can be either EC2 for Amazon EC2 or ELB for Elastic Load Balancing.

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

Constraints:
Length: 1 - 32
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
healthCheckType The service of interest for the health status check, which can be either EC2 for Amazon EC2 or ELB for Elastic Load Balancing.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withHealthCheckType(String healthCheckType) {
         this. = healthCheckType;
         return this;
     }

    
The amount of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service.

Returns:
The amount of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service.
 
     public Integer getHealthCheckGracePeriod() {
         return ;
     }
    
    
The amount of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service.

Parameters:
healthCheckGracePeriod The amount of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service.
 
     public void setHealthCheckGracePeriod(Integer healthCheckGracePeriod) {
         this. = healthCheckGracePeriod;
     }
    
    
The amount of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service.

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

Parameters:
healthCheckGracePeriod The amount of time that Auto Scaling waits before checking an instance's health status. The grace period begins when an instance comes into service.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withHealthCheckGracePeriod(Integer healthCheckGracePeriod) {
         this. = healthCheckGracePeriod;
         return this;
     }

    
The EC2 instances associated with the group.

Returns:
The EC2 instances associated with the group.
 
     public java.util.List<InstancegetInstances() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<Instance>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The EC2 instances associated with the group.

Parameters:
instances The EC2 instances associated with the group.
 
     public void setInstances(java.util.Collection<Instanceinstances) {
         if (instances == null) {
             this. = null;
             return;
         }
         instancesCopy.addAll(instances);
         this. = instancesCopy;
     }
    
    
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.

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

Parameters:
instances The EC2 instances associated with the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withInstances(Instance... instances) {
         if (getInstances() == nullsetInstances(new java.util.ArrayList<Instance>(instances.length));
         for (Instance value : instances) {
             getInstances().add(value);
         }
         return this;
     }
    
    
The EC2 instances associated with the group.

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

Parameters:
instances The EC2 instances associated with the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withInstances(java.util.Collection<Instanceinstances) {
         if (instances == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<InstanceinstancesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Instance>(instances.size());
             instancesCopy.addAll(instances);
             this. = instancesCopy;
         }
 
         return this;
     }

    
The date and time the group was created.

Returns:
The date and time the group was created.
 
     public java.util.Date getCreatedTime() {
         return ;
     }
    
    
The date and time the group was created.

Parameters:
createdTime The date and time the group was created.
 
     public void setCreatedTime(java.util.Date createdTime) {
         this. = createdTime;
     }
    
    
The date and time the group was created.

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

Parameters:
createdTime The date and time the group was created.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withCreatedTime(java.util.Date createdTime) {
         this. = createdTime;
         return this;
     }

    
The suspended processes associated with the group.

Returns:
The suspended processes associated with the group.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
The suspended processes associated with the group.

Parameters:
suspendedProcesses The suspended processes associated with the group.
 
     public void setSuspendedProcesses(java.util.Collection<SuspendedProcesssuspendedProcesses) {
         if (suspendedProcesses == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<SuspendedProcesssuspendedProcessesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<SuspendedProcess>(suspendedProcesses.size());
         suspendedProcessesCopy.addAll(suspendedProcesses);
         this. = suspendedProcessesCopy;
     }
    
    
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.

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

Parameters:
suspendedProcesses The suspended processes associated with the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withSuspendedProcesses(SuspendedProcess... suspendedProcesses) {
         if (getSuspendedProcesses() == nullsetSuspendedProcesses(new java.util.ArrayList<SuspendedProcess>(suspendedProcesses.length));
         for (SuspendedProcess value : suspendedProcesses) {
             getSuspendedProcesses().add(value);
         }
         return this;
     }
    
    
The suspended processes associated with the group.

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

Parameters:
suspendedProcesses The suspended processes associated with the group.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (suspendedProcesses == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<SuspendedProcesssuspendedProcessesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<SuspendedProcess>(suspendedProcesses.size());
             suspendedProcessesCopy.addAll(suspendedProcesses);
             this. = suspendedProcessesCopy;
         }
 
         return this;
     }

    
The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups.
 
     public String getPlacementGroup() {
         return ;
     }
    
    
The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
placementGroup The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups.
 
     public void setPlacementGroup(String placementGroup) {
         this. = placementGroup;
     }
    
    
The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups.

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

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
placementGroup The name of the placement group into which you'll launch your instances, if any. For more information, see Placement Groups.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public AutoScalingGroup withPlacementGroup(String placementGroup) {
         this. = placementGroup;
         return this;
     }

    
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.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

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.

 
     public String getVPCZoneIdentifier() {
         return ;
     }
    
    
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.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

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.

 
     public void setVPCZoneIdentifier(String vPCZoneIdentifier) {
         this. = 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 a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

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:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withVPCZoneIdentifier(String vPCZoneIdentifier) {
        this. = vPCZoneIdentifier;
        return this;
    }

    
The metrics enabled for the group.

Returns:
The metrics enabled for the group.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The metrics enabled for the group.

Parameters:
enabledMetrics The metrics enabled for the group.
    public void setEnabledMetrics(java.util.Collection<EnabledMetricenabledMetrics) {
        if (enabledMetrics == null) {
            this. = null;
            return;
        }
        enabledMetricsCopy.addAll(enabledMetrics);
        this. = enabledMetricsCopy;
    }
    
    
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.

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

Parameters:
enabledMetrics The metrics enabled for the group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withEnabledMetrics(EnabledMetric... enabledMetrics) {
        if (getEnabledMetrics() == nullsetEnabledMetrics(new java.util.ArrayList<EnabledMetric>(enabledMetrics.length));
        for (EnabledMetric value : enabledMetrics) {
            getEnabledMetrics().add(value);
        }
        return this;
    }
    
    
The metrics enabled for the group.

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

Parameters:
enabledMetrics The metrics enabled for the group.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (enabledMetrics == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<EnabledMetricenabledMetricsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<EnabledMetric>(enabledMetrics.size());
            enabledMetricsCopy.addAll(enabledMetrics);
            this. = enabledMetricsCopy;
        }
        return this;
    }

    
The current state of the group when DeleteAutoScalingGroup is in progress.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The current state of the group when DeleteAutoScalingGroup is in progress.
    public String getStatus() {
        return ;
    }
    
    
The current state of the group when DeleteAutoScalingGroup is in progress.

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
status The current state of the group when DeleteAutoScalingGroup is in progress.
    public void setStatus(String status) {
        this. = status;
    }
    
    
The current state of the group when DeleteAutoScalingGroup is in progress.

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

Constraints:
Length: 1 - 255
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
status The current state of the group when DeleteAutoScalingGroup is in progress.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withStatus(String status) {
        this. = status;
        return this;
    }

    
The tags for the group.

Returns:
The tags for the group.
    public java.util.List<TagDescriptiongetTags() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<TagDescription>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The tags for the group.

Parameters:
tags The tags for the group.
    public void setTags(java.util.Collection<TagDescriptiontags) {
        if (tags == null) {
            this. = null;
            return;
        }
        tagsCopy.addAll(tags);
        this. = tagsCopy;
    }
    
    
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.

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

Parameters:
tags The tags for the group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withTags(TagDescription... tags) {
        if (getTags() == nullsetTags(new java.util.ArrayList<TagDescription>(tags.length));
        for (TagDescription value : tags) {
            getTags().add(value);
        }
        return this;
    }
    
    
The tags for the group.

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

Parameters:
tags The tags for the group.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (tags == null) {
            this. = null;
        } else {
            tagsCopy.addAll(tags);
            this. = tagsCopy;
        }
        return this;
    }

    
The termination policies for the group.

Returns:
The termination policies for the group.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The termination policies for the group.

Parameters:
terminationPolicies The termination policies for the group.
    public void setTerminationPolicies(java.util.Collection<StringterminationPolicies) {
        if (terminationPolicies == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringterminationPoliciesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(terminationPolicies.size());
        terminationPoliciesCopy.addAll(terminationPolicies);
        this. = terminationPoliciesCopy;
    }
    
    
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.

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

Parameters:
terminationPolicies The termination policies for the group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withTerminationPolicies(String... terminationPolicies) {
        if (getTerminationPolicies() == nullsetTerminationPolicies(new java.util.ArrayList<String>(terminationPolicies.length));
        for (String value : terminationPolicies) {
            getTerminationPolicies().add(value);
        }
        return this;
    }
    
    
The termination policies for the group.

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

Parameters:
terminationPolicies The termination policies for the group.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withTerminationPolicies(java.util.Collection<StringterminationPolicies) {
        if (terminationPolicies == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringterminationPoliciesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(terminationPolicies.size());
            terminationPoliciesCopy.addAll(terminationPolicies);
            this. = terminationPoliciesCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getAutoScalingGroupName() != nullsb.append("AutoScalingGroupName: " + getAutoScalingGroupName() + ",");
        if (getAutoScalingGroupARN() != nullsb.append("AutoScalingGroupARN: " + getAutoScalingGroupARN() + ",");
        if (getLaunchConfigurationName() != nullsb.append("LaunchConfigurationName: " + getLaunchConfigurationName() + ",");
        if (getMinSize() != nullsb.append("MinSize: " + getMinSize() + ",");
        if (getMaxSize() != nullsb.append("MaxSize: " + getMaxSize() + ",");
        if (getDesiredCapacity() != nullsb.append("DesiredCapacity: " + getDesiredCapacity() + ",");
        if (getDefaultCooldown() != nullsb.append("DefaultCooldown: " + getDefaultCooldown() + ",");
        if (getAvailabilityZones() != nullsb.append("AvailabilityZones: " + getAvailabilityZones() + ",");
        if (getLoadBalancerNames() != nullsb.append("LoadBalancerNames: " + getLoadBalancerNames() + ",");
        if (getHealthCheckType() != nullsb.append("HealthCheckType: " + getHealthCheckType() + ",");
        if (getHealthCheckGracePeriod() != nullsb.append("HealthCheckGracePeriod: " + getHealthCheckGracePeriod() + ",");
        if (getInstances() != nullsb.append("Instances: " + getInstances() + ",");
        if (getCreatedTime() != nullsb.append("CreatedTime: " + getCreatedTime() + ",");
        if (getSuspendedProcesses() != nullsb.append("SuspendedProcesses: " + getSuspendedProcesses() + ",");
        if (getPlacementGroup() != nullsb.append("PlacementGroup: " + getPlacementGroup() + ",");
        if (getVPCZoneIdentifier() != nullsb.append("VPCZoneIdentifier: " + getVPCZoneIdentifier() + ",");
        if (getEnabledMetrics() != nullsb.append("EnabledMetrics: " + getEnabledMetrics() + ",");
        if (getStatus() != nullsb.append("Status: " + getStatus() + ",");
        if (getTags() != nullsb.append("Tags: " + getTags() + ",");
        if (getTerminationPolicies() != nullsb.append("TerminationPolicies: " + getTerminationPolicies() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); 
        hashCode = prime * hashCode + ((getAutoScalingGroupARN() == null) ? 0 : getAutoScalingGroupARN().hashCode()); 
        hashCode = prime * hashCode + ((getLaunchConfigurationName() == null) ? 0 : getLaunchConfigurationName().hashCode()); 
        hashCode = prime * hashCode + ((getMinSize() == null) ? 0 : getMinSize().hashCode()); 
        hashCode = prime * hashCode + ((getMaxSize() == null) ? 0 : getMaxSize().hashCode()); 
        hashCode = prime * hashCode + ((getDesiredCapacity() == null) ? 0 : getDesiredCapacity().hashCode()); 
        hashCode = prime * hashCode + ((getDefaultCooldown() == null) ? 0 : getDefaultCooldown().hashCode()); 
        hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode()); 
        hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode()); 
        hashCode = prime * hashCode + ((getHealthCheckType() == null) ? 0 : getHealthCheckType().hashCode()); 
        hashCode = prime * hashCode + ((getHealthCheckGracePeriod() == null) ? 0 : getHealthCheckGracePeriod().hashCode()); 
        hashCode = prime * hashCode + ((getInstances() == null) ? 0 : getInstances().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); 
        hashCode = prime * hashCode + ((getSuspendedProcesses() == null) ? 0 : getSuspendedProcesses().hashCode()); 
        hashCode = prime * hashCode + ((getPlacementGroup() == null) ? 0 : getPlacementGroup().hashCode()); 
        hashCode = prime * hashCode + ((getVPCZoneIdentifier() == null) ? 0 : getVPCZoneIdentifier().hashCode()); 
        hashCode = prime * hashCode + ((getEnabledMetrics() == null) ? 0 : getEnabledMetrics().hashCode()); 
        hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); 
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); 
        hashCode = prime * hashCode + ((getTerminationPolicies() == null) ? 0 : getTerminationPolicies().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof AutoScalingGroup == falsereturn false;
        AutoScalingGroup other = (AutoScalingGroup)obj;
        
        if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == nullreturn false;
        if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == falsereturn false
        if (other.getAutoScalingGroupARN() == null ^ this.getAutoScalingGroupARN() == nullreturn false;
        if (other.getAutoScalingGroupARN() != null && other.getAutoScalingGroupARN().equals(this.getAutoScalingGroupARN()) == falsereturn false
        if (other.getLaunchConfigurationName() == null ^ this.getLaunchConfigurationName() == nullreturn false;
        if (other.getLaunchConfigurationName() != null && other.getLaunchConfigurationName().equals(this.getLaunchConfigurationName()) == falsereturn false
        if (other.getMinSize() == null ^ this.getMinSize() == nullreturn false;
        if (other.getMinSize() != null && other.getMinSize().equals(this.getMinSize()) == falsereturn false
        if (other.getMaxSize() == null ^ this.getMaxSize() == nullreturn false;
        if (other.getMaxSize() != null && other.getMaxSize().equals(this.getMaxSize()) == falsereturn false
        if (other.getDesiredCapacity() == null ^ this.getDesiredCapacity() == nullreturn false;
        if (other.getDesiredCapacity() != null && other.getDesiredCapacity().equals(this.getDesiredCapacity()) == falsereturn false
        if (other.getDefaultCooldown() == null ^ this.getDefaultCooldown() == nullreturn false;
        if (other.getDefaultCooldown() != null && other.getDefaultCooldown().equals(this.getDefaultCooldown()) == falsereturn false
        if (other.getAvailabilityZones() == null ^ this.getAvailabilityZones() == nullreturn false;
        if (other.getAvailabilityZones() != null && other.getAvailabilityZones().equals(this.getAvailabilityZones()) == falsereturn false
        if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == nullreturn false;
        if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == falsereturn false
        if (other.getHealthCheckType() == null ^ this.getHealthCheckType() == nullreturn false;
        if (other.getHealthCheckType() != null && other.getHealthCheckType().equals(this.getHealthCheckType()) == falsereturn false
        if (other.getHealthCheckGracePeriod() == null ^ this.getHealthCheckGracePeriod() == nullreturn false;
        if (other.getHealthCheckGracePeriod() != null && other.getHealthCheckGracePeriod().equals(this.getHealthCheckGracePeriod()) == falsereturn false
        if (other.getInstances() == null ^ this.getInstances() == nullreturn false;
        if (other.getInstances() != null && other.getInstances().equals(this.getInstances()) == falsereturn false
        if (other.getCreatedTime() == null ^ this.getCreatedTime() == nullreturn false;
        if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == falsereturn false
        if (other.getSuspendedProcesses() == null ^ this.getSuspendedProcesses() == nullreturn false;
        if (other.getSuspendedProcesses() != null && other.getSuspendedProcesses().equals(this.getSuspendedProcesses()) == falsereturn false
        if (other.getPlacementGroup() == null ^ this.getPlacementGroup() == nullreturn false;
        if (other.getPlacementGroup() != null && other.getPlacementGroup().equals(this.getPlacementGroup()) == falsereturn false
        if (other.getVPCZoneIdentifier() == null ^ this.getVPCZoneIdentifier() == nullreturn false;
        if (other.getVPCZoneIdentifier() != null && other.getVPCZoneIdentifier().equals(this.getVPCZoneIdentifier()) == falsereturn false
        if (other.getEnabledMetrics() == null ^ this.getEnabledMetrics() == nullreturn false;
        if (other.getEnabledMetrics() != null && other.getEnabledMetrics().equals(this.getEnabledMetrics()) == falsereturn false
        if (other.getStatus() == null ^ this.getStatus() == nullreturn false;
        if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == falsereturn false
        if (other.getTags() == null ^ this.getTags() == nullreturn false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == falsereturn false
        if (other.getTerminationPolicies() == null ^ this.getTerminationPolicies() == nullreturn false;
        if (other.getTerminationPolicies() != null && other.getTerminationPolicies().equals(this.getTerminationPolicies()) == falsereturn false
        return true;
    }
    
    @Override
    public AutoScalingGroup clone() {
        try {
            return (AutoScalingGroupsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X