Schedule Args
data class ScheduleArgs(val autoscalingGroupName: Output<String>? = null, val desiredCapacity: Output<Int>? = null, val endTime: Output<String>? = null, val maxSize: Output<Int>? = null, val minSize: Output<Int>? = null, val recurrence: Output<String>? = null, val scheduledActionName: Output<String>? = null, val startTime: Output<String>? = null, val timeZone: Output<String>? = null) : ConvertibleToJava<ScheduleArgs>
Provides an AutoScaling Schedule resource.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.autoscaling.Group;
import com.pulumi.aws.autoscaling.GroupArgs;
import com.pulumi.aws.autoscaling.Schedule;
import com.pulumi.aws.autoscaling.ScheduleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foobarGroup = new Group("foobarGroup", GroupArgs.builder()
.availabilityZones("us-west-2a")
.maxSize(1)
.minSize(1)
.healthCheckGracePeriod(300)
.healthCheckType("ELB")
.forceDelete(true)
.terminationPolicies("OldestInstance")
.build());
var foobarSchedule = new Schedule("foobarSchedule", ScheduleArgs.builder()
.scheduledActionName("foobar")
.minSize(0)
.maxSize(1)
.desiredCapacity(0)
.startTime("2016-12-11T18:00:00Z")
.endTime("2016-12-12T06:00:00Z")
.autoscalingGroupName(foobarGroup.name())
.build());
}
}
Content copied to clipboard
Import
AutoScaling ScheduledAction can be imported using the auto-scaling-group-name
and scheduled-action-name
, e.g.,
$ pulumi import aws:autoscaling/schedule:Schedule resource-name auto-scaling-group-name/scheduled-action-name
Content copied to clipboard
Constructors
Link copied to clipboard
fun ScheduleArgs(autoscalingGroupName: Output<String>? = null, desiredCapacity: Output<Int>? = null, endTime: Output<String>? = null, maxSize: Output<Int>? = null, minSize: Output<Int>? = null, recurrence: Output<String>? = null, scheduledActionName: Output<String>? = null, startTime: Output<String>? = null, timeZone: Output<String>? = null)