putScheduledUpdateGroupAction
abstract suspend fun putScheduledUpdateGroupAction(input: PutScheduledUpdateGroupActionRequest): PutScheduledUpdateGroupActionResponse
Creates or updates a scheduled scaling action for an Auto Scaling group.
For more information, see Scheduled scaling in the Amazon EC2 Auto Scaling User Guide.
You can view the scheduled actions for an Auto Scaling group using the DescribeScheduledActions API call. If you are no longer using a scheduled action, you can delete it by calling the DeleteScheduledAction API.
If you try to schedule your action in the past, Amazon EC2 Auto Scaling returns an error message.
Samples
fun main() {
//sampleStart
// This example adds the specified scheduled action to the specified Auto Scaling group.
autoScalingClient.putScheduledUpdateGroupAction {
autoScalingGroupName = "my-auto-scaling-group"
scheduledActionName = "my-scheduled-action"
startTime = "2014-05-12T08:00:00Z"
endTime = "2014-05-12T08:00:00Z"
minSize = 2
maxSize = 6
desiredCapacity = 4
}
//sampleEnd
}