Skip to content
v2.277.0

EnvironmentType Enum ​

Build environment type.

Example ​

ts
import { Size } from 'aws-cdk-lib';

const fleet = new codebuild.Fleet(this, 'MyFleet', {
  baseCapacity: 1,
  computeType: codebuild.FleetComputeType.CUSTOM_INSTANCE_TYPE,
  environmentType: codebuild.EnvironmentType.LINUX_CONTAINER,
  computeConfiguration: {
    instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.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),
  },
});
python
from aws_cdk import Size


fleet = codebuild.Fleet(self, "MyFleet",
    base_capacity=1,
    compute_type=codebuild.FleetComputeType.CUSTOM_INSTANCE_TYPE,
    environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
    compute_configuration=codebuild.ComputeConfiguration(
        instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.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)
    )
)
java
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();
csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK;


var fleet = new Fleet(this, "MyFleet", new FleetProps {
    BaseCapacity = 1,
    ComputeType = FleetComputeType.CUSTOM_INSTANCE_TYPE,
    EnvironmentType = EnvironmentType.LINUX_CONTAINER,
    ComputeConfiguration = new ComputeConfiguration {
        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)
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/aws/aws-cdk-go/awscdk"


fleet := codebuild.NewFleet(this, jsii.String("MyFleet"), &FleetProps{
	BaseCapacity: jsii.Number(1),
	ComputeType: codebuild.FleetComputeType_CUSTOM_INSTANCE_TYPE,
	EnvironmentType: codebuild.EnvironmentType_LINUX_CONTAINER,
	ComputeConfiguration: &ComputeConfiguration{
		InstanceType: ec2.InstanceType_Of(ec2.InstanceClass_T3, ec2.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: awscdk.Size_Gibibytes(jsii.Number(10)),
	},
})

Members ​

MemberDescription
ARM_CONTAINERARM container.
LINUX_CONTAINERLinux container.
LINUX_GPU_CONTAINERLinux GPU container.
WINDOWS_SERVER_2019_CONTAINERWindows Server 2019 container.
WINDOWS_SERVER_2022_CONTAINERWindows Server 2022 container.
MAC_ARMMacOS ARM container.
LINUX_EC2Linux EC2.
ARM_EC2ARM EC2.
WINDOWS_EC2Windows EC2.

Referenced by ​

  • Fleet.environmentTypeenvironment_typeenvironmentTypeEnvironmentTypeEnvironmentType
  • FleetProps.environmentTypeenvironment_typeenvironmentTypeEnvironmentTypeEnvironmentType
  • IFleet.environmentTypeenvironment_typeenvironmentTypeEnvironmentTypeEnvironmentType