Start line:  
End line:  

Snippet Preview

Snippet HTML Code

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

The AutoScalingGroup data type.

 
 public class AutoScalingGroup {

    
Specifies the name of the group.

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

 
     private String autoScalingGroupName;

    
Specifies the name of the associated LaunchConfiguration.

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

 
     private String launchConfigurationName;

    
Contains the minimum size of the AutoScalingGroup.
 
     private Integer minSize;

    
Contains the maximum size of the AutoScalingGroup.
 
     private Integer maxSize;

    
Specifies the desired capacity for the AutoScalingGroup.
 
     private Integer desiredCapacity;

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

    
Contains a list of availability zones for the group.

Constraints:
Length: 1 -

 
     private java.util.List<StringavailabilityZones;

    
 
     private java.util.List<StringloadBalancerNames;

    
Provides a summary list of EC2 instances.
 
     private java.util.List<Instanceinstances;

    
Specifies the date and time the Auto Scaling group was created.
 
     private java.util.Date createdTime;

    
Specifies the name of the group.

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

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

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

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

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

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

Parameters:
autoScalingGroupName Specifies 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;
    }
    
    
    
Specifies the name of the associated LaunchConfiguration.

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

Returns:
Specifies the name of the associated LaunchConfiguration.
        return ;
    }
    
    
Specifies the name of the associated LaunchConfiguration.

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

Parameters:
launchConfigurationName Specifies the name of the associated LaunchConfiguration.
    public void setLaunchConfigurationName(String launchConfigurationName) {
        this. = launchConfigurationName;
    }
    
    
Specifies the name of the associated LaunchConfiguration.

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 Specifies the name of the associated LaunchConfiguration.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withLaunchConfigurationName(String launchConfigurationName) {
        this. = launchConfigurationName;
        return this;
    }
    
    
    
Contains the minimum size of the AutoScalingGroup.

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

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

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

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

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

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

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

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

Returns:
Specifies the desired capacity for the AutoScalingGroup.
    public Integer getDesiredCapacity() {
        return ;
    }
    
    
Specifies the desired capacity for the AutoScalingGroup.

Parameters:
desiredCapacity Specifies the desired capacity for the AutoScalingGroup.
    public void setDesiredCapacity(Integer desiredCapacity) {
        this. = desiredCapacity;
    }
    
    
Specifies the desired capacity for the AutoScalingGroup.

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

Parameters:
desiredCapacity Specifies the desired capacity for the AutoScalingGroup.
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 getCooldown() {
        return ;
    }
    
    
The number of seconds after a scaling activity completes before any further scaling activities can start.

Parameters:
cooldown The number of seconds after a scaling activity completes before any further scaling activities can start.
    public void setCooldown(Integer cooldown) {
        this. = cooldown;
    }
    
    
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:
cooldown 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 withCooldown(Integer cooldown) {
        this. = cooldown;
        return this;
    }
    
    
    
Contains a list of availability zones for the group.

Constraints:
Length: 1 -

Returns:
Contains a list of availability zones for the group.
        if ( == null) {
             = new java.util.ArrayList<String>();
        }
        return ;
    }
    
    
Contains a list of availability zones for the group.

Constraints:
Length: 1 -

Parameters:
availabilityZones Contains a list of availability zones for the group.
    public void setAvailabilityZones(java.util.Collection<StringavailabilityZones) {
        java.util.List<StringavailabilityZonesCopy = new java.util.ArrayList<String>();
        if (availabilityZones != null) {
            availabilityZonesCopy.addAll(availabilityZones);
        }
        this. = availabilityZonesCopy;
    }
    
    
Contains a list of availability zones for the group.

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

Constraints:
Length: 1 -

Parameters:
availabilityZones Contains a list of 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) {
        for (String value : availabilityZones) {
            getAvailabilityZones().add(value);
        }
        return this;
    }
    
    
Contains a list of availability zones for the group.

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

Constraints:
Length: 1 -

Parameters:
availabilityZones Contains a list of 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) {
        java.util.List<StringavailabilityZonesCopy = new java.util.ArrayList<String>();
        if (availabilityZones != null) {
            availabilityZonesCopy.addAll(availabilityZones);
        }
        this. = availabilityZonesCopy;
        return this;
    }
    
    

Returns:
        if ( == null) {
             = new java.util.ArrayList<String>();
        }
        return ;
    }
    
    

Parameters:
loadBalancerNames
    public void setLoadBalancerNames(java.util.Collection<StringloadBalancerNames) {
        java.util.List<StringloadBalancerNamesCopy = new java.util.ArrayList<String>();
        if (loadBalancerNames != null) {
            loadBalancerNamesCopy.addAll(loadBalancerNames);
        }
        this. = loadBalancerNamesCopy;
    }
    
    

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

Parameters:
loadBalancerNames
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withLoadBalancerNames(String... loadBalancerNames) {
        for (String value : loadBalancerNames) {
            getLoadBalancerNames().add(value);
        }
        return this;
    }
    
    

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

Parameters:
loadBalancerNames
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withLoadBalancerNames(java.util.Collection<StringloadBalancerNames) {
        java.util.List<StringloadBalancerNamesCopy = new java.util.ArrayList<String>();
        if (loadBalancerNames != null) {
            loadBalancerNamesCopy.addAll(loadBalancerNames);
        }
        this. = loadBalancerNamesCopy;
        return this;
    }
    
    
Provides a summary list of EC2 instances.

Returns:
Provides a summary list of EC2 instances.
    public java.util.List<InstancegetInstances() {
        if ( == null) {
             = new java.util.ArrayList<Instance>();
        }
        return ;
    }
    
    
Provides a summary list of EC2 instances.

Parameters:
instances Provides a summary list of EC2 instances.
    public void setInstances(java.util.Collection<Instanceinstances) {
        java.util.List<InstanceinstancesCopy = new java.util.ArrayList<Instance>();
        if (instances != null) {
            instancesCopy.addAll(instances);
        }
        this. = instancesCopy;
    }
    
    
Provides a summary list of EC2 instances.

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

Parameters:
instances Provides a summary list of EC2 instances.
Returns:
A reference to this updated object so that method calls can be chained together.
    public AutoScalingGroup withInstances(Instance... instances) {
        for (Instance value : instances) {
            getInstances().add(value);
        }
        return this;
    }
    
    
Provides a summary list of EC2 instances.

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

Parameters:
instances Provides a summary list of EC2 instances.
Returns:
A reference to this updated object so that method calls can be chained together.
        java.util.List<InstanceinstancesCopy = new java.util.ArrayList<Instance>();
        if (instances != null) {
            instancesCopy.addAll(instances);
        }
        this. = instancesCopy;
        return this;
    }
    
    
Specifies the date and time the Auto Scaling group was created.

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

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

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

Parameters:
createdTime Specifies the date and time the Auto Scaling 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;
    }
    
    
    
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("{");
        sb.append("AutoScalingGroupName: " +  + ", ");
        sb.append("LaunchConfigurationName: " +  + ", ");
        sb.append("MinSize: " +  + ", ");
        sb.append("MaxSize: " +  + ", ");
        sb.append("DesiredCapacity: " +  + ", ");
        sb.append("Cooldown: " +  + ", ");
        sb.append("AvailabilityZones: " +  + ", ");
        sb.append("LoadBalancerNames: " +  + ", ");
        sb.append("Instances: " +  + ", ");
        sb.append("CreatedTime: " +  + ", ");
        sb.append("}");
        return sb.toString();
    }
    
}
    
New to GrepCode? Check out our FAQ X