ContainerOverride Struct
| Source | aws-events-targets/lib/ecs-task-properties.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_events_targets as events_targets } from 'aws-cdk-lib';
const containerOverride: events_targets.ContainerOverride = {
containerName: 'containerName',
// the properties below are optional
command: ['command'],
cpu: 123,
environment: [{
name: 'name',
value: 'value',
}],
memoryLimit: 123,
memoryReservation: 123,
};
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_events_targets as events_targets
container_override = events_targets.ContainerOverride(
container_name="containerName",
# the properties below are optional
command=["command"],
cpu=123,
environment=[events_targets.TaskEnvironmentVariable(
name="name",
value="value"
)],
memory_limit=123,
memory_reservation=123
)
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.events.targets.*;
ContainerOverride containerOverride = ContainerOverride.builder()
.containerName("containerName")
// the properties below are optional
.command(List.of("command"))
.cpu(123)
.environment(List.of(TaskEnvironmentVariable.builder()
.name("name")
.value("value")
.build()))
.memoryLimit(123)
.memoryReservation(123)
.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.Events.Targets;
var containerOverride = new ContainerOverride {
ContainerName = "containerName",
// the properties below are optional
Command = new [] { "command" },
Cpu = 123,
Environment = new [] { new TaskEnvironmentVariable {
Name = "name",
Value = "value"
} },
MemoryLimit = 123,
MemoryReservation = 123
};
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"
containerOverride := &ContainerOverride{
ContainerName: jsii.String("containerName"),
// the properties below are optional
Command: []*string{
jsii.String("command"),
},
Cpu: jsii.Number(123),
Environment: []TaskEnvironmentVariable{
&TaskEnvironmentVariable{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
MemoryLimit: jsii.Number(123),
MemoryReservation: jsii.Number(123),
}
Properties
commandoptionalstring[]commandoptionaltyping.List[str]commandoptionalList<String>Commandoptionalstring[]Commandoptional*[]*string #Command to run inside the container.
Default: Default command
containerNamestringcontainer_namestrcontainerNameStringContainerNamestringContainerName*string required #Name of the container inside the task definition.
The number of cpu units reserved for the container.
Default: The default value from the task definition.
environmentoptionalTaskEnvironmentVariable[]environmentoptionaltyping.List[TaskEnvironmentVariable]environmentoptionalList<TaskEnvironmentVariable>EnvironmentoptionalTaskEnvironmentVariable[]Environmentoptional*[]TaskEnvironmentVariable #Variables to set in the container's environment.
memoryLimitoptionalnumbermemory_limitoptionalint | floatmemoryLimitoptionalNumberMemoryLimitoptionaldoubleMemoryLimitoptional*float64 #Hard memory limit on the container.
Default: The default value from the task definition.
memoryReservationoptionalnumbermemory_reservationoptionalint | floatmemoryReservationoptionalNumberMemoryReservationoptionaldoubleMemoryReservationoptional*float64 #Soft memory limit on the container.
Default: The default value from the task definition.