class aws_cdk.aws_autoscaling.UpdatePolicy

Bases: object

How existing instances should be updated.




# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_autoscaling as autoscaling

update_policy = autoscaling.UpdatePolicy.replacing_update()

Static Methods

classmethod replacing_update()

Create a new AutoScalingGroup and switch over to it.

Return type:


classmethod rolling_update(*, max_batch_size=None, min_instances_in_service=None, min_success_percentage=None, pause_time=None, suspend_processes=None, wait_on_resource_signals=None)

Replace the instances in the AutoScalingGroup one by one, or in batches.

  • max_batch_size (Union[int, float, None]) – The maximum number of instances that AWS CloudFormation updates at once. This number affects the speed of the replacement. Default: 1

  • min_instances_in_service (Union[int, float, None]) – The minimum number of instances that must be in service before more instances are replaced. This number affects the speed of the replacement. Default: 0

  • min_success_percentage (Union[int, float, None]) – The percentage of instances that must signal success for the update to succeed. Default: - The minSuccessPercentage configured for signals on the AutoScalingGroup

  • pause_time (Optional[Duration]) – The pause time after making a change to a batch of instances. Default: - The timeout configured for signals on the AutoScalingGroup

  • suspend_processes (Optional[Sequence[ScalingProcess]]) – Specifies the Auto Scaling processes to suspend during a stack update. Suspending processes prevents Auto Scaling from interfering with a stack update. Default: HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions.

  • wait_on_resource_signals (Optional[bool]) – Specifies whether the Auto Scaling group waits on signals from new instances during an update. Default: true if you configured signals on the AutoScalingGroup, false otherwise

Return type: