Class CfnFleet
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.codebuild.CfnFleet
- All Implemented Interfaces:
 IEnvironmentAware,IInspectable,ITaggableV2,IFleetRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
           date="2025-11-04T09:27:36.585Z")
@Stability(Stable)
public class CfnFleet
extends CfnResource
implements IInspectable, IFleetRef, ITaggableV2
The 
AWS::CodeBuild::Fleet resource configures a compute fleet, a set of dedicated instances for your build environment.
 Example:
 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.codebuild.*;
 CfnFleet cfnFleet = CfnFleet.Builder.create(this, "MyCfnFleet")
         .baseCapacity(123)
         .computeConfiguration(ComputeConfigurationProperty.builder()
                 .disk(123)
                 .instanceType("instanceType")
                 .machineType("machineType")
                 .memory(123)
                 .vCpu(123)
                 .build())
         .computeType("computeType")
         .environmentType("environmentType")
         .fleetProxyConfiguration(ProxyConfigurationProperty.builder()
                 .defaultBehavior("defaultBehavior")
                 .orderedProxyRules(List.of(FleetProxyRuleProperty.builder()
                         .effect("effect")
                         .entities(List.of("entities"))
                         .type("type")
                         .build()))
                 .build())
         .fleetServiceRole("fleetServiceRole")
         .fleetVpcConfig(VpcConfigProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnets(List.of("subnets"))
                 .vpcId("vpcId")
                 .build())
         .imageId("imageId")
         .name("name")
         .overflowBehavior("overflowBehavior")
         .scalingConfiguration(ScalingConfigurationInputProperty.builder()
                 .maxCapacity(123)
                 .scalingType("scalingType")
                 .targetTrackingScalingConfigs(List.of(TargetTrackingScalingConfigurationProperty.builder()
                         .metricType("metricType")
                         .targetValue(123)
                         .build()))
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
 - See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnFleet.static interfaceContains compute attributes.static interfaceInformation about the proxy rule for your reserved capacity instances.static interfaceInformation about the proxy configurations that apply network access control to your reserved capacity instances.static interfaceThe scaling configuration input of a compute fleet.static interfaceDefines when a new instance is auto-scaled into the compute fleet.static interfaceInformation about the VPC configuration that AWS CodeBuild accesses.Nested 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.IFleetRef
IFleetRef.Jsii$Default, IFleetRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnFleet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnFleet(software.amazon.jsii.JsiiObjectRef objRef) CfnFleet(software.constructs.Construct scope, String id, CfnFleetProps props)  - 
Method Summary
Modifier and TypeMethodDescriptionThe ARN of the compute fleet.The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel.Tag Manager which manages the tags for this resource.The compute configuration of the compute fleet.Information about the compute resources the compute fleet uses.The environment type of the compute fleet.Information about the proxy configurations that apply network access control to your reserved capacity instances.A reference to a Fleet resource.The service role associated with the compute fleet.Information about the VPC configuration that AWS CodeBuild accesses.The Amazon Machine Image (AMI) of the compute fleet.getName()The name of the compute fleet.The compute fleet overflow behavior.The scaling configuration of the compute fleet.getTags()A list of tag key and value pairs associated with this compute fleet.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetBaseCapacity(Number value) The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel.voidThe compute configuration of the compute fleet.voidThe compute configuration of the compute fleet.voidsetComputeType(String value) Information about the compute resources the compute fleet uses.voidsetEnvironmentType(String value) The environment type of the compute fleet.voidInformation about the proxy configurations that apply network access control to your reserved capacity instances.voidInformation about the proxy configurations that apply network access control to your reserved capacity instances.voidsetFleetServiceRole(String value) The service role associated with the compute fleet.voidsetFleetVpcConfig(IResolvable value) Information about the VPC configuration that AWS CodeBuild accesses.voidInformation about the VPC configuration that AWS CodeBuild accesses.voidsetImageId(String value) The Amazon Machine Image (AMI) of the compute fleet.voidThe name of the compute fleet.voidsetOverflowBehavior(String value) The compute fleet overflow behavior.voidThe scaling configuration of the compute fleet.voidThe scaling configuration of the compute fleet.voidA list of tag key and value pairs associated with this compute fleet.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson 
- 
Field Details
- 
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class. 
 - 
 - 
Constructor Details
- 
CfnFleet
protected CfnFleet(software.amazon.jsii.JsiiObjectRef objRef)  - 
CfnFleet
protected CfnFleet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  - 
CfnFleet
@Stability(Stable) public CfnFleet(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnFleetProps props) - Parameters:
 scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties.
 - 
CfnFleet
@Stability(Stable) public CfnFleet(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
 scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.
 
 - 
 - 
Method Details
- 
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
 inspectin interfaceIInspectable- Parameters:
 inspector- tree inspector to collect and process attributes. This parameter is required.
 - 
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
 renderPropertiesin classCfnResource- Parameters:
 props- This parameter is required.
 - 
getAttrArn
The ARN of the compute fleet. - 
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
 getCdkTagManagerin interfaceITaggableV2
 - 
getCfnProperties
- Overrides:
 getCfnPropertiesin classCfnResource
 - 
getFleetRef
A reference to a Fleet resource.- Specified by:
 getFleetRefin interfaceIFleetRef
 - 
getBaseCapacity
The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel. - 
setBaseCapacity
The initial number of machines allocated to the compute fleet, which defines the number of builds that can run in parallel. - 
getComputeConfiguration
The compute configuration of the compute fleet.Returns union: either
IResolvableorCfnFleet.ComputeConfigurationProperty - 
setComputeConfiguration
The compute configuration of the compute fleet. - 
setComputeConfiguration
@Stability(Stable) public void setComputeConfiguration(@Nullable CfnFleet.ComputeConfigurationProperty value) The compute configuration of the compute fleet. - 
getComputeType
Information about the compute resources the compute fleet uses.Available values include:.
 - 
setComputeType
Information about the compute resources the compute fleet uses.Available values include:.
 - 
getEnvironmentType
The environment type of the compute fleet. - 
setEnvironmentType
The environment type of the compute fleet. - 
getFleetProxyConfiguration
Information about the proxy configurations that apply network access control to your reserved capacity instances.Returns union: either
IResolvableorCfnFleet.ProxyConfigurationProperty - 
setFleetProxyConfiguration
Information about the proxy configurations that apply network access control to your reserved capacity instances. - 
setFleetProxyConfiguration
@Stability(Stable) public void setFleetProxyConfiguration(@Nullable CfnFleet.ProxyConfigurationProperty value) Information about the proxy configurations that apply network access control to your reserved capacity instances. - 
getFleetServiceRole
The service role associated with the compute fleet. - 
setFleetServiceRole
The service role associated with the compute fleet. - 
getFleetVpcConfig
Information about the VPC configuration that AWS CodeBuild accesses.Returns union: either
IResolvableorCfnFleet.VpcConfigProperty - 
setFleetVpcConfig
Information about the VPC configuration that AWS CodeBuild accesses. - 
setFleetVpcConfig
Information about the VPC configuration that AWS CodeBuild accesses. - 
getImageId
The Amazon Machine Image (AMI) of the compute fleet. - 
setImageId
The Amazon Machine Image (AMI) of the compute fleet. - 
getName
The name of the compute fleet. - 
setName
The name of the compute fleet. - 
getOverflowBehavior
The compute fleet overflow behavior. - 
setOverflowBehavior
The compute fleet overflow behavior. - 
getScalingConfiguration
The scaling configuration of the compute fleet.Returns union: either
IResolvableorCfnFleet.ScalingConfigurationInputProperty - 
setScalingConfiguration
The scaling configuration of the compute fleet. - 
setScalingConfiguration
@Stability(Stable) public void setScalingConfiguration(@Nullable CfnFleet.ScalingConfigurationInputProperty value) The scaling configuration of the compute fleet. - 
getTags
A list of tag key and value pairs associated with this compute fleet. - 
setTags
A list of tag key and value pairs associated with this compute fleet. 
 -