Skip to content

Commit 5457785

Browse files
author
awstools
committed
feat(client-s3): The S3 LISTObjects, ListObjectsV2 and ListObjectVersions API now supports a new optional header x-amz-optional-object-attributes. If header contains RestoreStatus as the value, then S3 will include Glacier restore status i.e. isRestoreInProgress and RestoreExpiryDate in List response.
1 parent 3cb41fa commit 5457785

File tree

8 files changed

+469
-965
lines changed

8 files changed

+469
-965
lines changed

clients/client-s3/src/commands/ListObjectVersionsCommand.ts

+11-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ export interface ListObjectVersionsCommandOutput extends ListObjectVersionsOutpu
4040
* parameters as selection criteria to return metadata about a subset of all the object
4141
* versions.</p>
4242
* <important>
43-
* <p> To use this operation, you must have permissions to perform the
43+
* <p> To use this operation, you must have permission to perform the
4444
* <code>s3:ListBucketVersions</code> action. Be aware of the name difference. </p>
4545
* </important>
4646
* <note>
47-
* <p> A 200 OK response can contain valid or invalid XML. Make sure to design your
48-
* application to parse the contents of the response and handle it appropriately.</p>
47+
* <p> A <code>200 OK</code> response can contain valid or invalid XML. Make sure to design
48+
* your application to parse the contents of the response and handle it
49+
* appropriately.</p>
4950
* </note>
5051
* <p>To use this operation, you must have READ access to the bucket.</p>
5152
* <p>This action is not supported by Amazon S3 on Outposts.</p>
@@ -88,6 +89,9 @@ export interface ListObjectVersionsCommandOutput extends ListObjectVersionsOutpu
8889
* VersionIdMarker: "STRING_VALUE",
8990
* ExpectedBucketOwner: "STRING_VALUE",
9091
* RequestPayer: "requester",
92+
* OptionalObjectAttributes: [ // OptionalObjectAttributesList
93+
* "RestoreStatus",
94+
* ],
9195
* };
9296
* const command = new ListObjectVersionsCommand(input);
9397
* const response = await client.send(command);
@@ -113,6 +117,10 @@ export interface ListObjectVersionsCommandOutput extends ListObjectVersionsOutpu
113117
* // DisplayName: "STRING_VALUE",
114118
* // ID: "STRING_VALUE",
115119
* // },
120+
* // RestoreStatus: { // RestoreStatus
121+
* // IsRestoreInProgress: true || false,
122+
* // RestoreExpiryDate: new Date("TIMESTAMP"),
123+
* // },
116124
* // },
117125
* // ],
118126
* // DeleteMarkers: [ // DeleteMarkers

clients/client-s3/src/commands/ListObjectsCommand.ts

+7
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ export interface ListObjectsCommandOutput extends ListObjectsOutput, __MetadataB
8787
* Prefix: "STRING_VALUE",
8888
* RequestPayer: "requester",
8989
* ExpectedBucketOwner: "STRING_VALUE",
90+
* OptionalObjectAttributes: [ // OptionalObjectAttributesList
91+
* "RestoreStatus",
92+
* ],
9093
* };
9194
* const command = new ListObjectsCommand(input);
9295
* const response = await client.send(command);
@@ -108,6 +111,10 @@ export interface ListObjectsCommandOutput extends ListObjectsOutput, __MetadataB
108111
* // DisplayName: "STRING_VALUE",
109112
* // ID: "STRING_VALUE",
110113
* // },
114+
* // RestoreStatus: { // RestoreStatus
115+
* // IsRestoreInProgress: true || false,
116+
* // RestoreExpiryDate: new Date("TIMESTAMP"),
117+
* // },
111118
* // },
112119
* // ],
113120
* // Name: "STRING_VALUE",

clients/client-s3/src/commands/ListObjectsV2Command.ts

+13-6
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ export interface ListObjectsV2CommandOutput extends ListObjectsV2Output, __Metad
4242
* design your application to parse the contents of the response and handle it appropriately.
4343
* Objects are returned sorted in an ascending order of the respective key names in the list.
4444
* For more information about listing objects, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html">Listing object keys
45-
* programmatically</a>
46-
* </p>
45+
* programmatically</a> in the <i>Amazon S3 User Guide</i>.</p>
4746
* <p>To use this operation, you must have READ access to the bucket.</p>
48-
* <p>To use this action in an Identity and Access Management (IAM) policy, you must have permissions to perform
47+
* <p>To use this action in an Identity and Access Management (IAM) policy, you must have permission to perform
4948
* the <code>s3:ListBucket</code> action. The bucket owner has this permission by default and
5049
* can grant this permission to others. For more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html">Managing
51-
* Access Permissions to Your Amazon S3 Resources</a>.</p>
50+
* Access Permissions to Your Amazon S3 Resources</a> in the
51+
* <i>Amazon S3 User Guide</i>.</p>
5252
* <important>
5353
* <p>This section describes the latest revision of this action. We recommend that you use
54-
* this revised API for application development. For backward compatibility, Amazon S3 continues
55-
* to support the prior version of this API, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">ListObjects</a>.</p>
54+
* this revised API operation for application development. For backward compatibility, Amazon S3
55+
* continues to support the prior version of this API operation, <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html">ListObjects</a>.</p>
5656
* </important>
5757
* <p>To get a list of your buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html">ListBuckets</a>.</p>
5858
* <p>The following operations are related to <code>ListObjectsV2</code>:</p>
@@ -90,6 +90,9 @@ export interface ListObjectsV2CommandOutput extends ListObjectsV2Output, __Metad
9090
* StartAfter: "STRING_VALUE",
9191
* RequestPayer: "requester",
9292
* ExpectedBucketOwner: "STRING_VALUE",
93+
* OptionalObjectAttributes: [ // OptionalObjectAttributesList
94+
* "RestoreStatus",
95+
* ],
9396
* };
9497
* const command = new ListObjectsV2Command(input);
9598
* const response = await client.send(command);
@@ -109,6 +112,10 @@ export interface ListObjectsV2CommandOutput extends ListObjectsV2Output, __Metad
109112
* // DisplayName: "STRING_VALUE",
110113
* // ID: "STRING_VALUE",
111114
* // },
115+
* // RestoreStatus: { // RestoreStatus
116+
* // IsRestoreInProgress: true || false,
117+
* // RestoreExpiryDate: new Date("TIMESTAMP"),
118+
* // },
112119
* // },
113120
* // ],
114121
* // Name: "STRING_VALUE",

clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
1515
import { SerdeContext as __SerdeContext } from "@smithy/types";
1616

17-
import { PutObjectLockConfigurationOutput, PutObjectLockConfigurationRequest } from "../models/models_0";
17+
import { PutObjectLockConfigurationOutput, PutObjectLockConfigurationRequest } from "../models/models_1";
1818
import { de_PutObjectLockConfigurationCommand, se_PutObjectLockConfigurationCommand } from "../protocols/Aws_restXml";
1919
import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
2020

0 commit comments

Comments
 (0)