Class UnmanagedComputeEnvironment.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<UnmanagedComputeEnvironment>
- Enclosing class:
UnmanagedComputeEnvironment
UnmanagedComputeEnvironment
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
computeEnvironmentName
(String computeEnvironmentName) The name of the ComputeEnvironment.Whether or not this ComputeEnvironment can accept jobs from a Queue.serviceRole
(IRole serviceRole) The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.unmanagedvCpus
(Number unmanagedvCpus) The vCPUs this Compute Environment provides.
-
Method Details
-
create
@Stability(Stable) public static UnmanagedComputeEnvironment.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
UnmanagedComputeEnvironment.Builder
.
-
computeEnvironmentName
@Stability(Stable) public UnmanagedComputeEnvironment.Builder computeEnvironmentName(String computeEnvironmentName) The name of the ComputeEnvironment.Default: - generated by CloudFormation
- Parameters:
computeEnvironmentName
- The name of the ComputeEnvironment. This parameter is required.- Returns:
this
-
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
.Default: true
- Parameters:
enabled
- Whether or not this ComputeEnvironment can accept jobs from a Queue. This parameter is required.- Returns:
this
-
serviceRole
The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs.Default: - a serviceRole will be created for managed CEs, none for unmanaged CEs
- Parameters:
serviceRole
- The role Batch uses to perform actions on your behalf in your account, such as provision instances to run your jobs. This parameter is required.- Returns:
this
-
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, the
FairshareSchedulingPolicy
is ignored.Default: 0
- Parameters:
unmanagedvCpus
- The vCPUs this Compute Environment provides. Used only by the scheduler to schedule jobs inQueue
s that useFairshareSchedulingPolicy
s. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<UnmanagedComputeEnvironment>
- Returns:
- a newly built instance of
UnmanagedComputeEnvironment
.
-