VersionConsistency Enum
State of the container version consistency feature.
| Source | aws-ecs/lib/container-definition.ts |
|---|---|
| Type last changed |
Example
ts
const taskDefinition = new ecs.Ec2TaskDefinition(this, 'TaskDef');
taskDefinition.addContainer('TheContainer', {
image: ecs.ContainerImage.fromRegistry('example-image'),
versionConsistency: ecs.VersionConsistency.DISABLED,
});
python
task_definition = ecs.Ec2TaskDefinition(self, "TaskDef")
task_definition.add_container("TheContainer",
image=ecs.ContainerImage.from_registry("example-image"),
version_consistency=ecs.VersionConsistency.DISABLED
)
java
Ec2TaskDefinition taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder()
.image(ContainerImage.fromRegistry("example-image"))
.versionConsistency(VersionConsistency.DISABLED)
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
var taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.AddContainer("TheContainer", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("example-image"),
VersionConsistency = VersionConsistency.DISABLED
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
taskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("TaskDef"))
taskDefinition.AddContainer(jsii.String("TheContainer"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("example-image")),
VersionConsistency: ecs.VersionConsistency_DISABLED,
})
Members
| Member | Description |
|---|---|
ENABLED | The version consistency feature is enabled for this container. |
DISABLED | The version consistency feature is disabled for this container. |
Referenced by
ContainerDefinitionOptions.versionConsistencyversion_consistencyversionConsistencyVersionConsistencyVersionConsistency