TaskDefinitionRevision

class aws_cdk.aws_ecs.TaskDefinitionRevision(*args: Any, **kwargs)

Bases: object

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

ExampleMetadata:

infused

Example:

# cluster: ecs.Cluster
# task_definition: ecs.TaskDefinition


ecs.ExternalService(self, "Service",
    cluster=cluster,
    task_definition=task_definition,
    desired_count=5,
    task_definition_revision=ecs.TaskDefinitionRevision.of(1)
)

ecs.ExternalService(self, "Service",
    cluster=cluster,
    task_definition=task_definition,
    desired_count=5,
    task_definition_revision=ecs.TaskDefinitionRevision.LATEST
)

Attributes

LATEST = <aws_cdk.aws_ecs.TaskDefinitionRevision object>
revision

The string representation of this revision.

Static Methods

classmethod of(revision)

Specific revision of a task.

Parameters:

revision (Union[int, float]) –

Return type:

TaskDefinitionRevision