Class ContainerOverrides.Builder
java.lang.Object
software.amazon.awscdk.services.stepfunctions.tasks.ContainerOverrides.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ContainerOverrides>
- Enclosing interface:
ContainerOverrides
@Stability(Stable)
public static final class ContainerOverrides.Builder
extends Object
implements software.amazon.jsii.Builder<ContainerOverrides>
A builder for
ContainerOverrides
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofContainerOverrides.getCommand()
environment
(Map<String, String> environment) Sets the value ofContainerOverrides.getEnvironment()
Sets the value ofContainerOverrides.getGpuCount()
instanceType
(InstanceType instanceType) Sets the value ofContainerOverrides.getInstanceType()
Sets the value ofContainerOverrides.getMemory()
Sets the value ofContainerOverrides.getVcpus()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
command
Sets the value ofContainerOverrides.getCommand()
- Parameters:
command
- The command to send to the container that overrides the default command from the Docker image or the job definition.- Returns:
this
-
environment
Sets the value ofContainerOverrides.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 job definition.- Returns:
this
-
gpuCount
Sets the value ofContainerOverrides.getGpuCount()
- Parameters:
gpuCount
- The number of physical GPUs to reserve for the container. The number of GPUs reserved for all containers in a job should not exceed the number of available GPUs on the compute resource that the job is launched on.- Returns:
this
-
instanceType
Sets the value ofContainerOverrides.getInstanceType()
- Parameters:
instanceType
- The instance type to use for a multi-node parallel job. This parameter is not valid for single-node container jobs.- Returns:
this
-
memory
Sets the value ofContainerOverrides.getMemory()
- Parameters:
memory
- The number of MiB of memory reserved for the job. This value overrides the value set in the job definition.- Returns:
this
-
vcpus
Sets the value ofContainerOverrides.getVcpus()
- Parameters:
vcpus
- The number of vCPUs to reserve for the container. This value overrides the value set in the job definition.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ContainerOverrides>
- Returns:
- a new instance of
ContainerOverrides
- Throws:
NullPointerException
- if any required attribute was not provided
-