Skip to content
v2.274.0

ContainerDependency Struct ​

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

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';

declare const containerDefinition: ecs.ContainerDefinition;
const containerDependency: ecs.ContainerDependency = {
  container: containerDefinition,

  // the properties below are optional
  condition: ecs.ContainerDependencyCondition.START,
};

Properties ​

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

Default: ContainerDependencyCondition.HEALTHY

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

The container to depend on.