特定于服务的更改 - Amazon SDK for Java 2.x
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

特定于服务的更改

亚马逊 S3 的变化

默认情况下,适用于 Java 的 SDK 2.x 禁用匿名访问。因此,您必须使用启用匿名访问AnonymousCredentialsProvider

操作名称更改

Amazon S3 客户端的许多操作名称在Amazon SDK for Java 2.x 中已更改。在版本 1.x 中,不直接从服务 API 生成 Amazon S3 客户端。这会导致开发工具包操作与服务 API 之间的不一致。在版本 2.x 中,我们现在生成 Amazon S3 客户端以提高与服务 API 的一致性。

下表显示了两个版本中的操作名称。

亚马逊 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

亚马逊 SNS 发生了变化

除配置为访问的区域外,SNS 客户端无法再访问其他区域中的 SNS 主题。

亚马逊 SQS 变更

SQS 客户端无法再访问其配置为访问的区域以外的区域中的 SQS 队列。

亚马逊 RDS 变更

适用于 Java 2.x 的 SDK 代替 1.x RdsIamAuthTokenGenerator 中的类。RdsUtilities#generateAuthenticationToken