Interface EcsRunTaskProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, TaskStateBaseProps
All Known Implementing Classes:
EcsRunTaskProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2025-01-15T21:09:27.955Z") @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, "FargateCluster").vpc(vpc).build();
 TaskDefinition taskDefinition = TaskDefinition.Builder.create(this, "TD")
         .memoryMiB("512")
         .cpu("256")
         .compatibility(Compatibility.FARGATE)
         .build();
 ContainerDefinition containerDefinition = taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder()
         .image(ContainerImage.fromRegistry("foo/bar"))
         .memoryLimitMiB(256)
         .build());
 EcsRunTask runTask = EcsRunTask.Builder.create(this, "RunFargate")
         .integrationPattern(IntegrationPattern.RUN_JOB)
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .assignPublicIp(true)
         .containerOverrides(List.of(ContainerOverride.builder()
                 .containerDefinition(containerDefinition)
                 .environment(List.of(TaskEnvironmentVariable.builder().name("SOME_KEY").value(JsonPath.stringAt("$.SomeKey")).build()))
                 .build()))
         .launchTarget(new EcsFargateLaunchTarget())
         .propagatedTagSource(PropagatedTagSource.TASK_DEFINITION)
         .build();