Skip to content

Commit

Permalink
Update generated code (#1752)
Browse files Browse the repository at this point in the history
update generated code
  • Loading branch information
async-aws-bot authored Aug 21, 2024
1 parent ddd4e90 commit 4d20311
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 93 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"variables": {
"${LATEST}": "3.320.3"
"${LATEST}": "3.320.4"
},
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
"services": {
Expand Down
1 change: 1 addition & 0 deletions src/Service/S3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

- AWS api-change: Amazon Simple Storage Service / Features : Adds support for pagination in the S3 ListBuckets API.
- AWS api-change: Amazon Simple Storage Service / Features : Add support for conditional writes for PutObject and CompleteMultipartUpload APIs.

### Changed

Expand Down
37 changes: 37 additions & 0 deletions src/Service/S3/src/Input/CompleteMultipartUploadRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,25 @@ final class CompleteMultipartUploadRequest extends Input
*/
private $expectedBucketOwner;

/**
* Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3
* returns a `412 Precondition Failed` error.
*
* If a conflicting operation occurs during the upload S3 returns a `409 ConditionalRequestConflict` response. On a 409
* failure you should re-initiate the multipart upload with `CreateMultipartUpload` and re-upload each part.
*
* Expects the '*' (asterisk) character.
*
* For more information about conditional requests, see RFC 7232 [^1], or Conditional requests [^2] in the *Amazon S3
* User Guide*.
*
* [^1]: https://tools.ietf.org/html/rfc7232
* [^2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
*
* @var string|null
*/
private $ifNoneMatch;

/**
* The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is required only when the
* object was created using a checksum algorithm or if your bucket policy requires the use of SSE-C. For more
Expand Down Expand Up @@ -178,6 +197,7 @@ final class CompleteMultipartUploadRequest extends Input
* ChecksumSHA256?: null|string,
* RequestPayer?: null|RequestPayer::*,
* ExpectedBucketOwner?: null|string,
* IfNoneMatch?: null|string,
* SSECustomerAlgorithm?: null|string,
* SSECustomerKey?: null|string,
* SSECustomerKeyMD5?: null|string,
Expand All @@ -196,6 +216,7 @@ public function __construct(array $input = [])
$this->checksumSha256 = $input['ChecksumSHA256'] ?? null;
$this->requestPayer = $input['RequestPayer'] ?? null;
$this->expectedBucketOwner = $input['ExpectedBucketOwner'] ?? null;
$this->ifNoneMatch = $input['IfNoneMatch'] ?? null;
$this->sseCustomerAlgorithm = $input['SSECustomerAlgorithm'] ?? null;
$this->sseCustomerKey = $input['SSECustomerKey'] ?? null;
$this->sseCustomerKeyMd5 = $input['SSECustomerKeyMD5'] ?? null;
Expand All @@ -214,6 +235,7 @@ public function __construct(array $input = [])
* ChecksumSHA256?: null|string,
* RequestPayer?: null|RequestPayer::*,
* ExpectedBucketOwner?: null|string,
* IfNoneMatch?: null|string,
* SSECustomerAlgorithm?: null|string,
* SSECustomerKey?: null|string,
* SSECustomerKeyMD5?: null|string,
Expand Down Expand Up @@ -255,6 +277,11 @@ public function getExpectedBucketOwner(): ?string
return $this->expectedBucketOwner;
}

public function getIfNoneMatch(): ?string
{
return $this->ifNoneMatch;
}

public function getKey(): ?string
{
return $this->key;
Expand Down Expand Up @@ -321,6 +348,9 @@ public function request(): Request
if (null !== $this->expectedBucketOwner) {
$headers['x-amz-expected-bucket-owner'] = $this->expectedBucketOwner;
}
if (null !== $this->ifNoneMatch) {
$headers['If-None-Match'] = $this->ifNoneMatch;
}
if (null !== $this->sseCustomerAlgorithm) {
$headers['x-amz-server-side-encryption-customer-algorithm'] = $this->sseCustomerAlgorithm;
}
Expand Down Expand Up @@ -403,6 +433,13 @@ public function setExpectedBucketOwner(?string $value): self
return $this;
}

public function setIfNoneMatch(?string $value): self
{
$this->ifNoneMatch = $value;

return $this;
}

public function setKey(?string $value): self
{
$this->key = $value;
Expand Down
5 changes: 5 additions & 0 deletions src/Service/S3/src/Input/GetObjectRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ final class GetObjectRequest extends Input
/**
* To retrieve the checksum, this mode must be enabled.
*
* In addition, if you enable checksum mode and the object is uploaded with a checksum [^1] and encrypted with an Key
* Management Service (KMS) key, you must have permission to use the `kms:Decrypt` action to retrieve the checksum.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
*
* @var ChecksumMode::*|null
*/
private $checksumMode;
Expand Down
6 changes: 4 additions & 2 deletions src/Service/S3/src/Input/HeadObjectRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,10 @@ final class HeadObjectRequest extends Input
/**
* To retrieve the checksum, this parameter must be enabled.
*
* In addition, if you enable `ChecksumMode` and the object is encrypted with Amazon Web Services Key Management Service
* (Amazon Web Services KMS), you must have permission to use the `kms:Decrypt` action for the request to succeed.
* In addition, if you enable checksum mode and the object is uploaded with a checksum [^1] and encrypted with an Key
* Management Service (KMS) key, you must have permission to use the `kms:Decrypt` action to retrieve the checksum.
*
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
*
* @var ChecksumMode::*|null
*/
Expand Down
37 changes: 37 additions & 0 deletions src/Service/S3/src/Input/PutObjectRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,25 @@ final class PutObjectRequest extends Input
*/
private $expires;

/**
* Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3
* returns a `412 Precondition Failed` error.
*
* If a conflicting operation occurs during the upload S3 returns a `409 ConditionalRequestConflict` response. On a 409
* failure you should retry the upload.
*
* Expects the '*' (asterisk) character.
*
* For more information about conditional requests, see RFC 7232 [^1], or Conditional requests [^2] in the *Amazon S3
* User Guide*.
*
* [^1]: https://tools.ietf.org/html/rfc7232
* [^2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
*
* @var string|null
*/
private $ifNoneMatch;

/**
* Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
*
Expand Down Expand Up @@ -506,6 +525,7 @@ final class PutObjectRequest extends Input
* ChecksumSHA1?: null|string,
* ChecksumSHA256?: null|string,
* Expires?: null|\DateTimeImmutable|string,
* IfNoneMatch?: null|string,
* GrantFullControl?: null|string,
* GrantRead?: null|string,
* GrantReadACP?: null|string,
Expand Down Expand Up @@ -548,6 +568,7 @@ public function __construct(array $input = [])
$this->checksumSha1 = $input['ChecksumSHA1'] ?? null;
$this->checksumSha256 = $input['ChecksumSHA256'] ?? null;
$this->expires = !isset($input['Expires']) ? null : ($input['Expires'] instanceof \DateTimeImmutable ? $input['Expires'] : new \DateTimeImmutable($input['Expires']));
$this->ifNoneMatch = $input['IfNoneMatch'] ?? null;
$this->grantFullControl = $input['GrantFullControl'] ?? null;
$this->grantRead = $input['GrantRead'] ?? null;
$this->grantReadAcp = $input['GrantReadACP'] ?? null;
Expand Down Expand Up @@ -590,6 +611,7 @@ public function __construct(array $input = [])
* ChecksumSHA1?: null|string,
* ChecksumSHA256?: null|string,
* Expires?: null|\DateTimeImmutable|string,
* IfNoneMatch?: null|string,
* GrantFullControl?: null|string,
* GrantRead?: null|string,
* GrantReadACP?: null|string,
Expand Down Expand Up @@ -738,6 +760,11 @@ public function getGrantWriteAcp(): ?string
return $this->grantWriteAcp;
}

public function getIfNoneMatch(): ?string
{
return $this->ifNoneMatch;
}

public function getKey(): ?string
{
return $this->key;
Expand Down Expand Up @@ -886,6 +913,9 @@ public function request(): Request
if (null !== $this->expires) {
$headers['Expires'] = $this->expires->setTimezone(new \DateTimeZone('GMT'))->format(\DateTimeInterface::RFC7231);
}
if (null !== $this->ifNoneMatch) {
$headers['If-None-Match'] = $this->ifNoneMatch;
}
if (null !== $this->grantFullControl) {
$headers['x-amz-grant-full-control'] = $this->grantFullControl;
}
Expand Down Expand Up @@ -1149,6 +1179,13 @@ public function setGrantWriteAcp(?string $value): self
return $this;
}

public function setIfNoneMatch(?string $value): self
{
$this->ifNoneMatch = $value;

return $this;
}

public function setKey(?string $value): self
{
$this->key = $value;
Expand Down
Loading

0 comments on commit 4d20311

Please sign in to comment.