interface FleetProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.CodeBuild.FleetProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#FleetProps |
Java | software.amazon.awscdk.services.codebuild.FleetProps |
Python | aws_cdk.aws_codebuild.FleetProps |
TypeScript (source) | aws-cdk-lib » aws_codebuild » FleetProps |
Construction properties of a CodeBuild Fleet.
Example
import { Size } from 'aws-cdk-lib';
const fleet = new codebuild.Fleet(this, 'MyFleet', {
baseCapacity: 1,
computeType: codebuild.FleetComputeType.CUSTOM_INSTANCE_TYPE,
environmentType: codebuild.EnvironmentType.LINUX_CONTAINER,
computeConfiguration: {
instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
// By default, 64 GiB of disk space is included. Any value optionally
// specified here is _incremental_ on top of the included disk space.
disk: Size.gibibytes(10),
},
});
Properties
| Name | Type | Description |
|---|---|---|
| base | number | The number of machines allocated to the compute fleet. Defines the number of builds that can run in parallel. |
| compute | Fleet | The instance type of the compute fleet. |
| environment | Environment | The build environment (operating system/architecture/accelerator) type made available to projects using this fleet. |
| compute | Compute | The compute configuration of the compute fleet. |
| fleet | string | The name of the Fleet. |
| overflow | Fleet | The compute fleet overflow behavior. |
| role? | IRole | Service Role assumed by Fleet instances. |
| security | ISecurity[] | What security groups to associate with the fleet's network interfaces. If none are provided, one will be created automatically. |
| subnet | Subnet | Where to place the network interfaces within the VPC. |
| vpc? | IVpc | VPC network to place fleet instance network interfaces. |
baseCapacity
Type:
number
The number of machines allocated to the compute fleet. Defines the number of builds that can run in parallel.
Minimum value of 1.
computeType
Type:
Fleet
The instance type of the compute fleet.
environmentType
Type:
Environment
The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.
computeConfiguration?
Type:
Compute
(optional, default: do not specify compute configuration)
The compute configuration of the compute fleet.
This is only permitted if computeType is set to ATTRIBUTE_BASED or
CUSTOM_INSTANCE_TYPE. In such cases, this is required.
fleetName?
Type:
string
(optional, default: CloudFormation generated name)
The name of the Fleet.
overflowBehavior?
Type:
Fleet
(optional, default: undefined - AWS CodeBuild default behavior is QUEUE)
The compute fleet overflow behavior.
For overflow behavior QUEUE, overflow builds need to wait on the existing fleet instances to become available.
For overflow behavior ON_DEMAND, overflow builds run on CodeBuild on-demand.
role?
Type:
IRole
(optional, default: A role will be created if any permissions are granted)
Service Role assumed by Fleet instances.
This Role is not used by Project builds running on Fleet instances; Project
builds assume the role on Project instead.
securityGroups?
Type:
ISecurity[]
(optional, default: A security group will be automatically created.)
What security groups to associate with the fleet's network interfaces. If none are provided, one will be created automatically.
Only used if vpc is supplied.
subnetSelection?
Type:
Subnet
(optional, default: private subnets if available else public subnets)
Where to place the network interfaces within the VPC.
To access AWS services, your fleet needs to be in one of the following types of subnets:
- Subnets with access to the internet (of type PRIVATE_WITH_EGRESS).
- Private subnets unconnected to the internet, but with VPC endpoints for the necessary services.
If you don't specify a subnet selection, the default behavior is to use PRIVATE_WITH_EGRESS subnets first if they exist, then PRIVATE_WITHOUT_EGRESS, and finally PUBLIC subnets. If your VPC doesn't have PRIVATE_WITH_EGRESS subnets but you need AWS service access, add VPC Endpoints to your private subnets.
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html
vpc?
Type:
IVpc
(optional, default: No VPC is specified.)
VPC network to place fleet instance network interfaces.
Specify this if the fleet needs to access resources in a VPC.

.NET
Go
Java
Python
TypeScript (