ComputeConfiguration Struct
The compute configuration for the fleet.
| Source | aws-codebuild/lib/fleet.ts |
|---|---|
| Type last changed |
Example
ts
import { Size } from 'aws-cdk-lib';
const fleet = new codebuild.Fleet(this, 'MyFleet', {
baseCapacity: 1,
computeType: codebuild.FleetComputeType.ATTRIBUTE_BASED,
environmentType: codebuild.EnvironmentType.LINUX_CONTAINER,
computeConfiguration: {
vCpu: 2,
memory: Size.gibibytes(4),
disk: Size.gibibytes(10),
machineType: codebuild.MachineType.GENERAL,
},
});
python
from aws_cdk import Size
fleet = codebuild.Fleet(self, "MyFleet",
base_capacity=1,
compute_type=codebuild.FleetComputeType.ATTRIBUTE_BASED,
environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
compute_configuration=codebuild.ComputeConfiguration(
v_cpu=2,
memory=Size.gibibytes(4),
disk=Size.gibibytes(10),
machine_type=codebuild.MachineType.GENERAL
)
)
java
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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK;
var fleet = new Fleet(this, "MyFleet", new FleetProps {
BaseCapacity = 1,
ComputeType = FleetComputeType.ATTRIBUTE_BASED,
EnvironmentType = EnvironmentType.LINUX_CONTAINER,
ComputeConfiguration = new ComputeConfiguration {
VCpu = 2,
Memory = Size.Gibibytes(4),
Disk = Size.Gibibytes(10),
MachineType = MachineType.GENERAL
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/aws/aws-cdk-go/awscdk"
fleet := codebuild.NewFleet(this, jsii.String("MyFleet"), &FleetProps{
BaseCapacity: jsii.Number(1),
ComputeType: codebuild.FleetComputeType_ATTRIBUTE_BASED,
EnvironmentType: codebuild.EnvironmentType_LINUX_CONTAINER,
ComputeConfiguration: &ComputeConfiguration{
VCpu: jsii.Number(2),
Memory: awscdk.Size_Gibibytes(jsii.Number(4)),
Disk: awscdk.Size_*Gibibytes(jsii.Number(10)),
MachineType: codebuild.MachineType_GENERAL,
},
})
Properties
When using ATTRIBUTE_BASED, 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
When using CUSTOM_INSTANCE_TYPE, the additional amount of disk space to provision over the 64GB included by default.
instanceTypeoptionalInstanceTypeinstance_typeoptionalInstanceTypeinstanceTypeoptionalInstanceTypeInstanceTypeoptionalInstanceTypeInstanceTypeoptionalInstanceType = none #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.
machineTypeoptionalMachineTypemachine_typeoptionalMachineTypemachineTypeoptionalMachineTypeMachineTypeoptionalMachineTypeMachineTypeoptionalMachineType #When using ATTRIBUTE_BASED, 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
When using ATTRIBUTE_BASED, 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
vCpuoptionalnumberv_cpuoptionalint | floatvCpuoptionalNumberVCpuoptionaldoubleVCpuoptional*float64 #When using ATTRIBUTE_BASED, 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