@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.840Z") @Stability(value=Stable) public interface ScheduledEc2TaskImageOptions extends software.amazon.jsii.JsiiSerializable, 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 Number |
getCpu()
The minimum number of CPU units to reserve for the container.
|
default Number |
getMemoryLimitMiB()
The hard limit (in MiB) of memory to present to the container.
|
default Number |
getMemoryReservationMiB()
The soft limit (in MiB) of memory to reserve for the container.
|
getCommand, getEnvironment, getImage, getLogDriver, getSecrets@Stability(value=Stable) @Nullable default Number getCpu()
Default: none
@Stability(value=Stable) @Nullable default 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.
@Stability(value=Stable) @Nullable default 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.
@Stability(value=Stable) static ScheduledEc2TaskImageOptions.Builder builder()
builder in interface ScheduledTaskImagePropsScheduledEc2TaskImageOptions.Builder of ScheduledEc2TaskImageOptionsCopyright © 2022. All rights reserved.