Use DescribeScheduledActions with a CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use DescribeScheduledActions with a CLI

The following code examples show how to use DescribeScheduledActions.

CLI
AWS CLI

To describe scheduled actions

The following describe-scheduled-actions example displays details for the scheduled actions for the specified service namespace:

aws application-autoscaling describe-scheduled-actions \ --service-namespace dynamodb

Output:

{ "ScheduledActions": [ { "ScalableDimension": "dynamodb:table:WriteCapacityUnits", "Schedule": "at(2019-05-20T18:35:00)", "ResourceId": "table/my-table", "CreationTime": 1561571888.361, "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledAction:2d36aa3b-cdf9-4565-b290-81db519b227d:resource/dynamodb/table/my-table:scheduledActionName/my-first-scheduled-action", "ScalableTargetAction": { "MinCapacity": 15, "MaxCapacity": 20 }, "ScheduledActionName": "my-first-scheduled-action", "ServiceNamespace": "dynamodb" }, { "ScalableDimension": "dynamodb:table:WriteCapacityUnits", "Schedule": "at(2019-05-20T18:40:00)", "ResourceId": "table/my-table", "CreationTime": 1561571946.021, "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledAction:2d36aa3b-cdf9-4565-b290-81db519b227d:resource/dynamodb/table/my-table:scheduledActionName/my-second-scheduled-action", "ScalableTargetAction": { "MinCapacity": 5, "MaxCapacity": 10 }, "ScheduledActionName": "my-second-scheduled-action", "ServiceNamespace": "dynamodb" } ] }

For more information, see Scheduled Scaling in the Application Auto Scaling User Guide.

PowerShell
Tools for PowerShell

Example 1: This cmdlet lists the actions scheduled for your Auto Scaling group that haven't run or that have not reached their end time.

Get-AASScheduledAction -ServiceNamespace AppStream

Output:

CreationTime : 12/22/2019 9:25:52 AM EndTime : 1/1/0001 12:00:00 AM ResourceId : fleet/MyFleet ScalableDimension : appstream:fleet:DesiredCapacity ScalableTargetAction : Amazon.ApplicationAutoScaling.Model.ScalableTargetAction Schedule : cron(0 0 8 ? * MON-FRI *) ScheduledActionARN : arn:aws:autoscaling:us-west-2:012345678912:scheduledAction:4897ca24-3caa-4bf1-8484-851a089b243c:resource/appstream/fleet/MyFleet:scheduledActionName /WeekDaysFleetScaling ScheduledActionName : WeekDaysFleetScaling ServiceNamespace : appstream StartTime : 1/1/0001 12:00:00 AM