Auto Scaling
API Reference (API Version 2011-01-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

DescribeScalingActivities

Description

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 are sorted by the start time. Activities still in progress appear first on the list.

This action supports pagination. If the response includes a token, there are more records available. To get the additional records, repeat the request with the response token as the NextToken parameter.

Request Parameters

For information about the common parameters that all actions use, see Common Parameters.

ActivityIds.member.N

A list containing the activity IDs of the desired scaling activities. If this list is omitted, all activities are described. If an AutoScalingGroupName is provided, the results are limited to that group. The list of requested activities cannot contain more than 50 items. If unknown activities are requested, they are ignored with no error.

Type: String list

Required: No

AutoScalingGroupName

The name of the AutoScalingGroup.

Type: String

Length constraints: Minimum length of 1. Maximum length of 1600.

Required: No

MaxRecords

The maximum number of scaling activities to return.

Type: Integer

Required: No

NextToken

A string that marks the start of the next batch of returned results for pagination.

Type: String

Required: No

Response Elements

The following elements are returned in a structure named DescribeScalingActivitiesResult.

Activities

A list of the requested scaling activities.

Type: Activity list

NextToken

Acts as a paging mechanism for large result sets. Set to a non-empty string if there are additional results waiting to be returned. Pass this in to subsequent calls to return additional results.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidNextToken

The NextToken value is invalid.

HTTP Status Code: 400

Examples

Sample Request

https://autoscaling.amazonaws.com/?AutoScalingGroupName=my-test-asg
&MaxRecords=20
&Version=2011-01-01
&Action=DescribeScalingActivities
&AUTHPARAMS 

Sample Response

<DescribeScalingActivitiesResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">
<DescribeScalingActivitiesResult>
<Activities>
   <member>
     <StatusCode>Failed</StatusCode>
     <Progress>0</Progress>
     <ActivityId>063308ae-aa22-4a9b-94f4-9faeEXAMPLE</ActivityId>
     <StartTime>2012-04-12T17:32:07.882Z</StartTime>
     <AutoScalingGroupName>my-test-asg</AutoScalingGroupName>
     <Cause>At 2012-04-12T17:31:30Z a user request created an AutoScalingGroup changing the desired capacity from 0 to 1.  At 2012-04-12T17:32:07Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1.</Cause>
     <Details>{}</Details>
     <Description>Launching a new EC2 instance.  Status Reason: The image id 'ami-4edb0327' does not exist. Launching EC2 instance failed.</Description>
     <EndTime>2012-04-12T17:32:08Z</EndTime>
     <StatusMessage>The image id 'ami-4edb0327' does not exist. Launching EC2 instance failed.</StatusMessage>
   </member>
</Activities>
  </DescribeScalingActivitiesResult>
  <ResponseMetadata>
   <RequestId>7a641adc-84c5-11e1-a8a5-217ebEXAMPLE</RequestId>
  </ResponseMetadata>
</DescribeScalingActivitiesResponse>