Skip to main content

scheduled_actions

Creates, updates, deletes or gets a scheduled_action resource or lists scheduled_actions in a region

Overview

Namescheduled_actions
TypeResource
DescriptionThe AWS::AutoScaling::ScheduledAction resource specifies an Amazon EC2 Auto Scaling scheduled action so that the Auto Scaling group can change the number of instances available for your application in response to predictable load changes.
Idaws.autoscaling.scheduled_actions

Fields

NameDatatypeDescription
scheduled_action_namestringAuto-generated unique identifier
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.
time_zonestringThe time zone for the cron expression.
end_timestringThe latest scheduled start time to return. If scheduled action names are provided, this parameter is ignored.
auto_scaling_group_namestringThe name of the Auto Scaling group.
start_timestringThe earliest scheduled start time to return. If scheduled action names are provided, this parameter is ignored.
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.
max_sizeintegerThe minimum size of the Auto Scaling group.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTAutoScalingGroupName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all scheduled_actions in a region.

SELECT
region,
scheduled_action_name,
min_size,
recurrence,
time_zone,
end_time,
auto_scaling_group_name,
start_time,
desired_capacity,
max_size
FROM aws.autoscaling.scheduled_actions
WHERE region = 'us-east-1';

Gets all properties from an individual scheduled_action.

SELECT
region,
scheduled_action_name,
min_size,
recurrence,
time_zone,
end_time,
auto_scaling_group_name,
start_time,
desired_capacity,
max_size
FROM aws.autoscaling.scheduled_actions
WHERE region = 'us-east-1' AND data__Identifier = '<ScheduledActionName>|<AutoScalingGroupName>';

INSERT example

Use the following StackQL query and manifest file to create a new scheduled_action resource, using stack-deploy.

/*+ create */
INSERT INTO aws.autoscaling.scheduled_actions (
AutoScalingGroupName,
region
)
SELECT
'{{ AutoScalingGroupName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.autoscaling.scheduled_actions
WHERE data__Identifier = '<ScheduledActionName|AutoScalingGroupName>'
AND region = 'us-east-1';

Permissions

To operate on the scheduled_actions resource, the following permissions are required:

Create

autoscaling:PutScheduledUpdateGroupAction,
autoscaling:DescribeScheduledActions

Read

autoscaling:DescribeScheduledActions

Update

autoscaling:PutScheduledUpdateGroupAction

Delete

autoscaling:DeleteScheduledAction,
autoscaling:DescribeScheduledActions

List

autoscaling:DescribeScheduledActions