Interface FleetProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
FleetProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-11-17T14:40:47.510Z") @Stability(Stable) public interface FleetProps extends software.amazon.jsii.JsiiSerializable
Construction properties of a CodeBuild Fleet.

Example:

 import software.amazon.awscdk.Size;
 Fleet fleet = Fleet.Builder.create(this, "MyFleet")
         .baseCapacity(1)
         .computeType(FleetComputeType.CUSTOM_INSTANCE_TYPE)
         .environmentType(EnvironmentType.LINUX_CONTAINER)
         .computeConfiguration(ComputeConfiguration.builder()
                 .instanceType(InstanceType.of(InstanceClass.T3, 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))
                 .build())
         .build();
 
  • Method Details

    • getBaseCapacity

      @Stability(Stable) @NotNull Number getBaseCapacity()
      The number of machines allocated to the compute fleet. Defines the number of builds that can run in parallel.

      Minimum value of 1.

    • getComputeType

      @Stability(Stable) @NotNull FleetComputeType getComputeType()
      The instance type of the compute fleet.

      See Also:
    • getEnvironmentType

      @Stability(Stable) @NotNull EnvironmentType getEnvironmentType()
      The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.
    • getComputeConfiguration

      @Stability(Stable) @Nullable default ComputeConfiguration getComputeConfiguration()
      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.

      Default: - do not specify compute configuration

      See Also:
    • getFleetName

      @Stability(Stable) @Nullable default String getFleetName()
      The name of the Fleet.

      Default: - CloudFormation generated name

    • getOverflowBehavior

      @Stability(Stable) @Nullable default FleetOverflowBehavior getOverflowBehavior()
      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.

      Default: undefined - AWS CodeBuild default behavior is QUEUE

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      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.

      Default: - A role will be created if any permissions are granted

    • getSecurityGroups

      @Stability(Stable) @Nullable default List<ISecurityGroup> getSecurityGroups()
      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.

      Default: - A security group will be automatically created.

    • getSubnetSelection

      @Stability(Stable) @Nullable default SubnetSelection getSubnetSelection()
      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:

      1. Subnets with access to the internet (of type PRIVATE_WITH_EGRESS).
      2. 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.

      Default: - private subnets if available else public subnets

      See Also:
    • getVpc

      @Stability(Stable) @Nullable default IVpc getVpc()
      VPC network to place fleet instance network interfaces.

      Specify this if the fleet needs to access resources in a VPC.

      Default: - No VPC is specified.

    • builder

      @Stability(Stable) static FleetProps.Builder builder()
      Returns:
      a FleetProps.Builder of FleetProps