Class ContainerOverride.Builder
java.lang.Object
software.amazon.awscdk.services.stepfunctions.tasks.ContainerOverride.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ContainerOverride>
- Enclosing interface:
ContainerOverride
@Stability(Stable)
public static final class ContainerOverride.Builder
extends Object
implements software.amazon.jsii.Builder<ContainerOverride>
A builder for
ContainerOverride
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofContainerOverride.getCommand()
containerDefinition
(ContainerDefinition containerDefinition) Sets the value ofContainerOverride.getContainerDefinition()
Sets the value ofContainerOverride.getCpu()
environment
(List<? extends TaskEnvironmentVariable> environment) Sets the value ofContainerOverride.getEnvironment()
memoryLimit
(Number memoryLimit) Sets the value ofContainerOverride.getMemoryLimit()
memoryReservation
(Number memoryReservation) Sets the value ofContainerOverride.getMemoryReservation()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containerDefinition
@Stability(Stable) public ContainerOverride.Builder containerDefinition(ContainerDefinition containerDefinition) Sets the value ofContainerOverride.getContainerDefinition()
- Parameters:
containerDefinition
- Name of the container inside the task definition. This parameter is required.- Returns:
this
-
command
Sets the value ofContainerOverride.getCommand()
- Parameters:
command
- Command to run inside the container.- Returns:
this
-
cpu
Sets the value ofContainerOverride.getCpu()
- Parameters:
cpu
- The number of cpu units reserved for the container.- Returns:
this
-
environment
@Stability(Stable) public ContainerOverride.Builder environment(List<? extends TaskEnvironmentVariable> environment) Sets the value ofContainerOverride.getEnvironment()
- Parameters:
environment
- 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.- Returns:
this
-
memoryLimit
Sets the value ofContainerOverride.getMemoryLimit()
- Parameters:
memoryLimit
- The hard limit (in MiB) of memory to present to the container.- Returns:
this
-
memoryReservation
Sets the value ofContainerOverride.getMemoryReservation()
- Parameters:
memoryReservation
- The soft limit (in MiB) of memory to reserve for the container.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ContainerOverride>
- Returns:
- a new instance of
ContainerOverride
- Throws:
NullPointerException
- if any required attribute was not provided
-