ContainerDependency

class aws_cdk.aws_ecs.ContainerDependency(*, condition=None, container)

Bases: object

The details of a dependency on another container in the task definition.

Parameters
  • condition (Optional[ContainerDependencyCondition]) – The state the container needs to be in to satisfy the dependency and proceed with startup. Valid values are ContainerDependencyCondition.START, ContainerDependencyCondition.COMPLETE, ContainerDependencyCondition.SUCCESS and ContainerDependencyCondition.HEALTHY. Default: ContainerDependencyCondition.HEALTHY

  • container (ContainerDefinition) – The container to depend on.

See

https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDependency.html

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ecs as ecs

# container_definition is of type ContainerDefinition

container_dependency = ecs.ContainerDependency(
    container=container_definition,

    # the properties below are optional
    condition=ecs.ContainerDependencyCondition.START
)

Attributes

condition

The state the container needs to be in to satisfy the dependency and proceed with startup.

Valid values are ContainerDependencyCondition.START, ContainerDependencyCondition.COMPLETE, ContainerDependencyCondition.SUCCESS and ContainerDependencyCondition.HEALTHY.

Default

ContainerDependencyCondition.HEALTHY

Return type

Optional[ContainerDependencyCondition]

container

The container to depend on.

Return type

ContainerDefinition