Class Fleet.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Fleet>
- Enclosing class:
Fleet
Fleet.-
Method Summary
Modifier and TypeMethodDescriptionbaseCapacity(Number baseCapacity) The number of machines allocated to the compute fleet.build()computeConfiguration(ComputeConfiguration computeConfiguration) The compute configuration of the compute fleet.computeType(FleetComputeType computeType) The instance type of the compute fleet.static Fleet.BuilderenvironmentType(EnvironmentType environmentType) The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.The name of the Fleet.overflowBehavior(FleetOverflowBehavior overflowBehavior) The compute fleet overflow behavior.Service Role assumed by Fleet instances.securityGroups(List<? extends ISecurityGroup> securityGroups) What security groups to associate with the fleet's network interfaces.subnetSelection(SubnetSelection subnetSelection) Where to place the network interfaces within the VPC.VPC network to place fleet instance network interfaces.
-
Method Details
-
create
@Stability(Stable) public static Fleet.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope- This parameter is required.id- This parameter is required.- Returns:
- a new instance of
Fleet.Builder.
-
baseCapacity
The number of machines allocated to the compute fleet. Defines the number of builds that can run in parallel.Minimum value of 1.
- 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.- Returns:
this
-
computeType
The instance type of the compute fleet.- Parameters:
computeType- The instance type of the compute fleet. This parameter is required.- Returns:
this- See Also:
-
environmentType
The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.- 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 Fleet.Builder computeConfiguration(ComputeConfiguration computeConfiguration) The compute configuration of the compute fleet.This is only permitted if
computeTypeis set to ATTRIBUTE_BASED or CUSTOM_INSTANCE_TYPE. In such cases, this is required.Default: - do not specify compute configuration
- Parameters:
computeConfiguration- The compute configuration of the compute fleet. This parameter is required.- Returns:
this- See Also:
-
fleetName
The name of the Fleet.Default: - CloudFormation generated name
- Parameters:
fleetName- The name of the Fleet. This parameter is required.- Returns:
this
-
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.Default: undefined - AWS CodeBuild default behavior is QUEUE
- Parameters:
overflowBehavior- The compute fleet overflow behavior. This parameter is required.- Returns:
this
-
role
Service Role assumed by Fleet instances.This Role is not used by Project builds running on Fleet instances; Project builds assume the
roleon Project instead.Default: - A role will be created if any permissions are granted
- Parameters:
role- Service Role assumed by Fleet instances. This parameter is required.- Returns:
this
-
securityGroups
@Stability(Stable) public Fleet.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) What security groups to associate with the fleet's network interfaces. If none are provided, one will be created automatically.Only used if
vpcis supplied.Default: - A security group will be automatically created.
- Parameters:
securityGroups- What security groups to associate with the fleet's network interfaces. If none are provided, one will be created automatically. This parameter is required.- Returns:
this
-
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:
- 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.
Default: - private subnets if available else public subnets
- Parameters:
subnetSelection- Where to place the network interfaces within the VPC. This parameter is required.- Returns:
this- See Also:
-
vpc
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.
- Parameters:
vpc- VPC network to place fleet instance network interfaces. This parameter is required.- Returns:
this
-
build
-