Skip to content
v2.274.0

TaskDefinitionRevision Class ​

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

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 ​

The most recent revision of a task.
revisionstringrevisionstrrevisionStringRevisionstringRevision*stringrequired#
The string representation of this revision.

Methods ​

of(revision: number): TaskDefinitionRevision // chainable@staticmethod def of(revision: int | float) -> TaskDefinitionRevisionpublic static TaskDefinitionRevision of(Number revision)public static TaskDefinitionRevision Of(double revision)func Of(Revision *float64) TaskDefinitionRevisionstatic#
Specific revision of a task.