Skip to content

Commit a3d0c1b

Browse files
author
awstools
committed
feat(client-s3): Added support for renaming objects within the same bucket using the new RenameObject API.
1 parent 3161916 commit a3d0c1b

30 files changed

+872
-59
lines changed

clients/client-s3/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,14 @@ PutPublicAccessBlock
946946

947947
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutPublicAccessBlockCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutPublicAccessBlockCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutPublicAccessBlockCommandOutput/)
948948

949+
</details>
950+
<details>
951+
<summary>
952+
RenameObject
953+
</summary>
954+
955+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/RenameObjectCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/RenameObjectCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/RenameObjectCommandOutput/)
956+
949957
</details>
950958
<details>
951959
<summary>

clients/client-s3/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@
8181
"@smithy/util-stream": "^4.2.2",
8282
"@smithy/util-utf8": "^4.0.0",
8383
"@smithy/util-waiter": "^4.0.5",
84-
"tslib": "^2.6.2"
84+
"@types/uuid": "^9.0.1",
85+
"tslib": "^2.6.2",
86+
"uuid": "^9.0.1"
8587
},
8688
"devDependencies": {
8789
"@aws-sdk/signature-v4-crt": "*",

clients/client-s3/src/S3.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,11 @@ import {
435435
PutPublicAccessBlockCommandInput,
436436
PutPublicAccessBlockCommandOutput,
437437
} from "./commands/PutPublicAccessBlockCommand";
438+
import {
439+
RenameObjectCommand,
440+
RenameObjectCommandInput,
441+
RenameObjectCommandOutput,
442+
} from "./commands/RenameObjectCommand";
438443
import {
439444
RestoreObjectCommand,
440445
RestoreObjectCommandInput,
@@ -552,6 +557,7 @@ const commands = {
552557
PutObjectRetentionCommand,
553558
PutObjectTaggingCommand,
554559
PutPublicAccessBlockCommand,
560+
RenameObjectCommand,
555561
RestoreObjectCommand,
556562
SelectObjectContentCommand,
557563
UploadPartCommand,
@@ -2017,6 +2023,17 @@ export interface S3 {
20172023
cb: (err: any, data?: PutPublicAccessBlockCommandOutput) => void
20182024
): void;
20192025

2026+
/**
2027+
* @see {@link RenameObjectCommand}
2028+
*/
2029+
renameObject(args: RenameObjectCommandInput, options?: __HttpHandlerOptions): Promise<RenameObjectCommandOutput>;
2030+
renameObject(args: RenameObjectCommandInput, cb: (err: any, data?: RenameObjectCommandOutput) => void): void;
2031+
renameObject(
2032+
args: RenameObjectCommandInput,
2033+
options: __HttpHandlerOptions,
2034+
cb: (err: any, data?: RenameObjectCommandOutput) => void
2035+
): void;
2036+
20202037
/**
20212038
* @see {@link RestoreObjectCommand}
20222039
*/

clients/client-s3/src/S3Client.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ import {
339339
PutPublicAccessBlockCommandInput,
340340
PutPublicAccessBlockCommandOutput,
341341
} from "./commands/PutPublicAccessBlockCommand";
342+
import { RenameObjectCommandInput, RenameObjectCommandOutput } from "./commands/RenameObjectCommand";
342343
import { RestoreObjectCommandInput, RestoreObjectCommandOutput } from "./commands/RestoreObjectCommand";
343344
import {
344345
SelectObjectContentCommandInput,
@@ -458,6 +459,7 @@ export type ServiceInputTypes =
458459
| PutObjectRetentionCommandInput
459460
| PutObjectTaggingCommandInput
460461
| PutPublicAccessBlockCommandInput
462+
| RenameObjectCommandInput
461463
| RestoreObjectCommandInput
462464
| SelectObjectContentCommandInput
463465
| UploadPartCommandInput
@@ -561,6 +563,7 @@ export type ServiceOutputTypes =
561563
| PutObjectRetentionCommandOutput
562564
| PutObjectTaggingCommandOutput
563565
| PutPublicAccessBlockCommandOutput
566+
| RenameObjectCommandOutput
564567
| RestoreObjectCommandOutput
565568
| SelectObjectContentCommandOutput
566569
| UploadPartCommandOutput

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ export interface CopyObjectCommandInput extends CopyObjectRequest {}
3535
export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBearer {}
3636

3737
/**
38-
* <p>Creates a copy of an object that is already stored in Amazon S3.</p>
38+
* <important>
39+
* <p>End of support notice: Beginning October 1, 2025, Amazon S3 will discontinue support for creating new Email Grantee Access Control Lists (ACL).
40+
* Email Grantee ACLs created prior to this date will continue to work and remain accessible through the Amazon Web Services Management Console, Command Line Interface (CLI), SDKs,
41+
* and REST API. However, you will no longer be able to create new Email Grantee ACLs.
42+
* </p>
43+
* <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia) Region, US West (N. California) Region, US West (Oregon) Region, Asia Pacific (Singapore) Region, Asia Pacific (Sydney) Region,
44+
* Asia Pacific (Tokyo) Region, Europe (Ireland) Region, and South America (São Paulo) Region.</p>
45+
* </important>
46+
* <p>Creates a copy of an object that is already stored in Amazon S3.</p>
3947
* <note>
4048
* <p>You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your
4149
* object up to 5 GB in size in a single atomic action using this API. However, to copy an

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,22 @@ export interface CreateBucketCommandInput extends CreateBucketRequest {}
3030
export interface CreateBucketCommandOutput extends CreateBucketOutput, __MetadataBearer {}
3131

3232
/**
33-
* <note>
33+
* <important>
34+
* <p>End of support notice: Beginning October 1, 2025, Amazon S3 will discontinue support for creating new Email Grantee Access Control Lists (ACL).
35+
* Email Grantee ACLs created prior to this date will continue to work and remain accessible through the Amazon Web Services Management Console, Command Line Interface (CLI), SDKs,
36+
* and REST API. However, you will no longer be able to create new Email Grantee ACLs.
37+
* </p>
38+
* <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia) Region, US West (N. California) Region, US West (Oregon) Region, Asia Pacific (Singapore) Region, Asia Pacific (Sydney) Region,
39+
* Asia Pacific (Tokyo) Region, Europe (Ireland) Region, and South America (São Paulo) Region.</p>
40+
* </important>
41+
* <important>
42+
* <p>End of support notice: Beginning October 1, 2025, Amazon S3 will stop returning <code>DisplayName</code>. Update your applications to use canonical IDs (unique identifier for
43+
* Amazon Web Services accounts), Amazon Web Services account ID (12 digit identifier) or IAM ARNs (full resource naming) as a direct replacement of <code>DisplayName</code>.
44+
* </p>
45+
* <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia) Region, US West (N. California) Region, US West (Oregon) Region, Asia Pacific (Singapore) Region, Asia Pacific (Sydney) Region,
46+
* Asia Pacific (Tokyo) Region, Europe (Ireland) Region, and South America (São Paulo) Region.</p>
47+
* </important>
48+
* <note>
3449
* <p>This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html">
3550
* <code>CreateBucket</code>
3651
* </a>.</p>

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ export interface CreateMultipartUploadCommandInput extends CreateMultipartUpload
3535
export interface CreateMultipartUploadCommandOutput extends CreateMultipartUploadOutput, __MetadataBearer {}
3636

3737
/**
38-
* <p>This action initiates a multipart upload and returns an upload ID. This upload ID is
38+
* <important>
39+
* <p>End of support notice: Beginning October 1, 2025, Amazon S3 will discontinue support for creating new Email Grantee Access Control Lists (ACL).
40+
* Email Grantee ACLs created prior to this date will continue to work and remain accessible through the Amazon Web Services Management Console, Command Line Interface (CLI), SDKs,
41+
* and REST API. However, you will no longer be able to create new Email Grantee ACLs.
42+
* </p>
43+
* <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia) Region, US West (N. California) Region, US West (Oregon) Region, Asia Pacific (Singapore) Region, Asia Pacific (Sydney) Region,
44+
* Asia Pacific (Tokyo) Region, Europe (Ireland) Region, and South America (São Paulo) Region.</p>
45+
* </important>
46+
* <p>This action initiates a multipart upload and returns an upload ID. This upload ID is
3947
* used to associate all of the parts in the specific multipart upload. You specify this
4048
* upload ID in each of your subsequent upload part requests (see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html">UploadPart</a>). You also include this
4149
* upload ID in the final request to either complete or abort the multipart upload request.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export interface DeleteBucketIntelligentTieringConfigurationCommandOutput extend
6666
* const input = { // DeleteBucketIntelligentTieringConfigurationRequest
6767
* Bucket: "STRING_VALUE", // required
6868
* Id: "STRING_VALUE", // required
69+
* ExpectedBucketOwner: "STRING_VALUE",
6970
* };
7071
* const command = new DeleteBucketIntelligentTieringConfigurationCommand(input);
7172
* const response = await client.send(command);

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ export interface GetBucketAclCommandInput extends GetBucketAclRequest {}
2929
export interface GetBucketAclCommandOutput extends GetBucketAclOutput, __MetadataBearer {}
3030

3131
/**
32-
* <note>
32+
* <important>
33+
* <p>End of support notice: Beginning October 1, 2025, Amazon S3 will stop returning <code>DisplayName</code>. Update your applications to use canonical IDs (unique identifier for
34+
* Amazon Web Services accounts), Amazon Web Services account ID (12 digit identifier) or IAM ARNs (full resource naming) as a direct replacement of <code>DisplayName</code>.
35+
* </p>
36+
* <p>This change affects the following Amazon Web Services Regions: US East (N. Virginia) Region, US West (N. California) Region, US West (Oregon) Region, Asia Pacific (Singapore) Region, Asia Pacific (Sydney) Region,
37+
* Asia Pacific (Tokyo) Region, Europe (Ireland) Region, and South America (São Paulo) Region.</p>
38+
* </important>
39+
* <note>
3340
* <p>This operation is not supported for directory buckets.</p>
3441
* </note>
3542
* <p>This implementation of the <code>GET</code> action uses the <code>acl</code> subresource

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export interface GetBucketIntelligentTieringConfigurationCommandOutput
7272
* const input = { // GetBucketIntelligentTieringConfigurationRequest
7373
* Bucket: "STRING_VALUE", // required
7474
* Id: "STRING_VALUE", // required
75+
* ExpectedBucketOwner: "STRING_VALUE",
7576
* };
7677
* const command = new GetBucketIntelligentTieringConfigurationCommand(input);
7778
* const response = await client.send(command);

0 commit comments

Comments
 (0)