ScheduledActionArgs

data class ScheduledActionArgs(val endTime: Output<String>? = null, val name: Output<String>? = null, val resourceId: Output<String>? = null, val scalableDimension: Output<String>? = null, val scalableTargetAction: Output<ScheduledActionScalableTargetActionArgs>? = null, val schedule: Output<String>? = null, val serviceNamespace: Output<String>? = null, val startTime: Output<String>? = null, val timezone: Output<String>? = null) : ConvertibleToJava<ScheduledActionArgs>

Provides an Application AutoScaling ScheduledAction resource.

Example Usage

DynamoDB Table Autoscaling

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appautoscaling.Target;
import com.pulumi.aws.appautoscaling.TargetArgs;
import com.pulumi.aws.appautoscaling.ScheduledAction;
import com.pulumi.aws.appautoscaling.ScheduledActionArgs;
import com.pulumi.aws.appautoscaling.inputs.ScheduledActionScalableTargetActionArgs;
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 dynamodbTarget = new Target("dynamodbTarget", TargetArgs.builder()
.maxCapacity(100)
.minCapacity(5)
.resourceId("table/tableName")
.scalableDimension("dynamodb:table:ReadCapacityUnits")
.serviceNamespace("dynamodb")
.build());
var dynamodbScheduledAction = new ScheduledAction("dynamodbScheduledAction", ScheduledActionArgs.builder()
.serviceNamespace(dynamodbTarget.serviceNamespace())
.resourceId(dynamodbTarget.resourceId())
.scalableDimension(dynamodbTarget.scalableDimension())
.schedule("at(2006-01-02T15:04:05)")
.scalableTargetAction(ScheduledActionScalableTargetActionArgs.builder()
.minCapacity(1)
.maxCapacity(200)
.build())
.build());
}
}

ECS Service Autoscaling

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.appautoscaling.Target;
import com.pulumi.aws.appautoscaling.TargetArgs;
import com.pulumi.aws.appautoscaling.ScheduledAction;
import com.pulumi.aws.appautoscaling.ScheduledActionArgs;
import com.pulumi.aws.appautoscaling.inputs.ScheduledActionScalableTargetActionArgs;
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 ecsTarget = new Target("ecsTarget", TargetArgs.builder()
.maxCapacity(4)
.minCapacity(1)
.resourceId("service/clusterName/serviceName")
.scalableDimension("ecs:service:DesiredCount")
.serviceNamespace("ecs")
.build());
var ecsScheduledAction = new ScheduledAction("ecsScheduledAction", ScheduledActionArgs.builder()
.serviceNamespace(ecsTarget.serviceNamespace())
.resourceId(ecsTarget.resourceId())
.scalableDimension(ecsTarget.scalableDimension())
.schedule("at(2006-01-02T15:04:05)")
.scalableTargetAction(ScheduledActionScalableTargetActionArgs.builder()
.minCapacity(1)
.maxCapacity(10)
.build())
.build());
}
}

Constructors

Link copied to clipboard
constructor(endTime: Output<String>? = null, name: Output<String>? = null, resourceId: Output<String>? = null, scalableDimension: Output<String>? = null, scalableTargetAction: Output<ScheduledActionScalableTargetActionArgs>? = null, schedule: Output<String>? = null, serviceNamespace: Output<String>? = null, startTime: Output<String>? = null, timezone: Output<String>? = null)

Properties

Link copied to clipboard
val endTime: Output<String>? = null

Date and time for the scheduled action to end in RFC 3339 format. The timezone is not affected by the setting of timezone.

Link copied to clipboard
val name: Output<String>? = null

Name of the scheduled action.

Link copied to clipboard
val resourceId: Output<String>? = null

Identifier of the resource associated with the scheduled action. Documentation can be found in the ResourceId parameter at: AWS Application Auto Scaling API Reference

Link copied to clipboard
val scalableDimension: Output<String>? = null

Scalable dimension. Documentation can be found in the ScalableDimension parameter at: AWS Application Auto Scaling API Reference Example: ecs:service:DesiredCount

Link copied to clipboard

New minimum and maximum capacity. You can set both values or just one. See below

Link copied to clipboard
val schedule: Output<String>? = null

Schedule for this action. The following formats are supported: At expressions - at(yyyy-mm-ddThh:mm:ss), Rate expressions - rate(valueunit), Cron expressions - cron(fields). Times for at expressions and cron expressions are evaluated using the time zone configured in timezone. Documentation can be found in the Timezone parameter at: AWS Application Auto Scaling API Reference

Link copied to clipboard
val serviceNamespace: Output<String>? = null

Namespace of the AWS service. Documentation can be found in the ServiceNamespace parameter at: AWS Application Auto Scaling API Reference Example: ecs

Link copied to clipboard
val startTime: Output<String>? = null

Date and time for the scheduled action to start in RFC 3339 format. The timezone is not affected by the setting of timezone.

Link copied to clipboard
val timezone: Output<String>? = null

Time zone used when setting a scheduled action by using an at or cron expression. Does not affect timezone for start_time and end_time. Valid values are the canonical names of the IANA time zones supported by Joda-Time, such as Etc/GMT+9 or Pacific/Tahiti. Default is UTC.

Functions

Link copied to clipboard
open override fun toJava(): ScheduledActionArgs