TaskDefinitionAttributes

class aws_cdk.aws_ecs.TaskDefinitionAttributes(*, task_definition_arn, network_mode=None, task_role=None, compatibility=None)

Bases: aws_cdk.aws_ecs.CommonTaskDefinitionAttributes

A reference to an existing task definition.

Parameters
  • task_definition_arn (str) – The arn of the task definition.

  • network_mode (Optional[NetworkMode]) – The networking mode to use for the containers in the task. Default: Network mode cannot be provided to the imported task.

  • task_role (Optional[IRole]) – The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf. Default: Permissions cannot be granted to the imported task.

  • compatibility (Optional[Compatibility]) – What launch types this task definition should be compatible with. Default: Compatibility.EC2_AND_FARGATE

Attributes

compatibility

What launch types this task definition should be compatible with.

Default

Compatibility.EC2_AND_FARGATE

Return type

Optional[Compatibility]

network_mode

The networking mode to use for the containers in the task.

Default

Network mode cannot be provided to the imported task.

Return type

Optional[NetworkMode]

task_definition_arn

The arn of the task definition.

Return type

str

task_role

The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.

Default

Permissions cannot be granted to the imported task.

Return type

Optional[IRole]