@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:36.776Z") public interface ScheduledEc2TaskImageOptions extends ScheduledTaskImageProps
Example:
// Instantiate an Amazon EC2 Task to run at a scheduled interval Cluster cluster; ScheduledEc2Task ecsScheduledTask = ScheduledEc2Task.Builder.create(this, "ScheduledTask") .cluster(cluster) .scheduledEc2TaskImageOptions(ScheduledEc2TaskImageOptions.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .memoryLimitMiB(256) .environment(Map.of("name", "TRIGGER", "value", "CloudWatch Events")) .build()) .schedule(Schedule.expression("rate(1 minute)")) .enabled(true) .ruleName("sample-scheduled-task-rule") .build();
Modifier and Type | Interface and Description |
---|---|
static class |
ScheduledEc2TaskImageOptions.Builder
A builder for
ScheduledEc2TaskImageOptions |
static class |
ScheduledEc2TaskImageOptions.Jsii$Proxy
An implementation for
ScheduledEc2TaskImageOptions |
Modifier and Type | Method and Description |
---|---|
static ScheduledEc2TaskImageOptions.Builder |
builder() |
default java.lang.Number |
getCpu()
The minimum number of CPU units to reserve for the container.
|
default java.lang.Number |
getMemoryLimitMiB()
The hard limit (in MiB) of memory to present to the container.
|
default java.lang.Number |
getMemoryReservationMiB()
The soft limit (in MiB) of memory to reserve for the container.
|
getCommand, getEnvironment, getImage, getLogDriver, getSecrets
default java.lang.Number getCpu()
Default: none
default java.lang.Number getMemoryLimitMiB()
If your container attempts to exceed the allocated memory, the container is terminated.
At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
Default: - No memory limit.
default java.lang.Number getMemoryReservationMiB()
When system memory is under contention, Docker attempts to keep the container memory within the limit. If the container requires more memory, it can consume up to the value specified by the Memory property or all of the available memory on the container instance—whichever comes first.
At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services.
Default: - No memory reserved.
static ScheduledEc2TaskImageOptions.Builder builder()
builder
in interface ScheduledTaskImageProps
ScheduledEc2TaskImageOptions.Builder
of ScheduledEc2TaskImageOptions