View a markdown version of this page

Use DescribeScheduledActions with a CLI - Amazon EC2 Auto Scaling
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use DescribeScheduledActions with a CLI

The following code examples show how to use DescribeScheduledActions.

CLI
Amazon CLI

Example 1: To describe all scheduled actions

The following describe-scheduled-actions example describes all your scheduled actions.

aws autoscaling describe-scheduled-actions

Output:

{ "ScheduledUpdateGroupActions": [ { "AutoScalingGroupName": "my-asg", "ScheduledActionName": "my-recurring-action", "Recurrence": "30 0 1 1,6,12 *", "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledUpdateGroupAction:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/my-asg:scheduledActionName/my-recurring-action", "StartTime": "2023-12-01T04:00:00Z", "Time": "2023-12-01T04:00:00Z", "MinSize": 1, "MaxSize": 6, "DesiredCapacity": 4, "TimeZone": "America/New_York" } ] }

For more information, see Scheduled scaling in the Amazon EC2 Auto Scaling User Guide.

Example 2: To describe scheduled actions for the specified group

The following describe-scheduled-actions example uses the --auto-scaling-group-name option to describe the scheduled actions for a specific Auto Scaling group.

aws autoscaling describe-scheduled-actions \ --auto-scaling-group-name my-asg

Output:

{ "ScheduledUpdateGroupActions": [ { "AutoScalingGroupName": "my-asg", "ScheduledActionName": "my-recurring-action", "Recurrence": "30 0 1 1,6,12 *", "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledUpdateGroupAction:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/my-asg:scheduledActionName/my-recurring-action", "StartTime": "2023-12-01T04:00:00Z", "Time": "2023-12-01T04:00:00Z", "MinSize": 1, "MaxSize": 6, "DesiredCapacity": 4, "TimeZone": "America/New_York" } ] }

For more information, see Scheduled scaling in the Amazon EC2 Auto Scaling User Guide.

Example 3: To describe the specified scheduled action

The following describe-scheduled-actions example uses the --scheduled-action-names option to describe a specific scheduled action.

aws autoscaling describe-scheduled-actions \ --scheduled-action-names my-recurring-action

Output:

{ "ScheduledUpdateGroupActions": [ { "AutoScalingGroupName": "my-asg", "ScheduledActionName": "my-recurring-action", "Recurrence": "30 0 1 1,6,12 *", "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledUpdateGroupAction:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/my-asg:scheduledActionName/my-recurring-action", "StartTime": "2023-12-01T04:00:00Z", "Time": "2023-12-01T04:00:00Z", "MinSize": 1, "MaxSize": 6, "DesiredCapacity": 4, "TimeZone": "America/New_York" } ] }

For more information, see Scheduled scaling in the Amazon EC2 Auto Scaling User Guide.

Example 4: To describe scheduled actions with a specified start time

The following describe-scheduled-actions example uses the --start-time option to describe the scheduled actions that start at a specific time.

aws autoscaling describe-scheduled-actions \ --start-time "2023-12-01T04:00:00Z"

Output:

{ "ScheduledUpdateGroupActions": [ { "AutoScalingGroupName": "my-asg", "ScheduledActionName": "my-recurring-action", "Recurrence": "30 0 1 1,6,12 *", "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledUpdateGroupAction:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/my-asg:scheduledActionName/my-recurring-action", "StartTime": "2023-12-01T04:00:00Z", "Time": "2023-12-01T04:00:00Z", "MinSize": 1, "MaxSize": 6, "DesiredCapacity": 4, "TimeZone": "America/New_York" } ] }

For more information, see Scheduled scaling in the Amazon EC2 Auto Scaling User Guide.

Example 5: To describe scheduled actions that end at a specified time

The following describe-scheduled-actions example uses the --end-time option to describe the scheduled actions that end at a specific time.

aws autoscaling describe-scheduled-actions \ --end-time "2023-12-01T04:00:00Z"

Output:

{ "ScheduledUpdateGroupActions": [ { "AutoScalingGroupName": "my-asg", "ScheduledActionName": "my-recurring-action", "Recurrence": "30 0 1 1,6,12 *", "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledUpdateGroupAction:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/my-asg:scheduledActionName/my-recurring-action", "StartTime": "2023-12-01T04:00:00Z", "Time": "2023-12-01T04:00:00Z", "MinSize": 1, "MaxSize": 6, "DesiredCapacity": 4, "TimeZone": "America/New_York" } ] }

