Class FleetProps.Builder

java.lang.Object
software.amazon.awscdk.services.codebuild.FleetProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<FleetProps>
Enclosing interface:
FleetProps

@Stability(Stable) public static final class FleetProps.Builder extends Object implements software.amazon.jsii.Builder<FleetProps>
A builder for FleetProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • baseCapacity

      @Stability(Stable) public FleetProps.Builder baseCapacity(Number baseCapacity)
      Parameters:
      baseCapacity - The number of machines allocated to the compute fleet. Defines the number of builds that can run in parallel. This parameter is required. Minimum value of 1.
      Returns:
      this
    • computeType

      @Stability(Stable) public FleetProps.Builder computeType(FleetComputeType computeType)
      Sets the value of FleetProps.getComputeType()
      Parameters:
      computeType - The instance type of the compute fleet. This parameter is required.
      Returns:
      this
    • environmentType

      @Stability(Stable) public FleetProps.Builder environmentType(EnvironmentType environmentType)
      Parameters:
      environmentType - The build environment (operating system/architecture/accelerator) type made available to projects using this fleet. This parameter is required.
      Returns:
      this
    • computeConfiguration

      @Stability(Stable) public FleetProps.Builder computeConfiguration(ComputeConfiguration computeConfiguration)
      Parameters:
      computeConfiguration - 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.
      Returns:
      this
    • fleetName

      @Stability(Stable) public FleetProps.Builder fleetName(String fleetName)
      Sets the value of FleetProps.getFleetName()
      Parameters:
      fleetName - The name of the Fleet.
      Returns:
      this
    • overflowBehavior

      @Stability(Stable) public FleetProps.Builder overflowBehavior(FleetOverflowBehavior overflowBehavior)
      Parameters:
      overflowBehavior - 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.

      Returns:
      this
    • role

      @Stability(Stable) public FleetProps.Builder role(IRole role)
      Sets the value of FleetProps.getRole()
      Parameters:
      role - 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.
      Returns:
      this
    • securityGroups

      @Stability(Stable) public FleetProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups)
      Parameters:
      securityGroups - 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.
      Returns:
      this
    • subnetSelection

      @Stability(Stable) public FleetProps.Builder subnetSelection(SubnetSelection subnetSelection)
      Parameters:
      subnetSelection - 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.

      Returns:
      this
    • vpc

      @Stability(Stable) public FleetProps.Builder vpc(IVpc vpc)
      Sets the value of FleetProps.getVpc()
      Parameters:
      vpc - VPC network to place fleet instance network interfaces. Specify this if the fleet needs to access resources in a VPC.
      Returns:
      this
    • build

      @Stability(Stable) public FleetProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<FleetProps>
      Returns:
      a new instance of FleetProps
      Throws:
      NullPointerException - if any required attribute was not provided