Skip to content

Commit f5e54ca

Browse files
committed
update generated code
1 parent 4263d92 commit f5e54ca

19 files changed

+348
-116
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.358.0"
3+
"${LATEST}": "3.359.0"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/Lambda/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- AWS api-change: Add NodeJs 24 (nodejs24.x) support to AWS Lambda.
88
- AWS api-change: Added `us-isob-west-1` region
9+
- AWS api-change: Added SerializedRequestEntityTooLargeException to Lambda Invoke API
910

1011
### Dependency bumped
1112

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace AsyncAws\Lambda\Exception;
4+
5+
use AsyncAws\Core\Exception\Http\ClientException;
6+
use Symfony\Contracts\HttpClient\ResponseInterface;
7+
8+
/**
9+
* The processed request payload exceeded the `Invoke` request body size limit for asynchronous invocations. While the
10+
* event payload may be under 1 MB, the size after internal serialization exceeds the maximum allowed size for
11+
* asynchronous invocations.
12+
*/
13+
final class SerializedRequestEntityTooLargeException extends ClientException
14+
{
15+
/**
16+
* The error type.
17+
*
18+
* @var string|null
19+
*/
20+
private $type;
21+
22+
public function getType(): ?string
23+
{
24+
return $this->type;
25+
}
26+
27+
protected function populateResult(ResponseInterface $response): void
28+
{
29+
$data = $response->toArray(false);
30+
31+
$this->type = isset($data['Type']) ? (string) $data['Type'] : null;
32+
}
33+
}

src/Service/Lambda/src/Input/InvocationRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ final class InvocationRequest extends Input
5858
private $clientContext;
5959

6060
/**
61-
* The JSON that you want to provide to your Lambda function as input.
61+
* The JSON that you want to provide to your Lambda function as input. The maximum payload size is 6 MB for synchronous
62+
* invocations and 1 MB for asynchronous invocations.
6263
*
6364
* You can enter the JSON directly. For example, `--payload '{ "key": "value" }'`. You can also specify a file path. For
6465
* example, `--payload file://payload.json`.

src/Service/Lambda/src/LambdaClient.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use AsyncAws\Lambda\Exception\ResourceConflictException;
4343
use AsyncAws\Lambda\Exception\ResourceNotFoundException;
4444
use AsyncAws\Lambda\Exception\ResourceNotReadyException;
45+
use AsyncAws\Lambda\Exception\SerializedRequestEntityTooLargeException;
4546
use AsyncAws\Lambda\Exception\ServiceException;
4647
use AsyncAws\Lambda\Exception\SnapStartException;
4748
use AsyncAws\Lambda\Exception\SnapStartNotReadyException;
@@ -129,6 +130,9 @@ public function addLayerVersionPermission($input): AddLayerVersionPermissionResp
129130
* Deletes a Lambda function. To delete a specific function version, use the `Qualifier` parameter. Otherwise, all
130131
* versions and aliases are deleted. This doesn't require the user to have explicit permissions for DeleteAlias.
131132
*
133+
* > A deleted Lambda function cannot be recovered. Ensure that you specify the correct function name and version before
134+
* > deleting.
135+
*
132136
* To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon Web Services
133137
* services and resources that invoke your function directly, delete the trigger in the service where you originally
134138
* configured it.
@@ -201,6 +205,9 @@ public function getFunctionConfiguration($input): FunctionConfiguration
201205
* function asynchronously, set `InvocationType` to `Event`. Lambda passes the `ClientContext` object to your function
202206
* for synchronous invocations only.
203207
*
208+
* For synchronous invocations, the maximum payload size is 6 MB. For asynchronous invocations, the maximum payload size
209+
* is 1 MB.
210+
*
204211
* For synchronous invocation [^1], details about the function response, including errors, are included in the response
205212
* body and headers. For either invocation type, you can find more information in the execution log [^2] and trace [^3].
206213
*
@@ -273,6 +280,7 @@ public function getFunctionConfiguration($input): FunctionConfiguration
273280
* @throws ResourceConflictException
274281
* @throws ResourceNotFoundException
275282
* @throws ResourceNotReadyException
283+
* @throws SerializedRequestEntityTooLargeException
276284
* @throws ServiceException
277285
* @throws SnapStartException
278286
* @throws SnapStartNotReadyException
@@ -308,6 +316,7 @@ public function invoke($input): InvocationResponse
308316
'ResourceConflictException' => ResourceConflictException::class,
309317
'ResourceNotFoundException' => ResourceNotFoundException::class,
310318
'ResourceNotReadyException' => ResourceNotReadyException::class,
319+
'SerializedRequestEntityTooLargeException' => SerializedRequestEntityTooLargeException::class,
311320
'ServiceException' => ServiceException::class,
312321
'SnapStartException' => SnapStartException::class,
313322
'SnapStartNotReadyException' => SnapStartNotReadyException::class,

src/Service/S3/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
- AWS api-change: Added `us-isob-west-1` region
1212
- Added `S3Client::putPublicAccessBlock()` method
13+
- AWS api-change: Amazon Simple Storage Service / Features: Add conditional writes in CopyObject on destination key to prevent unintended object modifications.
1314

1415
### Dependency bumped
1516

src/Service/S3/src/Input/CopyObjectRequest.php

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,37 @@ final class CopyObjectRequest extends Input
304304
*/
305305
private $grantWriteAcp;
306306

