Skip to content

Commit db25f33

Browse files
Update generated code (#1911)
update generated code
1 parent 6d442af commit db25f33

File tree

9 files changed

+83
-1
lines changed

9 files changed

+83
-1
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.348.2"
3+
"${LATEST}": "3.349.1"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/S3/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- AWS api-change: Rework regions configuration
88
- AWS api-change: Added `tagCount` property to the HeadObject response
99
- AWS api-change: Adds support for additional server-side encryption mode and storage class values for accessing Amazon FSx data from Amazon S3 using S3 Access Points
10+
- AWS api-change: Added support for directory bucket creation with tags and bucket ARN retrieval in CreateBucket, ListDirectoryBuckets, and HeadBucket operations
1011

1112
## 2.9.1
1213

src/Service/S3/src/Input/ListMultipartUploadsRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ final class ListMultipartUploadsRequest extends Input
5555
* parameter, then the substring starts at the beginning of the key. The keys that are grouped under `CommonPrefixes`
5656
* result element are not returned elsewhere in the response.
5757
*
58+
* `CommonPrefixes` is filtered out from results if it is not lexicographically greater than the key-marker.
59+
*
5860
* > **Directory buckets** - For directory buckets, `/` is the only supported delimiter.
5961
*
6062
* @var string|null

src/Service/S3/src/Input/ListObjectVersionsRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ final class ListObjectVersionsRequest extends Input
2626
* and the first occurrence of the delimiter are grouped under a single result element in `CommonPrefixes`. These groups
2727
* are counted as one result against the `max-keys` limitation. These keys are not returned elsewhere in the response.
2828
*
29+
* `CommonPrefixes` is filtered out from results if it is not lexicographically greater than the key-marker.
30+
*
2931
* @var string|null
3032
*/
3133
private $delimiter;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ final class ListObjectsV2Request extends Input
4949
/**
5050
* A delimiter is a character that you use to group keys.
5151
*
52+
* `CommonPrefixes` is filtered out from results if it is not lexicographically greater than the `StartAfter` value.
53+
*
5254
* > - **Directory buckets** - For directory buckets, `/` is the only supported delimiter.
5355
* > - **Directory buckets ** - When you query `ListObjectsV2` with a delimiter during in-progress multipart uploads,
5456
* > the `CommonPrefixes` response parameter contains the prefixes that are associated with the in-progress multipart

src/Service/S3/src/Result/CreateBucketOutput.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ class CreateBucketOutput extends Result
1414
*/
1515
private $location;
1616

17+
/**
18+
* The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely identify Amazon Web Services resources across all of
19+
* Amazon Web Services.
20+
*
21+
* > This parameter is only supported for S3 directory buckets. For more information, see Using tags with directory
22+
* > buckets [^1].
23+
*
24+
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html
25+
*
26+
* @var string|null
27+
*/
28+
private $bucketArn;
29+
30+
public function getBucketArn(): ?string
31+
{
32+
$this->initialize();
33+
34+
return $this->bucketArn;
35+
}
36+
1737
public function getLocation(): ?string
1838
{
1939
$this->initialize();
@@ -26,5 +46,6 @@ protected function populateResult(Response $response): void
2646
$headers = $response->getHeaders();
2747

2848
$this->location = $headers['location'][0] ?? null;
49+
$this->bucketArn = $headers['x-amz-bucket-arn'][0] ?? null;
2950
}
3051
}

src/Service/S3/src/Result/ListBucketsOutput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ private function populateResultBucket(\SimpleXMLElement $xml): Bucket
137137
'Name' => (null !== $v = $xml->Name[0]) ? (string) $v : null,
138138
'CreationDate' => (null !== $v = $xml->CreationDate[0]) ? new \DateTimeImmutable((string) $v) : null,
139139
'BucketRegion' => (null !== $v = $xml->BucketRegion[0]) ? (string) $v : null,
140+
'BucketArn' => (null !== $v = $xml->BucketArn[0]) ? (string) $v : null,
140141
]);
141142
}
142143

src/Service/S3/src/ValueObject/Bucket.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,53 @@ final class Bucket
3030
*/
3131
private $bucketRegion;
3232

