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.
Idawscc.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.

For more information, see AWS::AutoScaling::ScheduledAction.

Methods

NameResourceAccessible byRequired Params
create_resourcescheduled_actionsINSERTAutoScalingGroupName, region
delete_resourcescheduled_actionsDELETEIdentifier, region
update_resourcescheduled_actionsUPDATEIdentifier, PatchDocument, region
list_resourcesscheduled_actions_list_onlySELECTregion
get_resourcescheduled_actionsSELECTIdentifier, region

SELECT examples

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 awscc.autoscaling.scheduled_actions
WHERE
region = 'us-east-1' AND
Identifier = '{{ scheduled_action_name }}|{{ auto_scaling_group_name }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.autoscaling.scheduled_actions
SET PatchDocument = string('{{ {
"MinSize": min_size,
"Recurrence": recurrence,
"TimeZone": time_zone,
"EndTime": end_time,
"StartTime": start_time,
"DesiredCapacity": desired_capacity,
"MaxSize": max_size
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ scheduled_action_name }}|{{ auto_scaling_group_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.autoscaling.scheduled_actions
WHERE
Identifier = '{{ scheduled_action_name }}|{{ auto_scaling_group_name }}' AND
region = 'us-east-1';

Permissions

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

autoscaling:PutScheduledUpdateGroupAction,
autoscaling:DescribeScheduledActions