From 7ebef94cb7dbd2df1a044baa8678c2a8a63dd61e Mon Sep 17 00:00:00 2001 From: Bennett Lynch Date: Fri, 23 Jul 2021 17:25:28 -0700 Subject: [PATCH] Deprecate S3 CopySource parameter for CopyObject & UploadPartCopy ## Motivation and Context In https://github.com/aws/aws-sdk-java-v2/pull/2612 we recently introduced replacement parameters for the S3 CopySource parameter. However, we did not officially deprecate it since our codegen tooling lacked support for deprecated members at the time. With https://github.com/aws/aws-sdk-java-v2/pull/2622 we have since added support for deprecated members to both models and model modifications via customization.config files. Now that this feature is fully supported, we should deprecate the CopySource parameter to increase visibility and improve discoverability of the new parameters that are offered. This will make users more likely to discover the new parameters, allowing them to simplify their application code accordingly. ## Description * Annotate the CopySource parameter as deprecated for both CopySource and UploadPartCopy --- .changes/next-release/documentation-AmazonS3-259552c.json | 6 ++++++ .../main/resources/codegen-resources/customization.config | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 .changes/next-release/documentation-AmazonS3-259552c.json diff --git a/.changes/next-release/documentation-AmazonS3-259552c.json b/.changes/next-release/documentation-AmazonS3-259552c.json new file mode 100644 index 000000000000..00a7be6dc8ed --- /dev/null +++ b/.changes/next-release/documentation-AmazonS3-259552c.json @@ -0,0 +1,6 @@ +{ + "category": "Amazon S3", + "contributor": "", + "type": "documentation", + "description": "Deprecate S3 CopySource parameter for CopyObject & UploadPartCopy" +} diff --git a/services/s3/src/main/resources/codegen-resources/customization.config b/services/s3/src/main/resources/codegen-resources/customization.config index 1f2e50aa08b4..04413d672c4f 100644 --- a/services/s3/src/main/resources/codegen-resources/customization.config +++ b/services/s3/src/main/resources/codegen-resources/customization.config @@ -35,6 +35,10 @@ ], "modify": [ { + "CopySource": { + "deprecated": true, + "deprecatedMessage": "The {@code copySource} parameter has been deprecated in favor of the more user-friendly {@code sourceBucket}, {@code sourceKey}, and {@code sourceVersionId} parameters. The {@code copySource} parameter will remain fully functional, but it must not be used in conjunction with its replacement parameters." + }, "Bucket": { "emitPropertyName": "DestinationBucket", "existingNameDeprecated": true @@ -65,6 +69,10 @@ ], "modify": [ { + "CopySource": { + "deprecated": true, + "deprecatedMessage": "The {@code copySource} parameter has been deprecated in favor of the more user-friendly {@code sourceBucket}, {@code sourceKey}, and {@code sourceVersionId} parameters. The {@code copySource} parameter will remain fully functional, but it must not be used in conjunction with its replacement parameters." + }, "Bucket": { "emitPropertyName": "DestinationBucket", "existingNameDeprecated": true