cancelInstanceRefresh

Cancels an instance refresh or rollback that is in progress. If an instance refresh or rollback is not in progress, an ActiveInstanceRefreshNotFound error occurs.

This operation is part of the instance refresh feature in Amazon EC2 Auto Scaling, which helps you update instances in your Auto Scaling group after you make configuration changes.

When you cancel an instance refresh, this does not roll back any changes that it made. Use the RollbackInstanceRefresh API to roll back instead.

Samples


fun main() { 
   //sampleStart 
   // This example cancels an instance refresh operation in progress.
val resp = autoScalingClient.cancelInstanceRefresh {
    autoScalingGroupName = "my-auto-scaling-group"
} 
   //sampleEnd
}