RunEcsEc2TaskProps

class aws_cdk.aws_stepfunctions_tasks.RunEcsEc2TaskProps(*, cluster, task_definition, container_overrides=None, integration_pattern=None, placement_constraints=None, placement_strategies=None, security_group=None, subnets=None)

Bases: aws_cdk.aws_stepfunctions_tasks.CommonEcsRunTaskProps

__init__(*, cluster, task_definition, container_overrides=None, integration_pattern=None, placement_constraints=None, placement_strategies=None, security_group=None, subnets=None)

Properties to run an ECS task on EC2 in StepFunctionsan ECS.

Parameters
  • cluster (ICluster) – The topic to run the task on.

  • task_definition (TaskDefinition) – 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

  • container_overrides (Optional[List[ContainerOverride]]) – Container setting overrides. Key is the name of the container to override, value is the values you want to override.

  • integration_pattern (Optional[ServiceIntegrationPattern]) – 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

  • placement_constraints (Optional[List[PlacementConstraint]]) – Placement constraints. Default: No constraints

  • placement_strategies (Optional[List[PlacementStrategy]]) – Placement strategies. Default: No strategies

  • security_group (Optional[ISecurityGroup]) – 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

  • subnets (Optional[SubnetSelection]) – In what subnets to place the task’s ENIs. (Only applicable in case the TaskDefinition is configured for AwsVpc networking) Default: Private subnets

stability :stability: experimental

Attributes

cluster

The topic to run the task on.

stability :stability: experimental

Return type

ICluster

container_overrides

Container setting overrides.

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

stability :stability: experimental

Return type

Optional[List[ContainerOverride]]

integration_pattern

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 :default: FIRE_AND_FORGET

stability :stability: experimental

Return type

Optional[ServiceIntegrationPattern]

placement_constraints

Placement constraints.

default :default: No constraints

stability :stability: experimental

Return type

Optional[List[PlacementConstraint]]

placement_strategies

Placement strategies.

default :default: No strategies

stability :stability: experimental

Return type

Optional[List[PlacementStrategy]]

security_group

Existing security group to use for the task’s ENIs.

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

default :default: A new security group is created

stability :stability: experimental

Return type

Optional[ISecurityGroup]

subnets

In what subnets to place the task’s ENIs.

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

default :default: Private subnets

stability :stability: experimental

Return type

Optional[SubnetSelection]

task_definition

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

stability :stability: experimental

Return type

TaskDefinition