Interface ScheduledEc2TaskProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,ScheduledTaskBaseProps
- All Known Implementing Classes:
ScheduledEc2TaskProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:48.804Z")
@Stability(Stable)
public interface ScheduledEc2TaskProps
extends software.amazon.jsii.JsiiSerializable, ScheduledTaskBaseProps
The properties for the ScheduledEc2Task task.
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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forScheduledEc2TaskProps
static final class
An implementation forScheduledEc2TaskProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
The properties to define if using an existing TaskDefinition in this construct.default ScheduledEc2TaskImageOptions
The properties to define if the construct is to create a TaskDefinition.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.ecs.patterns.ScheduledTaskBaseProps
getCluster, getDesiredTaskCount, getEnabled, getRuleName, getSchedule, getSecurityGroups, getSubnetSelection, getVpc
-
Method Details
-
getScheduledEc2TaskDefinitionOptions
@Stability(Stable) @Nullable default ScheduledEc2TaskDefinitionOptions getScheduledEc2TaskDefinitionOptions()The properties to define if using an existing TaskDefinition in this construct.ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.
Default: none
-
getScheduledEc2TaskImageOptions
The properties to define if the construct is to create a TaskDefinition.ScheduledEc2TaskDefinitionOptions or ScheduledEc2TaskImageOptions must be defined, but not both.
Default: none
-
builder
- Returns:
- a
ScheduledEc2TaskProps.Builder
ofScheduledEc2TaskProps
-