Skip to content

Commit 1940093

Browse files
Update generated code (#1884)
update generated code
1 parent 566d388 commit 1940093

File tree

6 files changed

+22
-1
lines changed

6 files changed

+22
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- AWS api-change: This release adds support for environment type WINDOWS_SERVER_2022_CONTAINER in ProjectEnvironment
88
- AWS api-change: Added `us-isob-east-1` region.
9+
- AWS api-change: Add support for custom instance type for reserved capacity fleets
910

1011
### Changed
1112

src/Enum/ComputeType.php

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ final class ComputeType
1515
public const BUILD_LAMBDA_2GB = 'BUILD_LAMBDA_2GB';
1616
public const BUILD_LAMBDA_4GB = 'BUILD_LAMBDA_4GB';
1717
public const BUILD_LAMBDA_8GB = 'BUILD_LAMBDA_8GB';
18+
public const CUSTOM_INSTANCE_TYPE = 'CUSTOM_INSTANCE_TYPE';
1819

1920
public static function exists(string $value): bool
2021
{
@@ -30,6 +31,7 @@ public static function exists(string $value): bool
3031
self::BUILD_LAMBDA_2GB => true,
3132
self::BUILD_LAMBDA_4GB => true,
3233
self::BUILD_LAMBDA_8GB => true,
34+
self::CUSTOM_INSTANCE_TYPE => true,
3335
][$value]);
3436
}
3537
}

src/Result/BatchGetBuildsOutput.php

+1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ private function populateResultComputeConfiguration(array $json): ComputeConfigu
243243
'memory' => isset($json['memory']) ? (int) $json['memory'] : null,
244244
'disk' => isset($json['disk']) ? (int) $json['disk'] : null,
245245
'machineType' => isset($json['machineType']) ? (string) $json['machineType'] : null,
246+
'instanceType' => isset($json['instanceType']) ? (string) $json['instanceType'] : null,
246247
]);
247248
}
248249

src/Result/StartBuildOutput.php

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ private function populateResultComputeConfiguration(array $json): ComputeConfigu
193193
'memory' => isset($json['memory']) ? (int) $json['memory'] : null,
194194
'disk' => isset($json['disk']) ? (int) $json['disk'] : null,
195195
'machineType' => isset($json['machineType']) ? (string) $json['machineType'] : null,
196+
'instanceType' => isset($json['instanceType']) ? (string) $json['instanceType'] : null,
196197
]);
197198
}
198199

src/Result/StopBuildOutput.php

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ private function populateResultComputeConfiguration(array $json): ComputeConfigu
193193
'memory' => isset($json['memory']) ? (int) $json['memory'] : null,
194194
'disk' => isset($json['disk']) ? (int) $json['disk'] : null,
195195
'machineType' => isset($json['machineType']) ? (string) $json['machineType'] : null,
196+
'instanceType' => isset($json['instanceType']) ? (string) $json['instanceType'] : null,
196197
]);
197198
}
198199

src/ValueObject/ComputeConfiguration.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/**
88
* 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`.
1010
*/
1111
final class ComputeConfiguration
1212
{
@@ -38,12 +38,20 @@ final class ComputeConfiguration
3838
*/
3939
private $machineType;
4040

41+
/**
42+
* The EC2 instance type to be launched in your fleet.
43+
*
44+
* @var string|null
45+
*/
46+
private $instanceType;
47+
4148
/**
4249
* @param array{
4350
* vCpu?: null|int,
4451
* memory?: null|int,
4552
* disk?: null|int,
4653
* machineType?: null|MachineType::*,
54+
* instanceType?: null|string,
4755
* } $input
4856
*/
4957
public function __construct(array $input)
@@ -52,6 +60,7 @@ public function __construct(array $input)
5260
$this->memory = $input['memory'] ?? null;
5361
$this->disk = $input['disk'] ?? null;
5462
$this->machineType = $input['machineType'] ?? null;
63+
$this->instanceType = $input['instanceType'] ?? null;
5564
}
5665

5766
/**
@@ -60,6 +69,7 @@ public function __construct(array $input)
6069
* memory?: null|int,
6170
* disk?: null|int,
6271
* machineType?: null|MachineType::*,
72+
* instanceType?: null|string,
6373
* }|ComputeConfiguration $input
6474
*/
6575
public static function create($input): self
@@ -72,6 +82,11 @@ public function getDisk(): ?int
7282
return $this->disk;
7383
}
7484

85+
public function getInstanceType(): ?string
86+
{
87+
return $this->instanceType;
88+
}
89+
7590
/**
7691
* @return MachineType::*|null
7792
*/

0 commit comments

Comments
 (0)