307+
/**
308+
* Copies the object if the entity tag (ETag) of the destination object matches the specified tag. If the ETag values do
309+
* not match, the operation returns a `412 Precondition Failed` error. If a concurrent operation occurs during the
310+
* upload S3 returns a `409 ConditionalRequestConflict` response. On a 409 failure you should fetch the object's ETag
311+
* and retry the upload.
312+
*
313+
* Expects the ETag value as a string.
314+
*
315+
* For more information about conditional requests, see RFC 7232 [^1].
316+
*
317+
* [^1]: https://tools.ietf.org/html/rfc7232
318+
*
319+
* @var string|null
320+
*/
321+
private $ifMatch;
322+
323+
/**
324+
* Copies the object only if the object key name at the destination does not already exist in the bucket specified.
325+
* Otherwise, Amazon S3 returns a `412 Precondition Failed` error. If a concurrent operation occurs during the upload S3
326+
* returns a `409 ConditionalRequestConflict` response. On a 409 failure you should retry the upload.
327+
*
328+
* Expects the '*' (asterisk) character.
329+
*
330+
* For more information about conditional requests, see RFC 7232 [^1].
331+
*
332+
* [^1]: https://tools.ietf.org/html/rfc7232
333+
*
334+
* @var string|null
335+
*/
336+
private $ifNoneMatch;
337+
307338
/**
308339
* The key of the destination object.
309340
*
@@ -718,6 +749,8 @@ final class CopyObjectRequest extends Input
718749
* GrantRead?: string|null,
719750
* GrantReadACP?: string|null,
720751
* GrantWriteACP?: string|null,
752+
* IfMatch?: string|null,
753+
* IfNoneMatch?: string|null,
721754
* Key?: string,
722755
* Metadata?: array<string, string>|null,
723756
* MetadataDirective?: MetadataDirective::*|null,
@@ -764,6 +797,8 @@ public function __construct(array $input = [])
764797
$this->grantRead = $input['GrantRead'] ?? null;
765798
$this->grantReadAcp = $input['GrantReadACP'] ?? null;
766799
$this->grantWriteAcp = $input['GrantWriteACP'] ?? null;
800+
$this->ifMatch = $input['IfMatch'] ?? null;
801+
$this->ifNoneMatch = $input['IfNoneMatch'] ?? null;
767802
$this->key = $input['Key'] ?? null;
768803
$this->metadata = $input['Metadata'] ?? null;
769804
$this->metadataDirective = $input['MetadataDirective'] ?? null;
@@ -810,6 +845,8 @@ public function __construct(array $input = [])
810845
* GrantRead?: string|null,
811846
* GrantReadACP?: string|null,
812847
* GrantWriteACP?: string|null,
848+
* IfMatch?: string|null,
849+
* IfNoneMatch?: string|null,
813850
* Key?: string,
814851
* Metadata?: array<string, string>|null,
815852
* MetadataDirective?: MetadataDirective::*|null,
@@ -967,6 +1004,16 @@ public function getGrantWriteAcp(): ?string
9671004
return $this->grantWriteAcp;
9681005
}
9691006

1007+
public function getIfMatch(): ?string
1008+
{
1009+
return $this->ifMatch;
1010+
}
1011+
1012+
public function getIfNoneMatch(): ?string
1013+
{
1014+
return $this->ifNoneMatch;
1015+
}
1016+
9701017
public function getKey(): ?string
9711018
{
9721019
return $this->key;
@@ -1141,6 +1188,12 @@ public function request(): Request
11411188
if (null !== $this->grantWriteAcp) {
11421189
$headers['x-amz-grant-write-acp'] = $this->grantWriteAcp;
11431190
}
1191+
if (null !== $this->ifMatch) {
1192+
$headers['If-Match'] = $this->ifMatch;
1193+
}
1194+
if (null !== $this->ifNoneMatch) {
1195+
$headers['If-None-Match'] = $this->ifNoneMatch;
1196+
}
11441197
if (null !== $this->metadataDirective) {
11451198
if (!MetadataDirective::exists($this->metadataDirective)) {
11461199
throw new InvalidArgument(\sprintf('Invalid parameter "MetadataDirective" for "%s". The value "%s" is not a valid "MetadataDirective".', __CLASS__, $this->metadataDirective));
@@ -1427,6 +1480,20 @@ public function setGrantWriteAcp(?string $value): self
14271480
return $this;
14281481
}
14291482

1483+
public function setIfMatch(?string $value): self
1484+
{
1485+
$this->ifMatch = $value;
1486+
1487+
return $this;
1488+
}
1489+
1490+
public function setIfNoneMatch(?string $value): self
1491+
{
1492+
$this->ifNoneMatch = $value;
1493+
1494+
return $this;
1495+
}
1496+
14301497
public function setKey(?string $value): self
14311498
{
14321499
$this->key = $value;

src/Service/S3/src/Input/DeleteObjectRequest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ final class DeleteObjectRequest extends Input
9999
private $expectedBucketOwner;
100100

101101
/**
102-
* The `If-Match` header field makes the request method conditional on ETags. If the ETag value does not match, the
103-
* operation returns a `412 Precondition Failed` error. If the ETag matches or if the object doesn't exist, the
104-
* operation will return a `204 Success (No Content) response`.
102+
* Deletes the object if the ETag (entity tag) value provided during the delete operation matches the ETag of the object
103+
* in S3. If the ETag values do not match, the operation returns a `412 Precondition Failed` error.
105104
*
106-
* For more information about conditional requests, see RFC 7232 [^1].
105+
* Expects the ETag value as a string. `If-Match` does accept a string value of an '*' (asterisk) character to denote a
106+
* match of any ETag.
107107
*
108-
* > This functionality is only supported for directory buckets.
108+
* For more information about conditional requests, see RFC 7232 [^1].
109109
*
110110
* [^1]: https://tools.ietf.org/html/rfc7232
111111
*

src/Service/S3/src/Input/PutObjectTaggingRequest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ final class PutObjectTaggingRequest extends Input
9797
private $expectedBucketOwner;
9898

9999
/**
100+
* Confirms that the requester knows that she or he will be charged for the tagging object request. Bucket owners need
101+
* not specify this parameter in their requests.
102+
*
100103
* @var RequestPayer::*|null
101104
*/
102105
private $requestPayer;

