Skip to content

Commit 3b574f6

Browse files
Update generated code (#1207)
* update generated code * Update src/Service/Lambda/CHANGELOG.md Co-authored-by: Jérémy Derussé <jeremy@derusse.com>
1 parent 30a6f47 commit 3b574f6

File tree

5 files changed

+60
-0
lines changed

5 files changed

+60
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: Adds support for increased ephemeral storage (/tmp) up to 10GB for Lambda functions. Customers can now provision up to 10 GB of ephemeral storage per function instance, a 20x increase over the previous limit of 512 MB.
8+
59
## 1.6.0
610

711
### Added

src/Result/ListFunctionsResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use AsyncAws\Lambda\ValueObject\DeadLetterConfig;
1212
use AsyncAws\Lambda\ValueObject\EnvironmentError;
1313
use AsyncAws\Lambda\ValueObject\EnvironmentResponse;
14+
use AsyncAws\Lambda\ValueObject\EphemeralStorage;
1415
use AsyncAws\Lambda\ValueObject\FileSystemConfig;
1516
use AsyncAws\Lambda\ValueObject\FunctionConfiguration;
1617
use AsyncAws\Lambda\ValueObject\ImageConfig;
@@ -215,6 +216,9 @@ private function populateResultFunctionList(array $json): array
215216
'SigningProfileVersionArn' => isset($item['SigningProfileVersionArn']) ? (string) $item['SigningProfileVersionArn'] : null,
216217
'SigningJobArn' => isset($item['SigningJobArn']) ? (string) $item['SigningJobArn'] : null,
217218
'Architectures' => !isset($item['Architectures']) ? null : $this->populateResultArchitecturesList($item['Architectures']),
219+
'EphemeralStorage' => empty($item['EphemeralStorage']) ? null : new EphemeralStorage([
220+
'Size' => (int) $item['EphemeralStorage']['Size'],
221+
]),
218222
]);
219223
}
220224

src/Result/ListVersionsByFunctionResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use AsyncAws\Lambda\ValueObject\DeadLetterConfig;
1212
use AsyncAws\Lambda\ValueObject\EnvironmentError;
1313
use AsyncAws\Lambda\ValueObject\EnvironmentResponse;
14+
use AsyncAws\Lambda\ValueObject\EphemeralStorage;
1415
use AsyncAws\Lambda\ValueObject\FileSystemConfig;
1516
use AsyncAws\Lambda\ValueObject\FunctionConfiguration;
1617
use AsyncAws\Lambda\ValueObject\ImageConfig;
@@ -213,6 +214,9 @@ private function populateResultFunctionList(array $json): array
213214
'SigningProfileVersionArn' => isset($item['SigningProfileVersionArn']) ? (string) $item['SigningProfileVersionArn'] : null,
214215
'SigningJobArn' => isset($item['SigningJobArn']) ? (string) $item['SigningJobArn'] : null,
215216
'Architectures' => !isset($item['Architectures']) ? null : $this->populateResultArchitecturesList($item['Architectures']),
217+
'EphemeralStorage' => empty($item['EphemeralStorage']) ? null : new EphemeralStorage([
218+
'Size' => (int) $item['EphemeralStorage']['Size'],
219+
]),
216220
]);
217221
}
218222

src/ValueObject/EphemeralStorage.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
namespace AsyncAws\Lambda\ValueObject;
4+
5+
/**
6+
* The size of the function’s /tmp directory in MB. The default value is 512, but can be any whole number between 512
7+
* and 10240 MB.
8+
*/
9+
final class EphemeralStorage
10+
{
11+
/**
12+
* The size of the function’s /tmp directory.
13+
*/
14+
private $size;
15+
16+
/**
17+
* @param array{
18+
* Size: int,
19+
* } $input
20+
*/
21+
public function __construct(array $input)
22+
{
23+
$this->size = $input['Size'] ?? null;
24+
}
25+
26+
public static function create($input): self
27+
{
28+
return $input instanceof self ? $input : new self($input);
29+
}
30+
31+
public function getSize(): int
32+
{
33+
return $this->size;
34+
}
35+
}

src/ValueObject/FunctionConfiguration.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ final class FunctionConfiguration
187187
*/
188188
private $architectures;
189189

190+
/**
191+
* The size of the function’s /tmp directory in MB. The default value is 512, but can be any whole number between 512
192+
* and 10240 MB.
193+
*/
194+
private $ephemeralStorage;
195+
190196
/**
191197
* @param array{
192198
* FunctionName?: null|string,
@@ -221,6 +227,7 @@ final class FunctionConfiguration
221227
* SigningProfileVersionArn?: null|string,
222228
* SigningJobArn?: null|string,
223229
* Architectures?: null|list<Architecture::*>,
230+
* EphemeralStorage?: null|EphemeralStorage|array,
224231
* } $input
225232
*/
226233
public function __construct(array $input)
@@ -257,6 +264,7 @@ public function __construct(array $input)
257264
$this->signingProfileVersionArn = $input['SigningProfileVersionArn'] ?? null;
258265
$this->signingJobArn = $input['SigningJobArn'] ?? null;
259266
$this->architectures = $input['Architectures'] ?? null;
267+
$this->ephemeralStorage = isset($input['EphemeralStorage']) ? EphemeralStorage::create($input['EphemeralStorage']) : null;
260268
}
261269

262270
public static function create($input): self
@@ -297,6 +305,11 @@ public function getEnvironment(): ?EnvironmentResponse
297305
return $this->environment;
298306
}
299307

308+
public function getEphemeralStorage(): ?EphemeralStorage
309+
{
310+
return $this->ephemeralStorage;
311+
}
312+
300313
/**
301314
* @return FileSystemConfig[]
302315
*/

0 commit comments

Comments
 (0)