服務特定變更 - AWS SDK for Java 2.x

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

服務特定變更

Amazon S3 的變化

適用於 Java 2.x 的 SDK 默認情況下禁用匿名訪問。因此,您必須使用啟用匿名存取AnonymousCredentialsProvider

作業名稱變更

在 AWS SDK for Java 2.x 中,Amazon S3用戶端的許多作業名稱已變更。在 1.x 版中,系統不會直接從服務 API 產生 Amazon S3 用戶端。這會造成開發套件操作與服務 API 之間的不一致。在 2.x 版中,我們會產生 Amazon S3 用戶端,以提高與服務 API 的一致性。

下表顯示兩個版本中的作業名稱。

Amazon S3 操作名稱
1.x 2.x
abortMultipartUpload abortMultipartUpload
changeObjectStorageClass copyObject
completeMultipartUpload completeMultipartUpload
copyObject copyObject
copyPart uploadPartCopy
createBucket createBucket
deleteBucket deleteBucket
deleteBucketAnalyticsConfiguration deleteBucketAnalyticsConfiguration
deleteBucketCrossOriginConfiguration deleteBucketCors
deleteBucketEncryption deleteBucketEncryption
deleteBucketInventoryConfiguration deleteBucketInventoryConfiguration
deleteBucketLifecycleConfiguration deleteBucketLifecycle
deleteBucketMetricsConfiguration deleteBucketMetricsConfiguration
deleteBucketPolicy deleteBucketPolicy
deleteBucketReplicationConfiguration deleteBucketReplication
deleteBucketTaggingConfiguration deleteBucketTagging
deleteBucketWebsiteConfiguration deleteBucketWebsite
deleteObject deleteObject
deleteObjectTagging deleteObjectTagging
deleteObjects deleteObjects
deleteVersion deleteObject
disableRequesterPays putBucketRequestPayment
doesBucketExist headBucket
doesBucketExistV2 headBucket
doesObjectExist headObject
enableRequesterPays putBucketRequestPayment
generatePresignedUrl S3Presigner
getBucketAccelerateConfiguration getBucketAccelerateConfiguration
getBucketAcl getBucketAcl
getBucketAnalyticsConfiguration getBucketAnalyticsConfiguration
getBucketCrossOriginConfiguration getBucketCors
getBucketEncryption getBucketEncryption
getBucketInventoryConfiguration getBucketInventoryConfiguration
getBucketLifecycleConfiguration getBucketLifecyclegetBucketLifecycleConfiguration
getBucketLocation getBucketLocation
getBucketLoggingConfiguration getBucketLogging
getBucketMetricsConfiguration getBucketMetricsConfiguration
getBucketNotificationConfiguration getBucketNotificationgetBucketNotificationConfiguration
getBucketPolicy getBucketPolicy
getBucketReplicationConfiguration getBucketReplication
getBucketTaggingConfiguration getBucketTagging
getBucketVersioningConfiguration getBucketVersioning
getBucketWebsiteConfiguration getBucketWebsite
getObject getObject
getObjectAcl getObjectAcl
getObjectAsString getObjectAsBytes().asUtf8String
getObjectMetadata headObject
getObjectTagging getObjectTagging
getResourceUrl S3Utilities#getUrl
getS3AccountOwner listBuckets
getUrl S3Utilities#getUrl
headBucket headBucket
initiateMultipartUpload createMultipartUpload
isRequesterPaysEnabled getBucketRequestPayment
listBucketAnalyticsConfigurations listBucketAnalyticsConfigurations
listBucketInventoryConfigurations listBucketInventoryConfigurations
listBucketMetricsConfigurations listBucketMetricsConfigurations
listBuckets listBuckets
listMultipartUploads listMultipartUploads
listNextBatchOfObjects listObjectsV2Paginator
listNextBatchOfVersions listObjectVersionsPaginator
listObjects listObjects
listObjectsV2 listObjectsV2
listParts listParts
listVersions listObjectVersions
putObject putObject
restoreObject restoreObject
restoreObjectV2 restoreObject
selectObjectContent selectObjectContent
setBucketAccelerateConfiguration putBucketAccelerateConfiguration
setBucketAcl putBucketAcl
setBucketAnalyticsConfiguration putBucketAnalyticsConfiguration
setBucketCrossOriginConfiguration putBucketCors
setBucketEncryption putBucketEncryption
setBucketInventoryConfiguration putBucketInventoryConfiguration
setBucketLifecycleConfiguration putBucketLifecycleputBucketLifecycleConfiguration
setBucketLoggingConfiguration putBucketLogging
setBucketMetricsConfiguration putBucketMetricsConfiguration
setBucketNotificationConfiguration putBucketNotificationputBucketNotificationConfiguration
setBucketPolicy putBucketPolicy
setBucketReplicationConfiguration putBucketReplication
setBucketTaggingConfiguration putBucketTagging
setBucketVersioningConfiguration putBucketVersioning
setBucketWebsiteConfiguration putBucketWebsite
setObjectAcl putObjectAcl
setObjectRedirectLocation copyObject
setObjectTagging putObjectTagging
uploadPart uploadPart

Amazon SNS 的變化

SNS 用戶端無法再存取其設定為存取的區域以外的區域中的 SNS 主題。

Amazon SQS 變更

SQS 從屬端無法再存取其設定要存取的區域以外的區域中的 SQS 佇列。

Amazon RDS 變化

適用於 Java 2.x 的開發套件會用RdsUtilities#generateAuthenticationToken來取代 1.x RdsIamAuthTokenGenerator 中的類別。