ContainerDependency

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

Bases: object

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

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

  • 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

See:

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

ExampleMetadata:

fixture=_generated

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: ecs.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

container

The container to depend on.