Skip to main content

scheduled_actions

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

Overview

Namescheduled_actions
TypeResource
Idaws.autoscaling.scheduled_actions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
auto_scaling_group_namestringThe name of the Auto Scaling group.
desired_capacityintegerThe desired capacity is the initial capacity of the Auto Scaling group after the scheduled action runs and the capacity it attempts to maintain.
end_timestringThe date and time in UTC for the recurring schedule to end. For example, "2019-06-01T00:00:00Z".
max_sizeintegerThe maximum size of the Auto Scaling group.
min_sizeintegerThe minimum size of the Auto Scaling group.
recurrencestringThe recurring schedule for the action, in Unix cron syntax format. When StartTime and EndTime are specified with Recurrence, they form the boundaries of when the recurring action starts and stops.
scheduled_action_arnstringThe Amazon Resource Name (ARN) of the scheduled action.
scheduled_action_namestringThe name of the scheduled action.
start_timestringThe date and time in UTC for this action to start. For example, "2019-06-01T00:00:00Z".
timestringThis property is no longer used.
time_zonestringThe time zone for the cron expression.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_scheduled_actionsselectregionAutoScalingGroupName, ScheduledActionNames, StartTime, EndTime, NextToken, MaxRecordsGets information about the scheduled actions that haven't run or that have not reached their end time. To describe the scaling activities for scheduled actions that have already run, call the DescribeScalingActivities API.
delete_scheduled_actiondeleteAutoScalingGroupName, ScheduledActionName, regionDeletes the specified scheduled action.

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
AutoScalingGroupNamestringThe name of the Auto Scaling group.
ScheduledActionNamestringThe name of the action to delete.
regionstringAWS region (default: us-east-1)
AutoScalingGroupNamestringThe name of the Auto Scaling group.
EndTimestring (date-time)The latest scheduled start time to return. If scheduled action names are provided, this property is ignored.
MaxRecordsintegerThe maximum number of items to return with this call. The default value is 50 and the maximum value is 100.
NextTokenstringThe token for the next set of items to return. (You received this token from a previous call.)
ScheduledActionNamesarrayThe names of one or more scheduled actions. If you omit this property, all scheduled actions are described. If you specify an unknown scheduled action, it is ignored with no error. Array Members: Maximum number of 50 actions.
StartTimestring (date-time)The earliest scheduled start time to return. If scheduled action names are provided, this property is ignored.

SELECT examples

Gets information about the scheduled actions that haven't run or that have not reached their end time. To describe the scaling activities for scheduled actions that have already run, call the DescribeScalingActivities API.

SELECT
auto_scaling_group_name,
desired_capacity,
end_time,
max_size,
min_size,
recurrence,
scheduled_action_arn,
scheduled_action_name,
start_time,
time,
time_zone
FROM aws.autoscaling.scheduled_actions
WHERE region = '{{ region }}' -- required
AND AutoScalingGroupName = '{{ AutoScalingGroupName }}'
AND ScheduledActionNames = '{{ ScheduledActionNames }}'
AND StartTime = '{{ StartTime }}'
AND EndTime = '{{ EndTime }}'
AND NextToken = '{{ NextToken }}'
AND MaxRecords = '{{ MaxRecords }}'
;

DELETE examples

Deletes the specified scheduled action.

DELETE FROM aws.autoscaling.scheduled_actions
WHERE AutoScalingGroupName = '{{ AutoScalingGroupName }}' --required
AND ScheduledActionName = '{{ ScheduledActionName }}' --required
AND region = '{{ region }}' --required
;