Skip to content

Commit 30c4933

Browse files
Update generated code (#1731)
update generated code
1 parent eb53ac6 commit 30c4933

File tree

6 files changed

+182
-10
lines changed

6 files changed

+182
-10
lines changed

manifest.json

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

src/Service/S3/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- AWS api-change: Added response overrides to Head Object requests.
8+
59
### Fixed
610

711
- Exception NoSuchKeyException not fired for `HeadObject` request.

src/Service/S3/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"extra": {
3232
"branch-alias": {
33-
"dev-master": "2.2-dev"
33+
"dev-master": "2.3-dev"
3434
}
3535
}
3636
}

src/Service/S3/src/Input/HeadObjectRequest.php

+150
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,48 @@ final class HeadObjectRequest extends Input
138138
*/
139139
private $range;
140140

141+
/**
142+
* Sets the `Cache-Control` header of the response.
143+
*
144+
* @var string|null
145+
*/
146+
private $responseCacheControl;
147+
148+
/**
149+
* Sets the `Content-Disposition` header of the response.
150+
*
151+
* @var string|null
152+
*/
153+
private $responseContentDisposition;
154+
155+
/**
156+
* Sets the `Content-Encoding` header of the response.
157+
*
158+
* @var string|null
159+
*/
160+
private $responseContentEncoding;
161+
162+
/**
163+
* Sets the `Content-Language` header of the response.
164+
*
165+
* @var string|null
166+
*/
167+
private $responseContentLanguage;
168+
169+
/**
170+
* Sets the `Content-Type` header of the response.
171+
*
172+
* @var string|null
173+
*/
174+
private $responseContentType;
175+
176+
/**
177+
* Sets the `Expires` header of the response.
178+
*
179+
* @var \DateTimeImmutable|null
180+
*/
181+
private $responseExpires;
182+
141183
/**
142184
* Version ID used to reference a specific version of the object.
143185
*
@@ -218,6 +260,12 @@ final class HeadObjectRequest extends Input
218260
* IfUnmodifiedSince?: null|\DateTimeImmutable|string,
219261
* Key?: string,
220262
* Range?: null|string,
263+
* ResponseCacheControl?: null|string,
264+
* ResponseContentDisposition?: null|string,
265+
* ResponseContentEncoding?: null|string,
266+
* ResponseContentLanguage?: null|string,
267+
* ResponseContentType?: null|string,
268+
* ResponseExpires?: null|\DateTimeImmutable|string,
221269
* VersionId?: null|string,
222270
* SSECustomerAlgorithm?: null|string,
223271
* SSECustomerKey?: null|string,
@@ -238,6 +286,12 @@ public function __construct(array $input = [])
238286
$this->ifUnmodifiedSince = !isset($input['IfUnmodifiedSince']) ? null : ($input['IfUnmodifiedSince'] instanceof \DateTimeImmutable ? $input['IfUnmodifiedSince'] : new \DateTimeImmutable($input['IfUnmodifiedSince']));
239287
$this->key = $input['Key'] ?? null;
240288
$this->range = $input['Range'] ?? null;
289+
$this->responseCacheControl = $input['ResponseCacheControl'] ?? null;
290+
$this->responseContentDisposition = $input['ResponseContentDisposition'] ?? null;
291+
$this->responseContentEncoding = $input['ResponseContentEncoding'] ?? null;
292+
$this->responseContentLanguage = $input['ResponseContentLanguage'] ?? null;
293+
$this->responseContentType = $input['ResponseContentType'] ?? null;
294+
$this->responseExpires = !isset($input['ResponseExpires']) ? null : ($input['ResponseExpires'] instanceof \DateTimeImmutable ? $input['ResponseExpires'] : new \DateTimeImmutable($input['ResponseExpires']));
241295
$this->versionId = $input['VersionId'] ?? null;
242296
$this->sseCustomerAlgorithm = $input['SSECustomerAlgorithm'] ?? null;
243297
$this->sseCustomerKey = $input['SSECustomerKey'] ?? null;
@@ -258,6 +312,12 @@ public function __construct(array $input = [])
258312
* IfUnmodifiedSince?: null|\DateTimeImmutable|string,
259313
* Key?: string,
260314
* Range?: null|string,
315+
* ResponseCacheControl?: null|string,
316+
* ResponseContentDisposition?: null|string,
317+
* ResponseContentEncoding?: null|string,
318+
* ResponseContentLanguage?: null|string,
319+
* ResponseContentType?: null|string,
320+
* ResponseExpires?: null|\DateTimeImmutable|string,
261321
* VersionId?: null|string,
262322
* SSECustomerAlgorithm?: null|string,
263323
* SSECustomerKey?: null|string,
@@ -335,6 +395,36 @@ public function getRequestPayer(): ?string
335395
return $this->requestPayer;
336396
}
337397

398+
public function getResponseCacheControl(): ?string
399+
{
400+
return $this->responseCacheControl;
401+
}
402+
403+
public function getResponseContentDisposition(): ?string
404+
{
405+
return $this->responseContentDisposition;
406+
}
407+
408+
public function getResponseContentEncoding(): ?string
409+
{
410+
return $this->responseContentEncoding;
411+
}
412+
413+
public function getResponseContentLanguage(): ?string
414+
{
415+
return $this->responseContentLanguage;
416+
}
417+
418+
public function getResponseContentType(): ?string
419+
{
420+
return $this->responseContentType;
421+
}
422+
423+
public function getResponseExpires(): ?\DateTimeImmutable
424+
{
425+
return $this->responseExpires;
426+
}
427+
338428
public function getSseCustomerAlgorithm(): ?string
339429
{
340430
return $this->sseCustomerAlgorithm;
@@ -404,6 +494,24 @@ public function request(): Request
404494

405495
// Prepare query
406496
$query = [];
497+
if (null !== $this->responseCacheControl) {
498+
$query['response-cache-control'] = $this->responseCacheControl;
499+
}
500+
if (null !== $this->responseContentDisposition) {
501+
$query['response-content-disposition'] = $this->responseContentDisposition;
502+
}
503+
if (null !== $this->responseContentEncoding) {
504+
$query['response-content-encoding'] = $this->responseContentEncoding;
505+
}
506+
if (null !== $this->responseContentLanguage) {
507+
$query['response-content-language'] = $this->responseContentLanguage;
508+
}
509+
if (null !== $this->responseContentType) {
510+
$query['response-content-type'] = $this->responseContentType;
511+
}
512+
if (null !== $this->responseExpires) {
513+
$query['response-expires'] = $this->responseExpires->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231);
514+
}
407515
if (null !== $this->versionId) {
408516
$query['versionId'] = $this->versionId;
409517
}
@@ -513,6 +621,48 @@ public function setRequestPayer(?string $value): self
513621
return $this;
514622
}
515623

624+
public function setResponseCacheControl(?string $value): self
625+
{
626+
$this->responseCacheControl = $value;
627+
628+
return $this;
629+
}
630+
631+
public function setResponseContentDisposition(?string $value): self
632+
{
633+
$this->responseContentDisposition = $value;
634+
635+
return $this;
636+
}
637+
638+
public function setResponseContentEncoding(?string $value): self
639+
{
640+
$this->responseContentEncoding = $value;
641+
642+
return $this;
643+
}
644+
645+
public function setResponseContentLanguage(?string $value): self
646+
{
647+
$this->responseContentLanguage = $value;
648+
649+
return $this;
650+
}
651+
652+
public function setResponseContentType(?string $value): self
653+
{
654+
$this->responseContentType = $value;
655+
656+
return $this;
657+
}
658+
659+
public function setResponseExpires(?\DateTimeImmutable $value): self
660+
{
661+
$this->responseExpires = $value;
662+
663+
return $this;
664+
}
665+
516666
public function setSseCustomerAlgorithm(?string $value): self
517667
{
518668
$this->sseCustomerAlgorithm = $value;

src/Service/S3/src/Input/ListObjectsV2Request.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ final class ListObjectsV2Request extends Input
6262

6363
/**
6464
* Encoding type used by Amazon S3 to encode object keys in the response. If using `url`, non-ASCII characters used in
65-
* an object's key name will be URL encoded. For example, the object test_file(3).png will appear as
66-
* test_file%283%29.png.
65+
* an object's key name will be URL encoded. For example, the object `test_file(3).png` will appear as
66+
* `test_file%283%29.png`.
6767
*
6868
* @var EncodingType::*|null
6969
*/

