Skip to main content

scaling_activities

Creates, updates, deletes, gets or lists a scaling_activities resource.

Overview

Namescaling_activities
TypeResource
Idaws.autoscaling.scaling_activities

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
activity_idstringThe ID of the activity.
auto_scaling_group_arnstringThe Amazon Resource Name (ARN) of the Auto Scaling group.
auto_scaling_group_namestringThe name of the Auto Scaling group.
auto_scaling_group_statestringThe state of the Auto Scaling group, which is either InService or Deleted.
causestringThe reason the activity began.
descriptionstringA friendly, more verbose description of the activity.
detailsstringThe details about the activity.
end_timestringThe end time of the activity.
progressintegerA value between 0 and 100 that indicates the progress of the activity.
start_timestringThe start time of the activity.
status_codestringThe current status of the activity.
status_messagestringA friendly, more verbose description of the activity status.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_scaling_activitiesselectregionActivityIds, AutoScalingGroupName, IncludeDeletedGroups, MaxRecords, NextToken, FiltersGets information about the scaling activities in the account and Region. When scaling events occur, you see a record of the scaling activity in the scaling activities. For more information, see Verify a scaling activity for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide. If the scaling event succeeds, the value of the StatusCode element in the response is Successful. If an attempt to launch instances failed, the StatusCode value is Failed or Cancelled and the StatusMessage element in the response indicates the cause of the failure. For help interpreting the StatusMessage, see Troubleshooting Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
ActivityIdsarrayThe activity IDs of the desired scaling activities. If unknown activity IDs are requested, they are ignored with no error. Only activities started within the last six weeks can be returned regardless of the activity IDs specified. If other filters are specified with the request, only results matching all filter criteria can be returned. Array Members: Maximum number of 50 IDs.
AutoScalingGroupNamestringThe name of the Auto Scaling group. Omitting this property performs an account-wide operation, which can result in slower or timed-out requests.
FiltersarrayOne or more filters to limit the results based on specific criteria. The following filters are supported: StartTimeLowerBound - The earliest scaling activities to return based on the activity start time. Scaling activities with a start time earlier than this value are not included in the results. Only activities started within the last six weeks can be returned regardless of the value specified. StartTimeUpperBound - The latest scaling activities to return based on the activity start time. Scaling activities with a start time later than this value are not included in the results. Only activities started within the last six weeks can be returned regardless of the value specified. Status - The StatusCode value of the scaling activity. This filter can only be used in combination with the AutoScalingGroupName parameter. For valid StatusCode values, see Activity in the Amazon EC2 Auto Scaling API Reference. StartTimeLowerBound and StartTimeUpperBound accept ISO 8601 formatted timestamps. Timestamps without a timezone offset are assumed to be UTC. 2000-01-18T08:15:00Z 2000-01-18T16:15:00+08:00
IncludeDeletedGroupsbooleanIndicates whether to include scaling activity from deleted Auto Scaling groups.
MaxRecordsintegerThe maximum number of items to return with this call. The default value is 100 and the maximum value is 100.
NextTokenstringThe token for the next set of items to return. (You received this token from a previous call.)

SELECT examples

Gets information about the scaling activities in the account and Region. When scaling events occur, you see a record of the scaling activity in the scaling activities. For more information, see Verify a scaling activity for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide. If the scaling event succeeds, the value of the StatusCode element in the response is Successful. If an attempt to launch instances failed, the StatusCode value is Failed or Cancelled and the StatusMessage element in the response indicates the cause of the failure. For help interpreting the StatusMessage, see Troubleshooting Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

SELECT
activity_id,
auto_scaling_group_arn,
auto_scaling_group_name,
auto_scaling_group_state,
cause,
description,
details,
end_time,
progress,
start_time,
status_code,
status_message
FROM aws.autoscaling.scaling_activities
WHERE region = '{{ region }}' -- required
AND ActivityIds = '{{ ActivityIds }}'
AND AutoScalingGroupName = '{{ AutoScalingGroupName }}'
AND IncludeDeletedGroups = '{{ IncludeDeletedGroups }}'
AND MaxRecords = '{{ MaxRecords }}'
AND NextToken = '{{ NextToken }}'
AND Filters = '{{ Filters }}'
;