interface Ec2TaskDefinitionAttributes
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.ECS.Ec2TaskDefinitionAttributes | 
|  Java | software.amazon.awscdk.services.ecs.Ec2TaskDefinitionAttributes | 
|  Python | aws_cdk.aws_ecs.Ec2TaskDefinitionAttributes | 
|  TypeScript (source) | @aws-cdk/aws-ecs»Ec2TaskDefinitionAttributes | 
Attributes used to import an existing EC2 task definition.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ecs from '@aws-cdk/aws-ecs';
import * as iam from '@aws-cdk/aws-iam';
declare const role: iam.Role;
const ec2TaskDefinitionAttributes: ecs.Ec2TaskDefinitionAttributes = {
  taskDefinitionArn: 'taskDefinitionArn',
  // the properties below are optional
  networkMode: ecs.NetworkMode.NONE,
  taskRole: role,
};
Properties
| Name | Type | Description | 
|---|---|---|
| task | string | The arn of the task definition. | 
| network | Network | The networking mode to use for the containers in the task. | 
| task | IRole | The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf. | 
taskDefinitionArn
Type:
string
The arn of the task definition.
networkMode?
Type:
Network
(optional, default: Network mode cannot be provided to the imported task.)
The networking mode to use for the containers in the task.
taskRole?
Type:
IRole
(optional, default: Permissions cannot be granted to the imported task.)
The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
