ComputeConfiguration

class aws_cdk.aws_codebuild.ComputeConfiguration(*, disk=None, instance_type=None, machine_type=None, memory=None, v_cpu=None)

Bases: object

The compute configuration for the fleet.

Parameters:
  • disk (Optional[Size]) – When using ATTRIBUTE_BASED, the amount of disk space of the instance type included in your fleet. When using CUSTOM_INSTANCE_TYPE, the additional amount of disk space to provision over the 64GB included by default. Default: - No requirement, the actual value will be based on the other selected configuration properties

  • instance_type (Optional[InstanceType]) – When using CUSTOM_INSTANCE_TYPE, the EC2 instance type to use for fleet instances. Not all instance types are supported by CodeBuild. If you use a disallowed type, the CloudFormation deployment will fail. Default: none

  • machine_type (Optional[MachineType]) – When using ATTRIBUTE_BASED, the machine type of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties

  • memory (Optional[Size]) – When using ATTRIBUTE_BASED, the amount of memory of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties

  • v_cpu (Union[int, float, None]) – When using ATTRIBUTE_BASED, the number of vCPUs of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties

ExampleMetadata:

infused

Example:

from aws_cdk import Size


fleet = codebuild.Fleet(self, "MyFleet",
    base_capacity=1,
    compute_type=codebuild.FleetComputeType.ATTRIBUTE_BASED,
    environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
    compute_configuration=codebuild.ComputeConfiguration(
        v_cpu=2,
        memory=Size.gibibytes(4),
        disk=Size.gibibytes(10),
        machine_type=codebuild.MachineType.GENERAL
    )
)

Attributes

disk

When using ATTRIBUTE_BASED, the amount of disk space of the instance type included in your fleet.

When using CUSTOM_INSTANCE_TYPE, the additional amount of disk space to provision over the 64GB included by default.

Default:
  • No requirement, the actual value will be based on the other selected configuration properties

instance_type

When using CUSTOM_INSTANCE_TYPE, the EC2 instance type to use for fleet instances.

Not all instance types are supported by CodeBuild. If you use a disallowed type, the CloudFormation deployment will fail.

Default:

none

See:

https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types

machine_type

When using ATTRIBUTE_BASED, the machine type of the instance type included in your fleet.

Default:
  • No requirement, the actual value will be based on the other selected configuration properties

memory

When using ATTRIBUTE_BASED, the amount of memory of the instance type included in your fleet.

Default:
  • No requirement, the actual value will be based on the other selected configuration properties

v_cpu

When using ATTRIBUTE_BASED, the number of vCPUs of the instance type included in your fleet.

Default:
  • No requirement, the actual value will be based on the other selected configuration properties