6
6
7
7
/**
8
8
* Contains compute attributes. These attributes only need be specified when your project's or fleet's `computeType` is
9
- * set to `ATTRIBUTE_BASED_COMPUTE`.
9
+ * set to `ATTRIBUTE_BASED_COMPUTE` or `CUSTOM_INSTANCE_TYPE` .
10
10
*/
11
11
final class ComputeConfiguration
12
12
{
@@ -38,12 +38,20 @@ final class ComputeConfiguration
38
38
*/
39
39
private $ machineType ;
40
40
41
+ /**
42
+ * The EC2 instance type to be launched in your fleet.
43
+ *
44
+ * @var string|null
45
+ */
46
+ private $ instanceType ;
47
+
41
48
/**
42
49
* @param array{
43
50
* vCpu?: null|int,
44
51
* memory?: null|int,
45
52
* disk?: null|int,
46
53
* machineType?: null|MachineType::*,
54
+ * instanceType?: null|string,
47
55
* } $input
48
56
*/
49
57
public function __construct (array $ input )
@@ -52,6 +60,7 @@ public function __construct(array $input)
52
60
$ this ->memory = $ input ['memory ' ] ?? null ;
53
61
$ this ->disk = $ input ['disk ' ] ?? null ;
54
62
$ this ->machineType = $ input ['machineType ' ] ?? null ;
63
+ $ this ->instanceType = $ input ['instanceType ' ] ?? null ;
55
64
}
56
65
57
66
/**
@@ -60,6 +69,7 @@ public function __construct(array $input)
60
69
* memory?: null|int,
61
70
* disk?: null|int,
62
71
* machineType?: null|MachineType::*,
72
+ * instanceType?: null|string,
63
73
* }|ComputeConfiguration $input
64
74
*/
65
75
public static function create ($ input ): self
@@ -72,6 +82,11 @@ public function getDisk(): ?int
72
82
return $ this ->disk ;
73
83
}
74
84
85
+ public function getInstanceType (): ?string
86
+ {
87
+ return $ this ->instanceType ;
88
+ }
89
+
75
90
/**
76
91
* @return MachineType::*|null
77
92
*/
0 commit comments