Class ContainerOverride.Builder
java.lang.Object
software.amazon.awscdk.services.events.targets.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()
containerName
(String containerName) Sets the value ofContainerOverride.getContainerName()
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
-
containerName
Sets the value ofContainerOverride.getContainerName()
- Parameters:
containerName
- 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
- Variables to set in the container's environment.- Returns:
this
-
memoryLimit
Sets the value ofContainerOverride.getMemoryLimit()
- Parameters:
memoryLimit
- Hard memory limit on the container.- Returns:
this
-
memoryReservation
Sets the value ofContainerOverride.getMemoryReservation()
- Parameters:
memoryReservation
- Soft memory limit on 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
-