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;
Container for the parameters to the DescribeScalingActivities operation.

Returns the scaling activities for the specified Auto Scaling group.

If the specified ActivityIds list is empty, all the activities from the past six weeks are returned. Activities will be sorted by completion time. Activities that have no completion time are considered as using the most recent possible time.

 
 public class DescribeScalingActivitiesRequest extends AmazonWebServiceRequest {

    
A list containing the activity IDs of the desired scaling activities.
 
     private java.util.List<StringactivityIds;

    
The name of the AutoScalingGroup.

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

 
     private String autoScalingGroupName;

    
The maximum number of scaling activities to return.

Constraints:
Range: 20 - 100

 
     private Integer maxRecords;

    
A string used to mark the start of the next batch of returned results.

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

 
     private String nextToken;

    
A list containing the activity IDs of the desired scaling activities.

Returns:
A list containing the activity IDs of the desired scaling activities.
 
     public java.util.List<StringgetActivityIds() {
         if ( == null) {
              = new java.util.ArrayList<String>();
         }
         return ;
     }
    
    
A list containing the activity IDs of the desired scaling activities.

Parameters:
activityIds A list containing the activity IDs of the desired scaling activities.
 
     public void setActivityIds(java.util.Collection<StringactivityIds) {
         java.util.List<StringactivityIdsCopy = new java.util.ArrayList<String>();
         if (activityIds != null) {
             activityIdsCopy.addAll(activityIds);
         }
         this. = activityIdsCopy;
     }
    
    
A list containing the activity IDs of the desired scaling activities.

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

Parameters:
activityIds A list containing the activity IDs of the desired scaling activities.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DescribeScalingActivitiesRequest withActivityIds(String... activityIds) {
        for (String value : activityIds) {
            getActivityIds().add(value);
        }
        return this;
    }
    
    
A list containing the activity IDs of the desired scaling activities.

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

Parameters:
activityIds A list containing the activity IDs of the desired scaling activities.
Returns:
A reference to this updated object so that method calls can be chained together.
        java.util.List<StringactivityIdsCopy = new java.util.ArrayList<String>();
        if (activityIds != null) {
            activityIdsCopy.addAll(activityIds);
        }
        this. = activityIdsCopy;
        return this;
    }
    
    
The name of the AutoScalingGroup.

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

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

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

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

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 The name of the AutoScalingGroup.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeScalingActivitiesRequest withAutoScalingGroupName(String autoScalingGroupName) {
        this. = autoScalingGroupName;
        return this;
    }
    
    
    
The maximum number of scaling activities to return.

Constraints:
Range: 20 - 100

Returns:
The maximum number of scaling activities to return.
    public Integer getMaxRecords() {
        return ;
    }
    
    
The maximum number of scaling activities to return.

Constraints:
Range: 20 - 100

Parameters:
maxRecords The maximum number of scaling activities to return.
    public void setMaxRecords(Integer maxRecords) {
        this. = maxRecords;
    }
    
    
The maximum number of scaling activities to return.

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

Constraints:
Range: 20 - 100

Parameters:
maxRecords The maximum number of scaling activities to return.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = maxRecords;
        return this;
    }
    
    
    
A string used to mark the start of the next batch of returned results.

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

Returns:
A string used to mark the start of the next batch of returned results.
    public String getNextToken() {
        return ;
    }
    
    
A string used to mark the start of the next batch of returned results.

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

Parameters:
nextToken A string used to mark the start of the next batch of returned results.
    public void setNextToken(String nextToken) {
        this. = nextToken;
    }
    
    
A string used to mark the start of the next batch of returned results.

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

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

Parameters:
nextToken A string used to mark the start of the next batch of returned results.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = nextToken;
        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("ActivityIds: " +  + ", ");
        sb.append("AutoScalingGroupName: " +  + ", ");
        sb.append("MaxRecords: " +  + ", ");
        sb.append("NextToken: " +  + ", ");
        sb.append("}");
        return sb.toString();
    }
    
}
    
New to GrepCode? Check out our FAQ X