Interface RunEcsEc2TaskProps

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:48.144Z") @Stability(Deprecated) @Deprecated public interface RunEcsEc2TaskProps extends software.amazon.jsii.JsiiSerializable, CommonEcsRunTaskProps
Deprecated.
use EcsRunTask and EcsRunTaskProps
(deprecated) Properties to run an ECS task on EC2 in StepFunctionsan ECS.

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.ec2.*;
 import software.amazon.awscdk.services.ecs.*;
 import software.amazon.awscdk.services.stepfunctions.*;
 import software.amazon.awscdk.services.stepfunctions.tasks.*;
 Cluster cluster;
 ContainerDefinition containerDefinition;
 PlacementConstraint placementConstraint;
 PlacementStrategy placementStrategy;
 SecurityGroup securityGroup;
 Subnet subnet;
 SubnetFilter subnetFilter;
 TaskDefinition taskDefinition;
 RunEcsEc2TaskProps runEcsEc2TaskProps = RunEcsEc2TaskProps.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)
         .placementConstraints(List.of(placementConstraint))
         .placementStrategies(List.of(placementStrategy))
         .securityGroup(securityGroup)
         .subnets(SubnetSelection.builder()
                 .availabilityZones(List.of("availabilityZones"))
                 .onePerAz(false)
                 .subnetFilters(List.of(subnetFilter))
                 .subnetGroupName("subnetGroupName")
                 .subnetName("subnetName")
                 .subnets(List.of(subnet))
                 .subnetType(SubnetType.ISOLATED)
                 .build())
         .build();
 

  • Method Details

    • getPlacementConstraints

      @Stability(Deprecated) @Deprecated @Nullable default List<PlacementConstraint> getPlacementConstraints()
      Deprecated.
      (deprecated) Placement constraints.

      Default: No constraints

    • getPlacementStrategies

      @Stability(Deprecated) @Deprecated @Nullable default List<PlacementStrategy> getPlacementStrategies()
      Deprecated.
      (deprecated) Placement strategies.

      Default: No strategies

    • getSecurityGroup

      @Stability(Deprecated) @Deprecated @Nullable default ISecurityGroup getSecurityGroup()
      Deprecated.
      (deprecated) Existing security group to use for the task's ENIs.

      (Only applicable in case the TaskDefinition is configured for AwsVpc networking)

      Default: A new security group is created

    • getSubnets

      @Stability(Deprecated) @Deprecated @Nullable default SubnetSelection getSubnets()
      Deprecated.
      (deprecated) In what subnets to place the task's ENIs.

      (Only applicable in case the TaskDefinition is configured for AwsVpc networking)

      Default: Private subnets

    • builder

      @Stability(Deprecated) @Deprecated static RunEcsEc2TaskProps.Builder builder()
      Deprecated.
      Returns:
      a RunEcsEc2TaskProps.Builder of RunEcsEc2TaskProps