ScheduledAction

class ScheduledAction : KotlinCustomResource

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());
}
}

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the scheduled action.

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

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 id: Output<String>
Link copied to clipboard
val name: Output<String>

Name of the scheduled action.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceId: Output<String>

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

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>

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

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>?

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>?

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.

Link copied to clipboard
val urn: Output<String>