Interface ComputeConfiguration
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ComputeConfiguration.Jsii$Proxy
Despite what the CloudFormation schema says, the numeric properties (disk, memory, vCpu) are not optional.
An undefined value will cause the CloudFormation deployment to fail, e.g.
Cannot invoke "java.lang.Integer.intValue()" because the return value of "software.amazon.codebuild.fleet.ComputeConfiguration.getMemory()" is null Therefore, these properties default value is set to 0.
Example:
import software.amazon.awscdk.Size;
Fleet fleet = Fleet.Builder.create(this, "MyFleet")
.baseCapacity(1)
.computeType(FleetComputeType.ATTRIBUTE_BASED)
.environmentType(EnvironmentType.LINUX_CONTAINER)
.computeConfiguration(ComputeConfiguration.builder()
.vCpu(2)
.memory(Size.gibibytes(4))
.disk(Size.gibibytes(10))
.machineType(MachineType.GENERAL)
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forComputeConfigurationstatic final classAn implementation forComputeConfiguration -
Method Summary
Modifier and TypeMethodDescriptionstatic ComputeConfiguration.Builderbuilder()default SizegetDisk()The amount of disk space of the instance type included in your fleet.default MachineTypeThe machine type of the instance type included in your fleet.default SizeThe amount of memory of the instance type included in your fleet.default NumbergetVCpu()The number of vCPUs of the instance type included in your fleet.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDisk
The amount of disk space of the instance type included in your fleet.Default: - No requirement, the actual value will be based on the other selected configuration properties
-
getMachineType
The machine type of the instance type included in your fleet.Default: - No requirement, the actual value will be based on the other selected configuration properties
-
getMemory
The amount of memory of the instance type included in your fleet.Default: - No requirement, the actual value will be based on the other selected configuration properties
-
getVCpu
The number of vCPUs of the instance type included in your fleet.Default: - No requirement, the actual value will be based on the other selected configuration properties
-
builder
- Returns:
- a
ComputeConfiguration.BuilderofComputeConfiguration
-