ScheduledAction

class aws_cdk.aws_autoscaling.ScheduledAction(scope, id, *, auto_scaling_group, schedule, desired_capacity=None, end_time=None, max_capacity=None, min_capacity=None, start_time=None)

Bases: aws_cdk.core.Resource

Define a scheduled scaling action.

__init__(scope, id, *, auto_scaling_group, schedule, desired_capacity=None, end_time=None, max_capacity=None, min_capacity=None, start_time=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • props

  • auto_scaling_group (IAutoScalingGroup) – The AutoScalingGroup to apply the scheduled actions to.

  • schedule (Schedule) – When to perform this action. Supports cron expressions. For more information about cron expressions, see https://en.wikipedia.org/wiki/Cron.

  • desired_capacity (Union[int, float, None]) – The new desired capacity. At the scheduled time, set the desired capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new desired capacity.

  • end_time (Optional[datetime]) – When this scheduled action expires. Default: - The rule never expires.

  • max_capacity (Union[int, float, None]) – The new maximum capacity. At the scheduled time, set the maximum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new maximum capacity.

  • min_capacity (Union[int, float, None]) – The new minimum capacity. At the scheduled time, set the minimum capacity to the given capacity. At least one of maxCapacity, minCapacity, or desiredCapacity must be supplied. Default: - No new minimum capacity.

  • start_time (Optional[datetime]) – When this scheduled action becomes active. Default: - The rule is activate immediately.

Return type

None

Methods

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool