Class: AWSCDK::CodeBuild::ComputeConfiguration
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeBuild::ComputeConfiguration
- Defined in:
- code_build/compute_configuration.rb
Overview
The compute configuration for the fleet.
Instance Attribute Summary collapse
-
#disk ⇒ AWSCDK::Size?
readonly
When using ATTRIBUTE_BASED, the amount of disk space of the instance type included in your fleet.
-
#instance_type ⇒ AWSCDK::EC2::InstanceType?
readonly
When using CUSTOM_INSTANCE_TYPE, the EC2 instance type to use for fleet instances.
-
#machine_type ⇒ AWSCDK::CodeBuild::MachineType?
readonly
When using ATTRIBUTE_BASED, the machine type of the instance type included in your fleet.
-
#memory ⇒ AWSCDK::Size?
readonly
When using ATTRIBUTE_BASED, the amount of memory of the instance type included in your fleet.
-
#v_cpu ⇒ Numeric?
readonly
When using ATTRIBUTE_BASED, the number of vCPUs of the instance type included in your fleet.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(disk: nil, instance_type: nil, machine_type: nil, memory: nil, v_cpu: nil) ⇒ ComputeConfiguration
constructor
A new instance of ComputeConfiguration.
- #to_jsii ⇒ Object
Constructor Details
#initialize(disk: nil, instance_type: nil, machine_type: nil, memory: nil, v_cpu: nil) ⇒ ComputeConfiguration
Returns a new instance of ComputeConfiguration.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'code_build/compute_configuration.rb', line 12 def initialize(disk: nil, instance_type: nil, machine_type: nil, memory: nil, v_cpu: nil) @disk = disk Jsii::Type.check_type(@disk, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "disk") unless @disk.nil? @instance_type = instance_type Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkluc3RhbmNlVHlwZSJ9")), "instanceType") unless @instance_type.nil? @machine_type = machine_type Jsii::Type.check_type(@machine_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLk1hY2hpbmVUeXBlIn0=")), "machineType") unless @machine_type.nil? @memory = memory Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "memory") unless @memory.nil? @v_cpu = v_cpu Jsii::Type.check_type(@v_cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "vCpu") unless @v_cpu.nil? end |
Instance Attribute Details
#disk ⇒ AWSCDK::Size? (readonly)
Default: - No requirement, the actual value will be based on the other selected configuration properties
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.
33 34 35 |
# File 'code_build/compute_configuration.rb', line 33 def disk @disk end |
#instance_type ⇒ AWSCDK::EC2::InstanceType? (readonly)
Default: none
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.
42 43 44 |
# File 'code_build/compute_configuration.rb', line 42 def instance_type @instance_type end |
#machine_type ⇒ AWSCDK::CodeBuild::MachineType? (readonly)
Default: - No requirement, the actual value will be based on the other selected configuration properties
When using ATTRIBUTE_BASED, the machine type of the instance type included in your fleet.
47 48 49 |
# File 'code_build/compute_configuration.rb', line 47 def machine_type @machine_type end |
#memory ⇒ AWSCDK::Size? (readonly)
Default: - No requirement, the actual value will be based on the other selected configuration properties
When using ATTRIBUTE_BASED, the amount of memory of the instance type included in your fleet.
52 53 54 |
# File 'code_build/compute_configuration.rb', line 52 def memory @memory end |
#v_cpu ⇒ Numeric? (readonly)
Default: - No requirement, the actual value will be based on the other selected configuration properties
When using ATTRIBUTE_BASED, the number of vCPUs of the instance type included in your fleet.
57 58 59 |
# File 'code_build/compute_configuration.rb', line 57 def v_cpu @v_cpu end |
Class Method Details
.jsii_properties ⇒ Object
59 60 61 62 63 64 65 66 67 |
# File 'code_build/compute_configuration.rb', line 59 def self.jsii_properties { :disk => "disk", :instance_type => "instanceType", :machine_type => "machineType", :memory => "memory", :v_cpu => "vCpu", } end |
Instance Method Details
#to_jsii ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 |
# File 'code_build/compute_configuration.rb', line 69 def to_jsii result = {} result.merge!({ "disk" => @disk, "instanceType" => @instance_type, "machineType" => @machine_type, "memory" => @memory, "vCpu" => @v_cpu, }) result.compact end |