@@ -62,48 +62,62 @@ final class ProjectEnvironment
62
62
/**
63
63
* Information about the compute resources the build project uses. Available values include:
64
64
*
65
- * - `BUILD_GENERAL1_SMALL`: Use up to 3 GB memory and 2 vCPUs for builds.
66
- * - `BUILD_GENERAL1_MEDIUM`: Use up to 7 GB memory and 4 vCPUs for builds.
67
- * - `BUILD_GENERAL1_LARGE`: Use up to 16 GB memory and 8 vCPUs for builds, depending on your environment type.
68
- * - `BUILD_GENERAL1_XLARGE`: Use up to 70 GB memory and 36 vCPUs for builds, depending on your environment type.
69
- * - `BUILD_GENERAL1_2XLARGE`: Use up to 145 GB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute
65
+ * - `ATTRIBUTE_BASED_COMPUTE`: Specify the amount of vCPUs, memory, disk space, and the type of machine.
66
+ *
67
+ * > If you use `ATTRIBUTE_BASED_COMPUTE`, you must define your attributes by using `computeConfiguration`. CodeBuild
68
+ * > will select the cheapest instance that satisfies your specified attributes. For more information, see Reserved
69
+ * > capacity environment types [^1] in the *CodeBuild User Guide*.
70
+ *
71
+ * - `BUILD_GENERAL1_SMALL`: Use up to 4 GiB memory and 2 vCPUs for builds.
72
+ * - `BUILD_GENERAL1_MEDIUM`: Use up to 8 GiB memory and 4 vCPUs for builds.
73
+ * - `BUILD_GENERAL1_LARGE`: Use up to 16 GiB memory and 8 vCPUs for builds, depending on your environment type.
74
+ * - `BUILD_GENERAL1_XLARGE`: Use up to 72 GiB memory and 36 vCPUs for builds, depending on your environment type.
75
+ * - `BUILD_GENERAL1_2XLARGE`: Use up to 144 GiB memory, 72 vCPUs, and 824 GB of SSD storage for builds. This compute
70
76
* type supports Docker images up to 100 GB uncompressed.
71
- * - `BUILD_LAMBDA_1GB`: Use up to 1 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER`
77
+ * - `BUILD_LAMBDA_1GB`: Use up to 1 GiB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER`
72
78
* and `ARM_LAMBDA_CONTAINER`.
73
- * - `BUILD_LAMBDA_2GB`: Use up to 2 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER`
79
+ * - `BUILD_LAMBDA_2GB`: Use up to 2 GiB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER`
74
80
* and `ARM_LAMBDA_CONTAINER`.
75
- * - `BUILD_LAMBDA_4GB`: Use up to 4 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER`
81
+ * - `BUILD_LAMBDA_4GB`: Use up to 4 GiB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER`
76
82
* and `ARM_LAMBDA_CONTAINER`.
77
- * - `BUILD_LAMBDA_8GB`: Use up to 8 GB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER`
83
+ * - `BUILD_LAMBDA_8GB`: Use up to 8 GiB memory for builds. Only available for environment type `LINUX_LAMBDA_CONTAINER`
78
84
* and `ARM_LAMBDA_CONTAINER`.
79
- * - `BUILD_LAMBDA_10GB`: Use up to 10 GB memory for builds. Only available for environment type
85
+ * - `BUILD_LAMBDA_10GB`: Use up to 10 GiB memory for builds. Only available for environment type
80
86
* `LINUX_LAMBDA_CONTAINER` and `ARM_LAMBDA_CONTAINER`.
81
87
*
82
88
* If you use `BUILD_GENERAL1_SMALL`:
83
89
*
84
- * - For environment type `LINUX_CONTAINER`, you can use up to 3 GB memory and 2 vCPUs for builds.
85
- * - For environment type `LINUX_GPU_CONTAINER`, you can use up to 16 GB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core
90
+ * - For environment type `LINUX_CONTAINER`, you can use up to 4 GiB memory and 2 vCPUs for builds.
91
+ * - For environment type `LINUX_GPU_CONTAINER`, you can use up to 16 GiB memory, 4 vCPUs, and 1 NVIDIA A10G Tensor Core
86
92
* GPU for builds.
87
- * - For environment type `ARM_CONTAINER`, you can use up to 4 GB memory and 2 vCPUs on ARM-based processors for builds.
93
+ * - For environment type `ARM_CONTAINER`, you can use up to 4 GiB memory and 2 vCPUs on ARM-based processors for
94
+ * builds.
88
95
*
89
96
* If you use `BUILD_GENERAL1_LARGE`:
90
97
*
91
- * - For environment type `LINUX_CONTAINER`, you can use up to 15 GB memory and 8 vCPUs for builds.
92
- * - For environment type `LINUX_GPU_CONTAINER`, you can use up to 255 GB memory, 32 vCPUs, and 4 NVIDIA Tesla V100 GPUs
93
- * for builds.
94
- * - For environment type `ARM_CONTAINER`, you can use up to 16 GB memory and 8 vCPUs on ARM-based processors for
98
+ * - For environment type `LINUX_CONTAINER`, you can use up to 16 GiB memory and 8 vCPUs for builds.
99
+ * - For environment type `LINUX_GPU_CONTAINER`, you can use up to 255 GiB memory, 32 vCPUs, and 4 NVIDIA Tesla V100
100
+ * GPUs for builds.
101
+ * - For environment type `ARM_CONTAINER`, you can use up to 16 GiB memory and 8 vCPUs on ARM-based processors for
95
102
* builds.
96
103
*
97
- * > If you're using compute fleets during project creation, `computeType` will be ignored.
104
+ * For more information, see On-demand environment types [^2] in the *CodeBuild User Guide.*
98
105
*
99
- * For more information, see Build Environment Compute Types [^1] in the *CodeBuild User Guide.*
100
- *
101
- * [^1]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html
106
+ * [^1]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.types
107
+ * [^2]: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
102
108
*
103
109
* @var ComputeType::*
104
110
*/
105
111
private $ computeType ;
106
112
113
+ /**
114
+ * The compute configuration of the build project. This is only required if `computeType` is set to
115
+ * `ATTRIBUTE_BASED_COMPUTE`.
116
+ *
117
+ * @var ComputeConfiguration|null
118
+ */
119
+ private $ computeConfiguration ;
120
+
107
121
/**
108
122
* A ProjectFleet object to use for this build project.
109
123
*
@@ -181,6 +195,7 @@ final class ProjectEnvironment
181
195
* type: EnvironmentType::*,
182
196
* image: string,
183
197
* computeType: ComputeType::*,
198
+ * computeConfiguration?: null|ComputeConfiguration|array,
184
199
* fleet?: null|ProjectFleet|array,
185
200
* environmentVariables?: null|array<EnvironmentVariable|array>,
186
201
* privilegedMode?: null|bool,
@@ -194,6 +209,7 @@ public function __construct(array $input)
194
209
$ this ->type = $ input ['type ' ] ?? $ this ->throwException (new InvalidArgument ('Missing required field "type". ' ));
195
210
$ this ->image = $ input ['image ' ] ?? $ this ->throwException (new InvalidArgument ('Missing required field "image". ' ));
196
211
$ this ->computeType = $ input ['computeType ' ] ?? $ this ->throwException (new InvalidArgument ('Missing required field "computeType". ' ));
212
+ $ this ->computeConfiguration = isset ($ input ['computeConfiguration ' ]) ? ComputeConfiguration::create ($ input ['computeConfiguration ' ]) : null ;
197
213
$ this ->fleet = isset ($ input ['fleet ' ]) ? ProjectFleet::create ($ input ['fleet ' ]) : null ;
198
214
$ this ->environmentVariables = isset ($ input ['environmentVariables ' ]) ? array_map ([EnvironmentVariable::class, 'create ' ], $ input ['environmentVariables ' ]) : null ;
199
215
$ this ->privilegedMode = $ input ['privilegedMode ' ] ?? null ;
@@ -207,6 +223,7 @@ public function __construct(array $input)
207
223
* type: EnvironmentType::*,
208
224
* image: string,
209
225
* computeType: ComputeType::*,
226
+ * computeConfiguration?: null|ComputeConfiguration|array,
210
227
* fleet?: null|ProjectFleet|array,
211
228
* environmentVariables?: null|array<EnvironmentVariable|array>,
212
229
* privilegedMode?: null|bool,
@@ -225,6 +242,11 @@ public function getCertificate(): ?string
225
242
return $ this ->certificate ;
226
243
}
227
244
245
+ public function getComputeConfiguration (): ?ComputeConfiguration
246
+ {
247
+ return $ this ->computeConfiguration ;
248
+ }
249
+
228
250
/**
229
251
* @return ComputeType::*
230
252
*/
0 commit comments