ComputeConfiguration
- class aws_cdk.aws_codebuild.ComputeConfiguration(*, disk=None, instance_type=None, machine_type=None, memory=None, v_cpu=None)
Bases:
objectThe 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 propertiesinstance_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: nonemachine_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 propertiesmemory (
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 propertiesv_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.
- 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