Interface ContainerOverride

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
ContainerOverride.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:10.280Z") @Stability(Stable) public interface ContainerOverride extends software.amazon.jsii.JsiiSerializable
A list of container overrides that specify the name of a container and the overrides it should receive.

Example:

 // 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.*;
 import software.amazon.awscdk.services.stepfunctions.tasks.*;
 ContainerDefinition containerDefinition;
 ContainerOverride containerOverride = ContainerOverride.builder()
         .containerDefinition(containerDefinition)
         // 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();
 
  • Method Details

    • getContainerDefinition

      @Stability(Stable) @NotNull ContainerDefinition getContainerDefinition()
      Name of the container inside the task definition.
    • getCommand

      @Stability(Stable) @Nullable default List<String> getCommand()
      Command to run inside the container.

      Default: - Default command from the Docker image or the task definition

    • getCpu

      @Stability(Stable) @Nullable default Number getCpu()
      The number of cpu units reserved for the container.

      Default: - The default value from the task definition.

    • getEnvironment

      @Stability(Stable) @Nullable default List<TaskEnvironmentVariable> getEnvironment()
      The environment variables to send to the container.

      You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.

      Default: - The existing environment variables from the Docker image or the task definition

    • getMemoryLimit

      @Stability(Stable) @Nullable default Number getMemoryLimit()
      The hard limit (in MiB) of memory to present to the container.

      Default: - The default value from the task definition.

    • getMemoryReservation

      @Stability(Stable) @Nullable default Number getMemoryReservation()
      The soft limit (in MiB) of memory to reserve for the container.

      Default: - The default value from the task definition.

    • builder

      @Stability(Stable) static ContainerOverride.Builder builder()
      Returns:
      a ContainerOverride.Builder of ContainerOverride