scaling_activities
Creates, updates, deletes, gets or lists a scaling_activities resource.
Overview
| Name | scaling_activities |
| Type | Resource |
| Id | aws.autoscaling.scaling_activities |
Fields
The following fields are returned by SELECT queries:
- describe_scaling_activities
| Name | Datatype | Description |
|---|---|---|
activity_id | string | The ID of the activity. |
auto_scaling_group_arn | string | The Amazon Resource Name (ARN) of the Auto Scaling group. |
auto_scaling_group_name | string | The name of the Auto Scaling group. |
auto_scaling_group_state | string | The state of the Auto Scaling group, which is either InService or Deleted. |
cause | string | The reason the activity began. |
description | string | A friendly, more verbose description of the activity. |
details | string | The details about the activity. |
end_time | string | The end time of the activity. |
progress | integer | A value between 0 and 100 that indicates the progress of the activity. |
start_time | string | The start time of the activity. |
status_code | string | The current status of the activity. |
status_message | string | A friendly, more verbose description of the activity status. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_scaling_activities | select | region | ActivityIds, AutoScalingGroupName, IncludeDeletedGroups, MaxRecords, NextToken, Filters | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
ActivityIds | array | The 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. |
AutoScalingGroupName | string | The name of the Auto Scaling group. Omitting this property performs an account-wide operation, which can result in slower or timed-out requests. |
Filters | array | One 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 |
IncludeDeletedGroups | boolean | Indicates whether to include scaling activity from deleted Auto Scaling groups. |
MaxRecords | integer | The maximum number of items to return with this call. The default value is 100 and the maximum value is 100. |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
SELECT examples
- describe_scaling_activities
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 }}'
;