# FargateTaskDefinitionAttributes

Attributes used to import an existing Fargate task definition.

Extends: FargateTaskDefinitionAttributes
Extends: CommonTaskDefinitionAttributes

- Source: [`aws-ecs/lib/fargate/fargate-task-definition.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ecs/lib/fargate/fargate-task-definition.ts#L119)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const role: iam.Role;
const fargateTaskDefinitionAttributes: ecs.FargateTaskDefinitionAttributes = {
  taskDefinitionArn: 'taskDefinitionArn',

  // the properties below are optional
  executionRole: role,
  networkMode: ecs.NetworkMode.NONE,
  taskRole: role,
};
```

## Properties

- `executionRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) = undefined — The IAM role that grants containers and Fargate agents permission to make AWS API calls on your behalf.

  Some tasks do not have an execution role.

- `networkMode`: [NetworkMode](/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.NetworkMode.html) — The networking mode to use for the containers in the task.

  **Default:** Network mode cannot be provided to the imported task.

- `taskDefinitionArn`: string (required) — The arn of the task definition.

- `taskRole`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — 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.
