Class PutObjectResponse
- java.lang.Object
-
- software.amazon.awssdk.core.SdkResponse
-
- software.amazon.awssdk.awscore.AwsResponse
-
- software.amazon.awssdk.services.s3.model.S3Response
-
- software.amazon.awssdk.services.s3.model.PutObjectResponse
-
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<PutObjectResponse.Builder,PutObjectResponse>
@Generated("software.amazon.awssdk:codegen") public final class PutObjectResponse extends S3Response implements ToCopyableBuilder<PutObjectResponse.Builder,PutObjectResponse>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePutObjectResponse.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanbucketKeyEnabled()Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).static PutObjectResponse.Builderbuilder()StringchecksumCRC32()The Base64 encoded, 32-bitCRC32 checksumof the object.StringchecksumCRC32C()The Base64 encoded, 32-bitCRC32Cchecksum of the object.StringchecksumCRC64NVME()The Base64 encoded, 64-bitCRC64NVMEchecksum of the object.StringchecksumSHA1()The Base64 encoded, 160-bitSHA1digest of the object.StringchecksumSHA256()The Base64 encoded, 256-bitSHA256digest of the object.ChecksumTypechecksumType()This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects.StringchecksumTypeAsString()This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)StringeTag()Entity tag for the uploaded object.Stringexpiration()If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, the response includes this header.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()RequestChargedrequestCharged()Returns the value of the RequestCharged property for this object.StringrequestChargedAsString()Returns the value of the RequestCharged property for this object.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends PutObjectResponse.Builder>serializableBuilderClass()ServerSideEncryptionserverSideEncryption()The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.StringserverSideEncryptionAsString()The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.Longsize()The size of the object in bytes.StringsseCustomerAlgorithm()If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.StringsseCustomerKeyMD5()If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.StringssekmsEncryptionContext()If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption.StringssekmsKeyId()If present, indicates the ID of the KMS key that was used for object encryption.PutObjectResponse.BuildertoBuilder()StringtoString()Returns a string representation of this object.StringversionId()Version ID of the object.-
Methods inherited from class software.amazon.awssdk.services.s3.model.S3Response
responseMetadata
-
Methods inherited from class software.amazon.awssdk.core.SdkResponse
sdkHttpResponse
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
expiration
public final String expiration()
If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, the response includes this header. It includes the
expiry-dateandrule-idkey-value pairs that provide information about object expiration. The value of therule-idis URL-encoded.Object expiration information is not returned in directory buckets and this header returns the value "
NotImplemented" in all responses for directory buckets.- Returns:
- If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, the response includes this
header. It includes the
expiry-dateandrule-idkey-value pairs that provide information about object expiration. The value of therule-idis URL-encoded.Object expiration information is not returned in directory buckets and this header returns the value "
NotImplemented" in all responses for directory buckets.
-
eTag
public final String eTag()
Entity tag for the uploaded object.
General purpose buckets - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.
Directory buckets - The ETag for the object in a directory bucket isn't the MD5 digest of the object.
- Returns:
- Entity tag for the uploaded object.
General purpose buckets - To ensure that data is not corrupted traversing the network, for objects where the ETag is the MD5 digest of the object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned ETag to the calculated MD5 value.
Directory buckets - The ETag for the object in a directory bucket isn't the MD5 digest of the object.
-
checksumCRC32
public final String checksumCRC32()
The Base64 encoded, 32-bit
CRC32 checksumof the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.- Returns:
- The Base64 encoded, 32-bit
CRC32 checksumof the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
-
checksumCRC32C
public final String checksumCRC32C()
The Base64 encoded, 32-bit
CRC32Cchecksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.- Returns:
- The Base64 encoded, 32-bit
CRC32Cchecksum of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
-
checksumCRC64NVME
public final String checksumCRC64NVME()
The Base64 encoded, 64-bit
CRC64NVMEchecksum of the object. This header is present if the object was uploaded with theCRC64NVMEchecksum algorithm, or if it was uploaded without a checksum (and Amazon S3 added the default checksum,CRC64NVME, to the uploaded object). For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.- Returns:
- The Base64 encoded, 64-bit
CRC64NVMEchecksum of the object. This header is present if the object was uploaded with theCRC64NVMEchecksum algorithm, or if it was uploaded without a checksum (and Amazon S3 added the default checksum,CRC64NVME, to the uploaded object). For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
-
checksumSHA1
public final String checksumSHA1()
The Base64 encoded, 160-bit
SHA1digest of the object. This checksum is only present if the checksum was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.- Returns:
- The Base64 encoded, 160-bit
SHA1digest of the object. This checksum is only present if the checksum was uploaded with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
-
checksumSHA256
public final String checksumSHA256()
The Base64 encoded, 256-bit
SHA256digest of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.- Returns:
- The Base64 encoded, 256-bit
SHA256digest of the object. This checksum is only present if the checksum was uploaded with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.
-
checksumType
public final ChecksumType checksumType()
This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. For
PutObjectuploads, the checksum type is alwaysFULL_OBJECT. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.If the service returns an enum value that is not available in the current SDK version,
checksumTypewill returnChecksumType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromchecksumTypeAsString().- Returns:
- This header specifies the checksum type of the object, which determines how part-level checksums are
combined to create an object-level checksum for multipart objects. For
PutObjectuploads, the checksum type is alwaysFULL_OBJECT. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide. - See Also:
ChecksumType
-
checksumTypeAsString
public final String checksumTypeAsString()
This header specifies the checksum type of the object, which determines how part-level checksums are combined to create an object-level checksum for multipart objects. For
PutObjectuploads, the checksum type is alwaysFULL_OBJECT. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.If the service returns an enum value that is not available in the current SDK version,
checksumTypewill returnChecksumType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromchecksumTypeAsString().- Returns:
- This header specifies the checksum type of the object, which determines how part-level checksums are
combined to create an object-level checksum for multipart objects. For
PutObjectuploads, the checksum type is alwaysFULL_OBJECT. You can use this header as a data integrity check to verify that the checksum type that is received is the same checksum that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide. - See Also:
ChecksumType
-
serverSideEncryption
public final ServerSideEncryption serverSideEncryption()
The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.
When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is
aws:fsx.If the service returns an enum value that is not available in the current SDK version,
serverSideEncryptionwill returnServerSideEncryption.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromserverSideEncryptionAsString().- Returns:
- The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.
When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is
aws:fsx. - See Also:
ServerSideEncryption
-
serverSideEncryptionAsString
public final String serverSideEncryptionAsString()
The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.
When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is
aws:fsx.If the service returns an enum value that is not available in the current SDK version,
serverSideEncryptionwill returnServerSideEncryption.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromserverSideEncryptionAsString().- Returns:
- The server-side encryption algorithm used when you store this object in Amazon S3 or Amazon FSx.
When accessing data stored in Amazon FSx file systems using S3 access points, the only valid server side encryption option is
aws:fsx. - See Also:
ServerSideEncryption
-
versionId
public final String versionId()
Version ID of the object.
If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see Adding Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For information about returning the versioning state of a bucket, see GetBucketVersioning.
This functionality is not supported for directory buckets.
- Returns:
- Version ID of the object.
If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID for the object being stored. Amazon S3 returns this ID in the response. When you enable versioning for a bucket, if Amazon S3 receives multiple write requests for the same object simultaneously, it stores all of the objects. For more information about versioning, see Adding Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For information about returning the versioning state of a bucket, see GetBucketVersioning.
This functionality is not supported for directory buckets.
-
sseCustomerAlgorithm
public final String sseCustomerAlgorithm()
If server-side encryption with a customer-provided encryption key was requested, the response will include this header to confirm the encryption algorithm that's used.
This functionality is not supported for directory buckets.
- Returns:
- If server-side encryption with a customer-provided encryption key was requested, the response will
include this header to confirm the encryption algorithm that's used.
This functionality is not supported for directory buckets.
-
sseCustomerKeyMD5
public final String sseCustomerKeyMD5()
If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide the round-trip message integrity verification of the customer-provided encryption key.
This functionality is not supported for directory buckets.
- Returns:
- If server-side encryption with a customer-provided encryption key was requested, the response will
include this header to provide the round-trip message integrity verification of the customer-provided
encryption key.
This functionality is not supported for directory buckets.
-
ssekmsKeyId
public final String ssekmsKeyId()
If present, indicates the ID of the KMS key that was used for object encryption.
- Returns:
- If present, indicates the ID of the KMS key that was used for object encryption.
-
ssekmsEncryptionContext
public final String ssekmsEncryptionContext()
If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. This value is stored as object metadata and automatically gets passed on to Amazon Web Services KMS for future
GetObjectoperations on this object.- Returns:
- If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The
value of this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption
context as key-value pairs. This value is stored as object metadata and automatically gets passed on to
Amazon Web Services KMS for future
GetObjectoperations on this object.
-
bucketKeyEnabled
public final Boolean bucketKeyEnabled()
Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).
- Returns:
- Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Key Management Service (KMS) keys (SSE-KMS).
-
size
public final Long size()
The size of the object in bytes. This value is only be present if you append to an object.
This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.
- Returns:
- The size of the object in bytes. This value is only be present if you append to an object.
This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.
-
requestCharged
public final RequestCharged requestCharged()
Returns the value of the RequestCharged property for this object.If the service returns an enum value that is not available in the current SDK version,
requestChargedwill returnRequestCharged.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromrequestChargedAsString().- Returns:
- The value of the RequestCharged property for this object.
- See Also:
RequestCharged
-
requestChargedAsString
public final String requestChargedAsString()
Returns the value of the RequestCharged property for this object.If the service returns an enum value that is not available in the current SDK version,
requestChargedwill returnRequestCharged.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromrequestChargedAsString().- Returns:
- The value of the RequestCharged property for this object.
- See Also:
RequestCharged
-
toBuilder
public PutObjectResponse.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<PutObjectResponse.Builder,PutObjectResponse>- Specified by:
toBuilderin classAwsResponse
-
builder
public static PutObjectResponse.Builder builder()
-
serializableBuilderClass
public static Class<? extends PutObjectResponse.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classAwsResponse
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classAwsResponse
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForFieldin classSdkResponse
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-