Interface CommonEcsRunTaskProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CommonEcsRunTaskProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-15T10:25:08.043Z") @Stability(Stable) public interface CommonEcsRunTaskProps extends software.amazon.jsii.JsiiSerializable
Basic properties for ECS Tasks.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ecs.*;
 import software.amazon.awscdk.services.stepfunctions.*;
 import software.amazon.awscdk.services.stepfunctions.tasks.*;
 Cluster cluster;
 ContainerDefinition containerDefinition;
 TaskDefinition taskDefinition;
 CommonEcsRunTaskProps commonEcsRunTaskProps = CommonEcsRunTaskProps.builder()
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         // the properties below are optional
         .containerOverrides(List.of(ContainerOverride.builder()
                 .containerDefinition(containerDefinition)
                 // the properties below are optional
                 .command(List.of("command"))
                 .cpu(123)
                 .environment(List.of(TaskEnvironmentVariable.builder()
                         .name("name")
                         .value("value")
                         .build()))
                 .memoryLimit(123)
                 .memoryReservation(123)
                 .build()))
         .integrationPattern(ServiceIntegrationPattern.FIRE_AND_FORGET)
         .build();
 
  • Method Details

    • getCluster

      @Stability(Stable) @NotNull ICluster getCluster()
      The topic to run the task on.
    • getTaskDefinition

      @Stability(Stable) @NotNull TaskDefinition getTaskDefinition()
      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 If you want to run a RunTask with an imported task definition, consider using CustomState

    • getContainerOverrides

      @Stability(Stable) @Nullable default List<ContainerOverride> getContainerOverrides()
      Container setting overrides.

      Key is the name of the container to override, value is the values you want to override.

      Default: - No overrides

    • getIntegrationPattern

      @Stability(Stable) @Nullable default ServiceIntegrationPattern getIntegrationPattern()
      The service integration pattern indicates different ways to call RunTask in ECS.

      The valid value for Lambda is FIRE_AND_FORGET, SYNC and WAIT_FOR_TASK_TOKEN.

      Default: FIRE_AND_FORGET

    • builder

      @Stability(Stable) static CommonEcsRunTaskProps.Builder builder()
      Returns:
      a CommonEcsRunTaskProps.Builder of CommonEcsRunTaskProps