33+
/**
34+
* The Amazon Resource Name (ARN) of the S3 bucket. ARNs uniquely identify Amazon Web Services resources across all of
35+
* Amazon Web Services.
36+
*
37+
* > This parameter is only supported for S3 directory buckets. For more information, see Using tags with directory
38+
* > buckets [^1].
39+
*
40+
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html
41+
*
42+
* @var string|null
43+
*/
44+
private $bucketArn;
45+
3346
/**
3447
* @param array{
3548
* Name?: null|string,
3649
* CreationDate?: null|\DateTimeImmutable,
3750
* BucketRegion?: null|string,
51+
* BucketArn?: null|string,
3852
* } $input
3953
*/
4054
public function __construct(array $input)
4155
{
4256
$this->name = $input['Name'] ?? null;
4357
$this->creationDate = $input['CreationDate'] ?? null;
4458
$this->bucketRegion = $input['BucketRegion'] ?? null;
59+
$this->bucketArn = $input['BucketArn'] ?? null;
4560
}
4661

4762
/**
4863
* @param array{
4964
* Name?: null|string,
5065
* CreationDate?: null|\DateTimeImmutable,
5166
* BucketRegion?: null|string,
67+
* BucketArn?: null|string,
5268
* }|Bucket $input
5369
*/
5470
public static function create($input): self
5571
{
5672
return $input instanceof self ? $input : new self($input);
5773
}
5874

75+
public function getBucketArn(): ?string
76+
{
77+
return $this->bucketArn;
78+
}
79+
5980
public function getBucketRegion(): ?string
6081
{
6182
return $this->bucketRegion;

src/Service/S3/src/ValueObject/CreateBucketConfiguration.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,41 @@ final class CreateBucketConfiguration
5252
*/
5353
private $bucket;
5454

55+
/**
56+
* An array of tags that you can apply to the bucket that you're creating. Tags are key-value pairs of metadata used to
57+
* categorize and organize your buckets, track costs, and control access.
58+
*
59+
* > This parameter is only supported for S3 directory buckets. For more information, see Using tags with directory
60+
* > buckets [^1].
61+
*
62+
* [^1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html
63+
*
64+
* @var Tag[]|null
65+
*/
66+
private $tags;
67+
5568
/**
5669
* @param array{
5770
* LocationConstraint?: null|BucketLocationConstraint::*,
5871
* Location?: null|LocationInfo|array,
5972
* Bucket?: null|BucketInfo|array,
73+
* Tags?: null|array<Tag|array>,
6074
* } $input
6175
*/
6276
public function __construct(array $input)
6377
{
6478
$this->locationConstraint = $input['LocationConstraint'] ?? null;
6579
$this->location = isset($input['Location']) ? LocationInfo::create($input['Location']) : null;
6680
$this->bucket = isset($input['Bucket']) ? BucketInfo::create($input['Bucket']) : null;
81+
$this->tags = isset($input['Tags']) ? array_map([Tag::class, 'create'], $input['Tags']) : null;
6782
}
6883

6984
/**
7085
* @param array{
7186
* LocationConstraint?: null|BucketLocationConstraint::*,
7287
* Location?: null|LocationInfo|array,
7388
* Bucket?: null|BucketInfo|array,
89+
* Tags?: null|array<Tag|array>,
7490
* }|CreateBucketConfiguration $input
7591
*/
7692
public static function create($input): self
@@ -96,6 +112,14 @@ public function getLocationConstraint(): ?string
96112
return $this->locationConstraint;
97113
}
98114

115+
/**
116+
* @return Tag[]
117+
*/
118+
public function getTags(): array
119+
{
120+
return $this->tags ?? [];
121+
}
122+
99123
/**
100124
* @internal
101125
*/
@@ -117,5 +141,13 @@ public function requestBody(\DOMElement $node, \DOMDocument $document): void
117141

118142
$v->requestBody($child, $document);
119143
}
144+
if (null !== $v = $this->tags) {
145+
$node->appendChild($nodeList = $document->createElement('Tags'));
146+
foreach ($v as $item) {
147+
$nodeList->appendChild($child = $document->createElement('Tag'));
148+
149+
$item->requestBody($child, $document);
150+
}
151+
}
120152
}
121153
}

0 commit comments

Comments
 (0)