# TaskDefinitionRevision

Represents revision of a task definition, either a specific numbered revision or the `latest` revision.

- Source: [`aws-ecs/lib/base/task-definition.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ecs/lib/base/task-definition.ts#L1462)
- Type last changed: v2.116.0 · 22 Dec 2023

## Example

```ts
declare const cluster: ecs.Cluster;
declare const taskDefinition: ecs.TaskDefinition;

new ecs.ExternalService(this, 'Service', {
  cluster,
  taskDefinition,
  desiredCount: 5,
  minHealthyPercent: 100,
  taskDefinitionRevision: ecs.TaskDefinitionRevision.of(1),
});

new ecs.ExternalService(this, 'Service', {
  cluster,
  taskDefinition,
  desiredCount: 5,
  minHealthyPercent: 100,
  taskDefinitionRevision: ecs.TaskDefinitionRevision.LATEST,
});
```

## Properties

- `LATEST`: [TaskDefinitionRevision](/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.TaskDefinitionRevision.html) (static) — The most recent revision of a task.

- `revision`: string — The string representation of this revision.

## Methods

- `of(revision: number): TaskDefinitionRevision // chainable` (static) — Specific revision of a task.
