IEc2TaskDefinition

class aws_cdk.aws_ecs.IEc2TaskDefinition(*args, **kwargs)

Bases: aws_cdk.aws_ecs.ITaskDefinition, typing_extensions.Protocol

The interface of a task definition run on an EC2 cluster.

__init__(*args, **kwargs)

Attributes

compatibility

What launch types this task definition should be compatible with.

Return type

Compatibility

execution_role

Execution role for this task definition.

Return type

Optional[IRole]

is_ec2_compatible

Return true if the task definition can be run on an EC2 cluster.

Return type

bool

is_fargate_compatible

Return true if the task definition can be run on a Fargate cluster.

Return type

bool

node

The construct node in the tree.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

task_definition_arn

ARN of this task definition.

attribute: :attribute:: true

Return type

str