src/Service/S3/src/S3Client.php

+24-6
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ public function completeMultipartUpload($input): CompleteMultipartUploadOutput
408408
*
409409
* When the request is an HTTP 1.1 request, the response is chunk encoded. When the request is not an HTTP 1.1
410410
* request, the response would not contain the `Content-Length`. You always need to read the entire response body to
411-
* check if the copy succeeds. to keep the connection alive while we copy the data.
411+
* check if the copy succeeds.
412412
*
413413
* - If the copy is successful, you receive a response with information about the copied object.
414414
* - A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the
@@ -1099,7 +1099,7 @@ public function deleteObjectTagging($input): DeleteObjectTaggingOutput
10991099
*
11001100
* - **`s3:DeleteObject`** - To delete an object from a bucket, you must always specify the `s3:DeleteObject`
11011101
* permission.
1102-
* - **`s3:DeleteObjectVersion`** - To delete a specific version of an object from a versiong-enabled bucket, you
1102+
* - **`s3:DeleteObjectVersion`** - To delete a specific version of an object from a versioning-enabled bucket, you
11031103
* must specify the `s3:DeleteObjectVersion` permission.
11041104
*
11051105
* - **Directory bucket permissions** - To grant access to this API operation on a directory bucket, we recommend that
@@ -1612,6 +1612,12 @@ public function getObjectTagging($input): GetObjectTaggingOutput
16121612
* IfUnmodifiedSince?: null|\DateTimeImmutable|string,
16131613
* Key: string,
16141614
* Range?: null|string,
1615+
* ResponseCacheControl?: null|string,
1616+
* ResponseContentDisposition?: null|string,
1617+
* ResponseContentEncoding?: null|string,
1618+
* ResponseContentLanguage?: null|string,
1619+
* ResponseContentType?: null|string,
1620+
* ResponseExpires?: null|\DateTimeImmutable|string,
16151621
* VersionId?: null|string,
16161622
* SSECustomerAlgorithm?: null|string,
16171623
* SSECustomerKey?: null|string,
@@ -2007,6 +2013,12 @@ public function listParts($input): ListPartsOutput
20072013
* IfUnmodifiedSince?: null|\DateTimeImmutable|string,
20082014
* Key: string,
20092015
* Range?: null|string,
2016+
* ResponseCacheControl?: null|string,
2017+
* ResponseContentDisposition?: null|string,
2018+
* ResponseContentEncoding?: null|string,
2019+
* ResponseContentLanguage?: null|string,
2020+
* ResponseContentType?: null|string,
2021+
* ResponseExpires?: null|\DateTimeImmutable|string,
20102022
* VersionId?: null|string,
20112023
* SSECustomerAlgorithm?: null|string,
20122024
* SSECustomerKey?: null|string,
@@ -2039,6 +2051,12 @@ public function objectExists($input): ObjectExistsWaiter
20392051
* IfUnmodifiedSince?: null|\DateTimeImmutable|string,
20402052
* Key: string,
20412053
* Range?: null|string,
2054+
* ResponseCacheControl?: null|string,
2055+
* ResponseContentDisposition?: null|string,
2056+
* ResponseContentEncoding?: null|string,
2057+
* ResponseContentLanguage?: null|string,
2058+
* ResponseContentType?: null|string,
2059+
* ResponseExpires?: null|\DateTimeImmutable|string,
20422060
* VersionId?: null|string,
20432061
* SSECustomerAlgorithm?: null|string,
20442062
* SSECustomerKey?: null|string,
@@ -2803,13 +2821,13 @@ public function uploadPart($input): UploadPartOutput
28032821
* - If the destination bucket is a general purpose bucket, you must have the **`s3:PutObject`** permission to write
28042822
* the object copy to the destination bucket.
28052823
*
2806-
* For information about permissions required to use the multipart upload API, see Multipart Upload and Permissions
2807-
* [^7] in the *Amazon S3 User Guide*.
2824+
* For information about permissions required to use the multipart upload API, see Multipart upload API and
2825+
* permissions [^7] in the *Amazon S3 User Guide*.
28082826
* - **Directory bucket permissions** - You must have permissions in a bucket policy or an IAM identity-based policy
28092827
* based on the source and destination bucket types in an `UploadPartCopy` operation.
28102828
*
28112829
* - If the source object that you want to copy is in a directory bucket, you must have the
2812-
* **`s3express:CreateSession`** permission in the `Action` element of a policy to read the object . By default,
2830+
* **`s3express:CreateSession`** permission in the `Action` element of a policy to read the object. By default,
28132831
* the session is in the `ReadWrite` mode. If you want to restrict the access, you can explicitly set the
28142832
* `s3express:SessionMode` condition key to `ReadOnly` on the copy source bucket.
28152833
* - If the copy destination is a directory bucket, you must have the **`s3express:CreateSession`** permission in
@@ -2859,7 +2877,7 @@ public function uploadPart($input): UploadPartOutput
28592877
* [^4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html
28602878
* [^5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
28612879
* [^6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2862-
* [^7]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
2880+
* [^7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions
28632881
* [^8]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
28642882
* [^9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
28652883
* [^10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html

0 commit comments

Comments
 (0)