For more information, see Scheduled scaling in the Amazon EC2 Auto Scaling User Guide.

Example 6: To describe a specified number of scheduled actions

The following describe-scheduled-actions example uses the --max-items option to return a specific number of scheduled actions.

aws autoscaling describe-scheduled-actions \ --auto-scaling-group-name my-asg \ --max-items 1

Output:

{ "ScheduledUpdateGroupActions": [ { "AutoScalingGroupName": "my-asg", "ScheduledActionName": "my-recurring-action", "Recurrence": "30 0 1 1,6,12 *", "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledUpdateGroupAction:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/my-asg:scheduledActionName/my-recurring-action", "StartTime": "2023-12-01T04:00:00Z", "Time": "2023-12-01T04:00:00Z", "MinSize": 1, "MaxSize": 6, "DesiredCapacity": 4, "TimeZone": "America/New_York" } ] }

If the output includes a NextToken field, there are more scheduled actions. To get the additional scheduled actions, use the value of this field with the --starting-token option in a subsequent call as follows.

aws autoscaling describe-scheduled-actions \ --auto-scaling-group-name my-asg \ --starting-token Z3M3LMPEXAMPLE

For more information, see Scheduled scaling in the Amazon EC2 Auto Scaling User Guide.

PowerShell
Tools for PowerShell V4

Example 1: This example describes the scheduled scaling actions for the specified Auto Scaling group.

Get-ASScheduledAction -AutoScalingGroupName my-asg

Output:

AutoScalingGroupName : my-asg DesiredCapacity : 10 EndTime : MaxSize : MinSize : Recurrence : ScheduledActionARN : arn:aws:autoscaling:us-west-2:123456789012:scheduledUpdateGroupAction:8a4c5f24-6ec6-4306-a2dd-f7 2c3af3a4d6:autoScalingGroupName/my-asg:scheduledActionName/myScheduledAction ScheduledActionName : myScheduledAction StartTime : 11/30/2015 8:00:00 AM Time : 11/30/2015 8:00:00 AM

Example 2: This example describes the specified scheduled scaling actions.

Get-ASScheduledAction -ScheduledActionName @("myScheduledScaleOut", "myScheduledScaleIn")

Example 3: This example describes the scheduled scaling actions that start by the specified time.

Get-ASScheduledAction -StartTime "2015-12-01T08:00:00Z"

Example 4: This example describes the scheduled scaling actions that end by the specified time.

Get-ASScheduledAction -EndTime "2015-12-30T08:00:00Z"

Example 5: This example describes the scheduled scaling actions for all your Auto Scaling groups.

Get-ASScheduledAction
Tools for PowerShell V5

Example 1: This example describes the scheduled scaling actions for the specified Auto Scaling group.

Get-ASScheduledAction -AutoScalingGroupName my-asg

Output:

AutoScalingGroupName : my-asg DesiredCapacity : 10 EndTime : MaxSize : MinSize : Recurrence : ScheduledActionARN : arn:aws:autoscaling:us-west-2:123456789012:scheduledUpdateGroupAction:8a4c5f24-6ec6-4306-a2dd-f7 2c3af3a4d6:autoScalingGroupName/my-asg:scheduledActionName/myScheduledAction ScheduledActionName : myScheduledAction StartTime : 11/30/2015 8:00:00 AM Time : 11/30/2015 8:00:00 AM

Example 2: This example describes the specified scheduled scaling actions.

Get-ASScheduledAction -ScheduledActionName @("myScheduledScaleOut", "myScheduledScaleIn")

Example 3: This example describes the scheduled scaling actions that start by the specified time.

Get-ASScheduledAction -StartTime "2015-12-01T08:00:00Z"

Example 4: This example describes the scheduled scaling actions that end by the specified time.

Get-ASScheduledAction -EndTime "2015-12-30T08:00:00Z"

Example 5: This example describes the scheduled scaling actions for all your Auto Scaling groups.

Get-ASScheduledAction

For a complete list of Amazon SDK developer guides and code examples, see Using this service with an Amazon SDK. This topic also includes information about getting started and details about previous SDK versions.