Class BatchContainerOverrides.Builder
java.lang.Object
software.amazon.awscdk.services.stepfunctions.tasks.BatchContainerOverrides.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BatchContainerOverrides>
- Enclosing interface:
BatchContainerOverrides
@Stability(Stable)
public static final class BatchContainerOverrides.Builder
extends Object
implements software.amazon.jsii.Builder<BatchContainerOverrides>
A builder for
BatchContainerOverrides
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofBatchContainerOverrides.getCommand()
environment
(Map<String, String> environment) Sets the value ofBatchContainerOverrides.getEnvironment()
Sets the value ofBatchContainerOverrides.getGpuCount()
instanceType
(InstanceType instanceType) Sets the value ofBatchContainerOverrides.getInstanceType()
Sets the value ofBatchContainerOverrides.getMemory()
Sets the value ofBatchContainerOverrides.getVcpus()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
command
Sets the value ofBatchContainerOverrides.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
@Stability(Stable) public BatchContainerOverrides.Builder environment(Map<String, String> environment) Sets the value ofBatchContainerOverrides.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 ofBatchContainerOverrides.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 ofBatchContainerOverrides.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 ofBatchContainerOverrides.getMemory()
- Parameters:
memory
- Memory reserved for the job.- Returns:
this
-
vcpus
Sets the value ofBatchContainerOverrides.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<BatchContainerOverrides>
- Returns:
- a new instance of
BatchContainerOverrides
- Throws:
NullPointerException
- if any required attribute was not provided
-