src/Service/S3/src/Result/CompleteMultipartUploadOutput.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ class CompleteMultipartUploadOutput extends Result
5858
private $etag;
5959

6060
/**
61-
* The Base64 encoded, 32-bit `CRC32 checksum` of the object. This checksum is only be present if the checksum was
62-
* uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this
63-
* value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values
64-
* of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking
65-
* object integrity [^1] in the *Amazon S3 User Guide*.
61+
* The Base64 encoded, 32-bit `CRC32 checksum` of the object. This checksum is only present if the checksum was uploaded
62+
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may
63+
* not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
64+
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
65+
* integrity [^1] in the *Amazon S3 User Guide*.
6666
*
6767
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
6868
*
@@ -96,11 +96,11 @@ class CompleteMultipartUploadOutput extends Result
9696
private $checksumCrc64Nvme;
9797

9898
/**
99-
* The Base64 encoded, 160-bit `SHA1` digest of the object. This will only be present if the object was uploaded with
100-
* the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not
101-
* be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
102-
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
103-
* integrity [^1] in the *Amazon S3 User Guide*.
99+
* The Base64 encoded, 160-bit `SHA1` digest of the object. This checksum is only present if the checksum was uploaded
100+
* with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value
101+
* may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of
102+
* each individual part. For more information about how checksums are calculated with multipart uploads, see Checking
103+
* object integrity [^1] in the *Amazon S3 User Guide*.
104104
*
105105
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums
106106
*
@@ -109,9 +109,9 @@ class CompleteMultipartUploadOutput extends Result
109109
private $checksumSha1;
110110

111111
/**
112-
* The Base64 encoded, 256-bit `SHA256` digest of the object. This will only be present if the object was uploaded with
113-
* the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not
114-
* be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
112+
* The Base64 encoded, 256-bit `SHA256` digest of the object. This checksum is only present if the checksum was uploaded
113+
* with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may
114+
* not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each
115115
* individual part. For more information about how checksums are calculated with multipart uploads, see Checking object
116116
* integrity [^1] in the *Amazon S3 User Guide*.
117117
*

0 commit comments

Comments
 (0)