Class ComputeEnvironmentProps.Builder
java.lang.Object
software.amazon.awscdk.services.batch.ComputeEnvironmentProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeEnvironmentProps>
- Enclosing interface:
- ComputeEnvironmentProps
@Stability(Experimental)
public static final class ComputeEnvironmentProps.Builder
extends Object
implements software.amazon.jsii.Builder<ComputeEnvironmentProps>
A builder for
ComputeEnvironmentProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.computeEnvironmentName
(String computeEnvironmentName) Sets the value ofComputeEnvironmentProps.getComputeEnvironmentName()
computeResources
(ComputeResources computeResources) Sets the value ofComputeEnvironmentProps.getComputeResources()
Sets the value ofComputeEnvironmentProps.getEnabled()
Sets the value ofComputeEnvironmentProps.getManaged()
serviceRole
(IRole serviceRole) Sets the value ofComputeEnvironmentProps.getServiceRole()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
computeEnvironmentName
@Stability(Experimental) public ComputeEnvironmentProps.Builder computeEnvironmentName(String computeEnvironmentName) Sets the value ofComputeEnvironmentProps.getComputeEnvironmentName()
- Parameters:
computeEnvironmentName
- A name for the compute environment. Up to 128 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.- Returns:
this
-
computeResources
@Stability(Experimental) public ComputeEnvironmentProps.Builder computeResources(ComputeResources computeResources) Sets the value ofComputeEnvironmentProps.getComputeResources()
- Parameters:
computeResources
- The details of the required compute resources for the managed compute environment. If specified, and this is an unmanaged compute environment, will throw an error.By default, AWS Batch managed compute environments use a recent, approved version of the Amazon ECS-optimized AMI for compute resources.
- Returns:
this
-
enabled
Sets the value ofComputeEnvironmentProps.getEnabled()
- Parameters:
enabled
- The state of the compute environment. If the state is set to true, then the compute environment accepts jobs from a queue and can scale out automatically based on queues.- Returns:
this
-
managed
Sets the value ofComputeEnvironmentProps.getManaged()
- Parameters:
managed
- Determines if AWS should manage the allocation of compute resources for processing jobs. If set to false, then you are in charge of providing the compute resource details.- Returns:
this
-
serviceRole
Sets the value ofComputeEnvironmentProps.getServiceRole()
- Parameters:
serviceRole
- The IAM role used by Batch to make calls to other AWS services on your behalf for managing the resources that you use with the service. By default, this role is created for you using the AWS managed service policy for Batch.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ComputeEnvironmentProps>
- Returns:
- a new instance of
ComputeEnvironmentProps
- Throws:
NullPointerException
- if any required attribute was not provided
-