@Mutable @NotThreadSafe public static interface S3Object.Builder extends SdkPojo, CopyableBuilder<S3Object.Builder,S3Object>
| Modifier and Type | Method and Description |
|---|---|
S3Object.Builder |
checksumAlgorithm(ChecksumAlgorithm... checksumAlgorithm)
The algorithm that was used to create a checksum of the object.
|
S3Object.Builder |
checksumAlgorithm(Collection<ChecksumAlgorithm> checksumAlgorithm)
The algorithm that was used to create a checksum of the object.
|
S3Object.Builder |
checksumAlgorithmWithStrings(Collection<String> checksumAlgorithm)
The algorithm that was used to create a checksum of the object.
|
S3Object.Builder |
checksumAlgorithmWithStrings(String... checksumAlgorithm)
The algorithm that was used to create a checksum of the object.
|
S3Object.Builder |
checksumType(ChecksumType checksumType)
The checksum type that is used to calculate the object’s checksum value.
|
S3Object.Builder |
checksumType(String checksumType)
The checksum type that is used to calculate the object’s checksum value.
|
S3Object.Builder |
eTag(String eTag)
The entity tag is a hash of the object.
|
S3Object.Builder |
key(String key)
The name that you assign to an object.
|
S3Object.Builder |
lastModified(Instant lastModified)
Creation date of the object.
|
default S3Object.Builder |
owner(Consumer<Owner.Builder> owner)
The owner of the object
|
S3Object.Builder |
owner(Owner owner)
The owner of the object
|
default S3Object.Builder |
restoreStatus(Consumer<RestoreStatus.Builder> restoreStatus)
Specifies the restoration status of an object.
|
S3Object.Builder |
restoreStatus(RestoreStatus restoreStatus)
Specifies the restoration status of an object.
|
S3Object.Builder |
size(Long size)
Size in bytes of the object
|
S3Object.Builder |
storageClass(ObjectStorageClass storageClass)
The class of storage used to store the object.
|
S3Object.Builder |
storageClass(String storageClass)
The class of storage used to store the object.
|
equalsBySdkFields, sdkFieldNameToField, sdkFieldscopyapplyMutation, buildS3Object.Builder key(String key)
The name that you assign to an object. You use the object key to retrieve the object.
key - The name that you assign to an object. You use the object key to retrieve the object.S3Object.Builder lastModified(Instant lastModified)
Creation date of the object.
lastModified - Creation date of the object.S3Object.Builder eTag(String eTag)
The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption. If an object is larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest.
Directory buckets - MD5 is not supported by directory buckets.
eTag - The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object,
not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is
depends on how the object was created and how it is encrypted as described below:
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
Objects created by the PUT Object, POST Object, or Copy operation, or through the Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption. If an object is larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest.
Directory buckets - MD5 is not supported by directory buckets.
S3Object.Builder checksumAlgorithmWithStrings(Collection<String> checksumAlgorithm)
The algorithm that was used to create a checksum of the object.
checksumAlgorithm - The algorithm that was used to create a checksum of the object.S3Object.Builder checksumAlgorithmWithStrings(String... checksumAlgorithm)
The algorithm that was used to create a checksum of the object.
checksumAlgorithm - The algorithm that was used to create a checksum of the object.S3Object.Builder checksumAlgorithm(Collection<ChecksumAlgorithm> checksumAlgorithm)
The algorithm that was used to create a checksum of the object.
checksumAlgorithm - The algorithm that was used to create a checksum of the object.S3Object.Builder checksumAlgorithm(ChecksumAlgorithm... checksumAlgorithm)
The algorithm that was used to create a checksum of the object.
checksumAlgorithm - The algorithm that was used to create a checksum of the object.S3Object.Builder checksumType(String checksumType)
The checksum type that is used to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.
checksumType - The checksum type that is used to calculate the object’s checksum value. For more information, see Checking
object integrity in the Amazon S3 User Guide.ChecksumType,
ChecksumTypeS3Object.Builder checksumType(ChecksumType checksumType)
The checksum type that is used to calculate the object’s checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.
checksumType - The checksum type that is used to calculate the object’s checksum value. For more information, see Checking
object integrity in the Amazon S3 User Guide.ChecksumType,
ChecksumTypeS3Object.Builder size(Long size)
Size in bytes of the object
size - Size in bytes of the objectS3Object.Builder storageClass(String storageClass)
The class of storage used to store the object.
Directory buckets - Directory buckets only support EXPRESS_ONEZONE (the S3 Express One
Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access
storage class) in Dedicated Local Zones.
storageClass - The class of storage used to store the object.
Directory buckets - Directory buckets only support EXPRESS_ONEZONE (the S3 Express
One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent
Access storage class) in Dedicated Local Zones.
ObjectStorageClass,
ObjectStorageClassS3Object.Builder storageClass(ObjectStorageClass storageClass)
The class of storage used to store the object.
Directory buckets - Directory buckets only support EXPRESS_ONEZONE (the S3 Express One
Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent Access
storage class) in Dedicated Local Zones.
storageClass - The class of storage used to store the object.
Directory buckets - Directory buckets only support EXPRESS_ONEZONE (the S3 Express
One Zone storage class) in Availability Zones and ONEZONE_IA (the S3 One Zone-Infrequent
Access storage class) in Dedicated Local Zones.
ObjectStorageClass,
ObjectStorageClassS3Object.Builder owner(Owner owner)
The owner of the object
Directory buckets - The bucket owner is returned as the object owner.
owner - The owner of the object Directory buckets - The bucket owner is returned as the object owner.
default S3Object.Builder owner(Consumer<Owner.Builder> owner)
The owner of the object
Directory buckets - The bucket owner is returned as the object owner.
Owner.Builder avoiding the need
to create one manually via Owner.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and its result is
passed to owner(Owner).
owner - a consumer that will call methods on Owner.Builderowner(Owner)S3Object.Builder restoreStatus(RestoreStatus restoreStatus)
Specifies the restoration status of an object. Objects in certain storage classes must be restored before they can be retrieved. For more information about these storage classes and how to work with archived objects, see Working with archived objects in the Amazon S3 User Guide.
This functionality is not supported for directory buckets. Directory buckets only support
EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and
ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.
restoreStatus - Specifies the restoration status of an object. Objects in certain storage classes must be restored
before they can be retrieved. For more information about these storage classes and how to work with
archived objects, see Working with
archived objects in the Amazon S3 User Guide.
This functionality is not supported for directory buckets. Directory buckets only support
EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and
ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.
default S3Object.Builder restoreStatus(Consumer<RestoreStatus.Builder> restoreStatus)
Specifies the restoration status of an object. Objects in certain storage classes must be restored before they can be retrieved. For more information about these storage classes and how to work with archived objects, see Working with archived objects in the Amazon S3 User Guide.
This functionality is not supported for directory buckets. Directory buckets only support
EXPRESS_ONEZONE (the S3 Express One Zone storage class) in Availability Zones and
ONEZONE_IA (the S3 One Zone-Infrequent Access storage class) in Dedicated Local Zones.
RestoreStatus.Builder avoiding
the need to create one manually via RestoreStatus.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and its
result is passed to restoreStatus(RestoreStatus).
restoreStatus - a consumer that will call methods on RestoreStatus.BuilderrestoreStatus(RestoreStatus)Copyright © 2026. All rights reserved.