EcsTaskProps

class aws_cdk.aws_events_targets.EcsTaskProps(*, cluster, task_definition, container_overrides=None, security_group=None, subnet_selection=None, task_count=None)

Bases: object

__init__(*, cluster, task_definition, container_overrides=None, security_group=None, subnet_selection=None, task_count=None)

Properties to define an ECS Event Task.

Parameters
  • cluster (ICluster) – Cluster where service will be deployed.

  • task_definition (TaskDefinition) – Task Definition of the task that should be started.

  • 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.

  • 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

  • subnet_selection (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

  • task_count (Union[int, float, None]) – How many tasks should be started when this event is triggered. Default: 1

Attributes

cluster

Cluster where service will be deployed.

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.

Return type

Optional[List[ContainerOverride]]

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

Return type

Optional[ISecurityGroup]

subnet_selection

In what subnets to place the task’s ENIs.

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

default :default: Private subnets

Return type

Optional[SubnetSelection]

task_count

How many tasks should be started when this event is triggered.

default :default: 1

Return type

Union[int, float, None]

task_definition

Task Definition of the task that should be started.

Return type

TaskDefinition