Interface Ec2TaskProps
- All Superinterfaces:
EcsRunTaskBaseProps,software.amazon.jsii.JsiiSerializable,ScheduleTargetBaseProps
- All Known Implementing Classes:
Ec2TaskProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:45.343Z")
@Stability(Stable)
public interface Ec2TaskProps
extends software.amazon.jsii.JsiiSerializable, EcsRunTaskBaseProps
Properties for scheduling an ECS Task on EC2.
Example:
import software.amazon.awscdk.services.ecs.*;
ICluster cluster;
Ec2TaskDefinition taskDefinition;
Schedule.Builder.create(this, "Schedule")
.schedule(ScheduleExpression.rate(Duration.minutes(60)))
.target(EcsRunEc2Task.Builder.create(cluster)
.taskDefinition(taskDefinition)
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEc2TaskPropsstatic final classAn implementation forEc2TaskProps -
Method Summary
Modifier and TypeMethodDescriptionstatic Ec2TaskProps.Builderbuilder()default List<PlacementConstraint> The rules that must be met in order to place a task on a container instance.default List<PlacementStrategy> The algorithm for selecting container instances for task placement.Methods inherited from interface software.amazon.awscdk.services.scheduler.targets.EcsRunTaskBaseProps
getCapacityProviderStrategies, getEnableEcsManagedTags, getEnableExecuteCommand, getGroup, getPropagateTags, getReferenceId, getSecurityGroups, getTags, getTaskCount, getTaskDefinition, getVpcSubnetsMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.scheduler.targets.ScheduleTargetBaseProps
getDeadLetterQueue, getInput, getMaxEventAge, getRetryAttempts, getRole
-
Method Details
-
getPlacementConstraints
The rules that must be met in order to place a task on a container instance.Default: - No placement constraints.
-
getPlacementStrategies
The algorithm for selecting container instances for task placement.Default: - No placement strategies.
-
builder
- Returns:
- a
Ec2TaskProps.BuilderofEc2TaskProps
-