Interface EcsRunTaskProps
- All Superinterfaces:
- software.amazon.jsii.JsiiSerializable,- TaskStateBaseProps
- All Known Implementing Classes:
- EcsRunTaskProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
           date="2023-06-19T16:30:47.964Z")
@Stability(Stable)
public interface EcsRunTaskProps
extends software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
Properties for ECS Tasks.
 
Example:
 IVpc vpc = Vpc.fromLookup(this, "Vpc", VpcLookupOptions.builder()
         .isDefault(true)
         .build());
 Cluster cluster = Cluster.Builder.create(this, "Ec2Cluster").vpc(vpc).build();
 cluster.addCapacity("DefaultAutoScalingGroup", AddCapacityOptions.builder()
         .instanceType(new InstanceType("t2.micro"))
         .vpcSubnets(SubnetSelection.builder().subnetType(SubnetType.PUBLIC).build())
         .build());
 TaskDefinition taskDefinition = TaskDefinition.Builder.create(this, "TD")
         .compatibility(Compatibility.EC2)
         .build();
 taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder()
         .image(ContainerImage.fromRegistry("foo/bar"))
         .memoryLimitMiB(256)
         .build());
 EcsRunTask runTask = EcsRunTask.Builder.create(this, "Run")
         .integrationPattern(IntegrationPattern.RUN_JOB)
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .launchTarget(EcsEc2LaunchTarget.Builder.create()
                 .placementStrategies(List.of(PlacementStrategy.spreadAcrossInstances(), PlacementStrategy.packedByCpu(), PlacementStrategy.randomly()))
                 .placementConstraints(List.of(PlacementConstraint.memberOf("blieptuut")))
                 .build())
         .build();
 - 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forEcsRunTaskPropsstatic final classAn implementation forEcsRunTaskProps
- 
Method SummaryModifier and TypeMethodDescriptionstatic EcsRunTaskProps.Builderbuilder()default BooleanAssign public IP addresses to each task.The ECS cluster to run the task on.default List<ContainerOverride>Container setting overrides.An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted.default List<ISecurityGroup>Existing security groups to use for the tasks.default SubnetSelectionSubnets to place the task's ENIs.[disable-awslint:ref-via-interface] Task Definition used for running tasks in the service.Methods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJsonMethods inherited from interface software.amazon.awscdk.services.stepfunctions.TaskStateBasePropsgetComment, getHeartbeat, getInputPath, getIntegrationPattern, getOutputPath, getResultPath, getResultSelector, getTimeout
- 
Method Details- 
getClusterThe ECS cluster to run the task on.
- 
getLaunchTargetAn Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted.
- 
getTaskDefinition[disable-awslint:ref-via-interface] Task Definition used for running tasks in the service.Note: this must be TaskDefinition, and not ITaskDefinition, as it requires properties that are not known for imported task definitions 
- 
getAssignPublicIpAssign public IP addresses to each task.Default: false 
- 
getContainerOverridesContainer setting overrides.Specify the container to use and the overrides to apply. Default: - No overrides 
- 
getSecurityGroupsExisting security groups to use for the tasks.Default: - A new security group is created 
- 
getSubnetsSubnets to place the task's ENIs.Default: - Public subnets if assignPublicIp is set. Private subnets otherwise. 
- 
builder- Returns:
- a EcsRunTaskProps.BuilderofEcsRunTaskProps
 
 
-