Class UnmanagedComputeEnvironmentProps.Builder
java.lang.Object
software.amazon.awscdk.services.batch.UnmanagedComputeEnvironmentProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<UnmanagedComputeEnvironmentProps>
- Enclosing interface:
UnmanagedComputeEnvironmentProps
@Stability(Stable)
public static final class UnmanagedComputeEnvironmentProps.Builder
extends Object
implements software.amazon.jsii.Builder<UnmanagedComputeEnvironmentProps>
A builder for
UnmanagedComputeEnvironmentProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.computeEnvironmentName
(String computeEnvironmentName) Sets the value ofComputeEnvironmentProps.getComputeEnvironmentName()
Sets the value ofComputeEnvironmentProps.getEnabled()
serviceRole
(IRole serviceRole) Sets the value ofComputeEnvironmentProps.getServiceRole()
unmanagedvCpus
(Number unmanagedvCpus) Sets the value ofUnmanagedComputeEnvironmentProps.getUnmanagedvCpus()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
unmanagedvCpus
@Stability(Stable) public UnmanagedComputeEnvironmentProps.Builder unmanagedvCpus(Number unmanagedvCpus) Sets the value ofUnmanagedComputeEnvironmentProps.getUnmanagedvCpus()
- Parameters:
unmanagedvCpus
- The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs inQueue
s that useFairshareSchedulingPolicy
s. If this parameter is not provided on a fairshare queue, no capacity is reserved; that is, theFairshareSchedulingPolicy
is ignored.- Returns:
this
-
computeEnvironmentName
@Stability(Stable) public UnmanagedComputeEnvironmentProps.Builder computeEnvironmentName(String computeEnvironmentName) Sets the value ofComputeEnvironmentProps.getComputeEnvironmentName()
- Parameters:
computeEnvironmentName
- The name of the ComputeEnvironment.- Returns:
this
-
enabled
Sets the value ofComputeEnvironmentProps.getEnabled()
- Parameters:
enabled
- Whether or not this ComputeEnvironment can accept jobs from a Queue. Enabled ComputeEnvironments can accept jobs from a Queue and can scale instances up or down. Disabled ComputeEnvironments cannot accept jobs from a Queue or scale instances up or down.If you change a ComputeEnvironment from enabled to disabled while it is executing jobs, Jobs in the
STARTED
orRUNNING
states will not be interrupted. As jobs complete, the ComputeEnvironment will scale instances down tominvCpus
.To ensure you aren't billed for unused capacity, set
minvCpus
to0
.- Returns:
this
-
serviceRole
Sets the value ofComputeEnvironmentProps.getServiceRole()
- Parameters:
serviceRole
- The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<UnmanagedComputeEnvironmentProps>
- Returns:
- a new instance of
UnmanagedComputeEnvironmentProps
- Throws:
NullPointerException
- if any required attribute was not provided
-