# RollingUpdateOptions

Options for customizing the rolling update.

Used as argument in: [UpdatePolicy.rollingUpdate](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling.UpdatePolicy.html#rollingupdate)

- Source: [`aws-autoscaling/lib/auto-scaling-group.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts#L1092)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
const rollingUpdateOptions: autoscaling.RollingUpdateOptions = {
  maxBatchSize: 123,
  minInstancesInService: 123,
  minSuccessPercentage: 123,
  pauseTime: cdk.Duration.minutes(30),
  suspendProcesses: [autoscaling.ScalingProcess.LAUNCH],
  waitOnResourceSignals: false,
};
```

Python:

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

rolling_update_options = autoscaling.RollingUpdateOptions(
    max_batch_size=123,
    min_instances_in_service=123,
    min_success_percentage=123,
    pause_time=cdk.Duration.minutes(30),
    suspend_processes=[autoscaling.ScalingProcess.LAUNCH],
    wait_on_resource_signals=False
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.autoscaling.*;

RollingUpdateOptions rollingUpdateOptions = RollingUpdateOptions.builder()
        .maxBatchSize(123)
        .minInstancesInService(123)
        .minSuccessPercentage(123)
        .pauseTime(Duration.minutes(30))
        .suspendProcesses(List.of(ScalingProcess.LAUNCH))
        .waitOnResourceSignals(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.AutoScaling;

var rollingUpdateOptions = new RollingUpdateOptions {
    MaxBatchSize = 123,
    MinInstancesInService = 123,
    MinSuccessPercentage = 123,
    PauseTime = Duration.Minutes(30),
    SuspendProcesses = new [] { ScalingProcess.LAUNCH },
    WaitOnResourceSignals = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

rollingUpdateOptions := &RollingUpdateOptions{
	MaxBatchSize: jsii.Number(123),
	MinInstancesInService: jsii.Number(123),
	MinSuccessPercentage: jsii.Number(123),
	PauseTime: cdk.Duration_Minutes(jsii.Number(30)),
	SuspendProcesses: []ScalingProcess{
		awscdk.Aws_autoscaling.ScalingProcess_LAUNCH,
	},
	WaitOnResourceSignals: jsii.Boolean(false),
}
```

## Properties

- `maxBatchSize`: number = 1 — The maximum number of instances that AWS CloudFormation updates at once.

  This number affects the speed of the replacement.

- `minInstancesInService`: number = 0 — The minimum number of instances that must be in service before more instances are replaced.

  This number affects the speed of the replacement.

- `minSuccessPercentage`: number — The percentage of instances that must signal success for the update to succeed.

  **Default:** The `minSuccessPercentage` configured for `signals` on the AutoScalingGroup

- `pauseTime`: [Duration](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The pause time after making a change to a batch of instances.

  **Default:** The `timeout` configured for `signals` on the AutoScalingGroup

- `suspendProcesses`: [ScalingProcess](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling.ScalingProcess.html)[] — Specifies the Auto Scaling processes to suspend during a stack update.

  **Default:** HealthCheck, ReplaceUnhealthy, AZRebalance, AlarmNotification, ScheduledActions.

  Suspending processes prevents Auto Scaling from interfering with a stack
  update.

- `waitOnResourceSignals`: boolean — 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
