Class ComputeConfiguration.Builder
java.lang.Object
software.amazon.awscdk.services.codebuild.ComputeConfiguration.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeConfiguration>
- Enclosing interface:
ComputeConfiguration
@Stability(Stable)
public static final class ComputeConfiguration.Builder
extends Object
implements software.amazon.jsii.Builder<ComputeConfiguration>
A builder for
ComputeConfiguration-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofComputeConfiguration.getDisk()instanceType(InstanceType instanceType) Sets the value ofComputeConfiguration.getInstanceType()machineType(MachineType machineType) Sets the value ofComputeConfiguration.getMachineType()Sets the value ofComputeConfiguration.getMemory()Sets the value ofComputeConfiguration.getVCpu()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
disk
Sets the value ofComputeConfiguration.getDisk()- Parameters:
disk- When using ATTRIBUTE_BASED, the amount of disk space of the instance type included in your fleet. When using CUSTOM_INSTANCE_TYPE, the additional amount of disk space to provision over the 64GB included by default.- Returns:
this
-
instanceType
Sets the value ofComputeConfiguration.getInstanceType()- Parameters:
instanceType- When using CUSTOM_INSTANCE_TYPE, the EC2 instance type to use for fleet instances. Not all instance types are supported by CodeBuild. If you use a disallowed type, the CloudFormation deployment will fail.- Returns:
this
-
machineType
Sets the value ofComputeConfiguration.getMachineType()- Parameters:
machineType- When using ATTRIBUTE_BASED, the machine type of the instance type included in your fleet.- Returns:
this
-
memory
Sets the value ofComputeConfiguration.getMemory()- Parameters:
memory- When using ATTRIBUTE_BASED, the amount of memory of the instance type included in your fleet.- Returns:
this
-
vCpu
Sets the value ofComputeConfiguration.getVCpu()- Parameters:
vCpu- When using ATTRIBUTE_BASED, the number of vCPUs of the instance type included in your fleet.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeConfiguration>- Returns:
- a new instance of
ComputeConfiguration - Throws:
NullPointerException- if any required attribute was not provided
-