ContainerDependency Struct
The details of a dependency on another container in the task definition.
| Source | aws-ecs/lib/container-definition.ts |
|---|
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,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs
# container_definition: ecs.ContainerDefinition
container_dependency = ecs.ContainerDependency(
container=container_definition,
# the properties below are optional
condition=ecs.ContainerDependencyCondition.START
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
ContainerDefinition containerDefinition;
ContainerDependency containerDependency = ContainerDependency.builder()
.container(containerDefinition)
// the properties below are optional
.condition(ContainerDependencyCondition.START)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
ContainerDefinition containerDefinition;
var containerDependency = new ContainerDependency {
Container = containerDefinition,
// the properties below are optional
Condition = ContainerDependencyCondition.START
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var containerDefinition ContainerDefinition
containerDependency := &ContainerDependency{
Container: containerDefinition,
// the properties below are optional
Condition: awscdk.Aws_ecs.ContainerDependencyCondition_START,
}
Properties
conditionoptionalContainerDependencyConditionconditionoptionalContainerDependencyConditionconditionoptionalContainerDependencyConditionConditionoptionalContainerDependencyConditionConditionoptionalContainerDependencyCondition #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.
containerContainerDefinitioncontainerContainerDefinitioncontainerContainerDefinitionContainerContainerDefinitionContainerContainerDefinition required #The container to depend on.