Class Fleet
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.codebuild.Fleet
- All Implemented Interfaces:
IEnvironmentAware,IResource,IFleet,IConnectable,IGrantable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:00.999Z")
@Stability(Stable)
public class Fleet
extends Resource
implements IFleet
Fleet for a reserved capacity CodeBuild project.
Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects.
You will be charged for the resources in the fleet, even if they are idle.
Example:
Fleet fleet = Fleet.Builder.create(this, "Fleet")
.computeType(FleetComputeType.MEDIUM)
.environmentType(EnvironmentType.LINUX_CONTAINER)
.baseCapacity(1)
.build();
Project.Builder.create(this, "Project")
.environment(BuildEnvironment.builder()
.fleet(fleet)
.buildImage(LinuxBuildImage.STANDARD_7_0)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.codebuild.IFleet
IFleet.Jsii$Default, IFleet.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFleet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedFleet(software.amazon.jsii.JsiiObjectRef objRef) Fleet(software.constructs.Construct scope, String id, FleetProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IFleetfromFleetArn(software.constructs.Construct scope, String id, String fleetArn) Creates a Fleet construct that represents an external fleet.The compute type of the fleet.The network connections associated with this Fleet's security group(s) in the configured VPC.The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.The ARN of the fleet.The name of the fleet.The grant principal for this Fleet's service role.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
Fleet
protected Fleet(software.amazon.jsii.JsiiObjectRef objRef) -
Fleet
protected Fleet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Fleet
@Stability(Stable) public Fleet(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull FleetProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromFleetArn
@Stability(Stable) @NotNull public static IFleet fromFleetArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String fleetArn) Creates a Fleet construct that represents an external fleet.- Parameters:
scope- The scope creating construct (usuallythis). This parameter is required.id- The construct's id. This parameter is required.fleetArn- The ARN of the fleet. This parameter is required.
-
getComputeType
The compute type of the fleet.- Specified by:
getComputeTypein interfaceIFleet- See Also:
-
getConnections
The network connections associated with this Fleet's security group(s) in the configured VPC.- Specified by:
getConnectionsin interfaceIConnectable
-
getEnvironmentType
The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.- Specified by:
getEnvironmentTypein interfaceIFleet
-
getFleetArn
The ARN of the fleet.- Specified by:
getFleetArnin interfaceIFleet
-
getFleetName
The name of the fleet.- Specified by:
getFleetNamein interfaceIFleet
-
getGrantPrincipal
The grant principal for this Fleet's service role.- Specified by:
getGrantPrincipalin interfaceIGrantable
-