Package com.amazonaws.services.s3.model
Class EncryptedGetObjectRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.s3.model.GetObjectRequest
-
- com.amazonaws.services.s3.model.EncryptedGetObjectRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,SSECustomerKeyProvider
,Serializable
,Cloneable
public class EncryptedGetObjectRequest extends GetObjectRequest implements Serializable
An extension of
GetObjectRequest
to allow additional encryption material description to be specified on a per-request basis. In particular,EncryptedGetObjectRequest
is only recognized byAmazonS3EncryptionClient
.If
EncryptedGetObjectRequest
is used against the non-encryptingAmazonS3Client
, the additional attributes will be ignored.The additional material description must not conflict with the existing one saved in S3 or else will cause the get request to fail fast later on.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description EncryptedGetObjectRequest(S3ObjectId s3ObjectId)
EncryptedGetObjectRequest(String bucketName, String key)
EncryptedGetObjectRequest(String bucketName, String key, boolean isRequesterPays)
EncryptedGetObjectRequest(String bucketName, String key, String versionId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtraMaterialsDescription
getExtraMaterialDescription()
Returns the supplemental material description to be used for retrieving the encryption materials.String
getInstructionFileSuffix()
boolean
isKeyWrapExpected()
Returns true if key wrapping is expected; false otherwise.void
setExtraMaterialDescription(ExtraMaterialsDescription supplemental)
Sets the supplemental materials description for the encryption materials to be used with the current request.void
setInstructionFileSuffix(String instructionFileSuffix)
Explicitly sets the suffix of an instruction file to be used to retrieve the S3 encrypted object.void
setKeyWrapExpected(boolean keyWrapExpected)
EncryptedGetObjectRequest
withExtraMaterialsDescription(ExtraMaterialsDescription supplemental)
Sets the supplemental materials description for the encryption materials to be used with the current request.EncryptedGetObjectRequest
withExtraMaterialsDescription(Map<String,String> supplemental)
Fluent API to set the supplemental materials description for the encryption materials to be used with the current request.EncryptedGetObjectRequest
withInstructionFileSuffix(String instructionFileSuffix)
Fluent API to explicitly sets the suffix of an instruction file to be used to retrieve the S3 encrypted object.EncryptedGetObjectRequest
withKeyWrapExpected(boolean keyWrapExpected)
Fluent API forsetKeyWrapExpected(boolean)
.-
Methods inherited from class com.amazonaws.services.s3.model.GetObjectRequest
getBucketName, getKey, getMatchingETagConstraints, getModifiedSinceConstraint, getNonmatchingETagConstraints, getPartNumber, getProgressListener, getRange, getResponseHeaders, getS3ObjectId, getSSECustomerKey, getUnmodifiedSinceConstraint, getVersionId, isRequesterPays, setBucketName, setKey, setMatchingETagConstraints, setModifiedSinceConstraint, setNonmatchingETagConstraints, setPartNumber, setProgressListener, setRange, setRange, setRequesterPays, setResponseHeaders, setS3ObjectId, setSSECustomerKey, setUnmodifiedSinceConstraint, setVersionId, withBucketName, withKey, withMatchingETagConstraint, withModifiedSinceConstraint, withNonmatchingETagConstraint, withPartNumber, withProgressListener, withRange, withRange, withRequesterPays, withResponseHeaders, withS3ObjectId, withSSECustomerKey, withUnmodifiedSinceConstraint, withVersionId
-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Constructor Detail
-
EncryptedGetObjectRequest
public EncryptedGetObjectRequest(String bucketName, String key, String versionId)
-
EncryptedGetObjectRequest
public EncryptedGetObjectRequest(S3ObjectId s3ObjectId)
-
-
Method Detail
-
getExtraMaterialDescription
public ExtraMaterialsDescription getExtraMaterialDescription()
Returns the supplemental material description to be used for retrieving the encryption materials.- Returns:
- the supplemental material description; never null.
-
setExtraMaterialDescription
public void setExtraMaterialDescription(ExtraMaterialsDescription supplemental)
Sets the supplemental materials description for the encryption materials to be used with the current request.- Parameters:
supplemental
- the materialsDescription to set; must not conflict with the existing one saved in S3 or else will cause the get request to fail fast later on
-
withExtraMaterialsDescription
public EncryptedGetObjectRequest withExtraMaterialsDescription(ExtraMaterialsDescription supplemental)
Sets the supplemental materials description for the encryption materials to be used with the current request.- Parameters:
supplemental
- the materialsDescription to set; must not conflict with the existing one saved in S3 or else will cause the get request to fail fast later on
-
withExtraMaterialsDescription
public EncryptedGetObjectRequest withExtraMaterialsDescription(Map<String,String> supplemental)
Fluent API to set the supplemental materials description for the encryption materials to be used with the current request.- Parameters:
supplemental
- the materialsDescription to set; must not conflict with the existing one saved in S3 or else will cause the get request to fail fast later on
-
getInstructionFileSuffix
public String getInstructionFileSuffix()
-
setInstructionFileSuffix
public void setInstructionFileSuffix(String instructionFileSuffix)
Explicitly sets the suffix of an instruction file to be used to retrieve the S3 encrypted object. Typically this is for more advanced use cases where multiple crypto instruction files have been created for the same S3 object. Each instruction file contains the same CEK encrypted under a different KEK, the IV, and other meta information (aka material description).- Parameters:
instructionFileSuffix
- suffix of the instruction file to be used.- See Also:
AmazonS3EncryptionClient.putInstructionFile(PutInstructionFileRequest)
-
withInstructionFileSuffix
public EncryptedGetObjectRequest withInstructionFileSuffix(String instructionFileSuffix)
Fluent API to explicitly sets the suffix of an instruction file to be used to retrieve the S3 encrypted object. Typically this is for more advanced use cases where multiple crypto instruction files have been created for the same S3 object. Each instruction file contains the same CEK encrypted under a different KEK, the IV, and other meta information (aka material description).- Parameters:
instructionFileSuffix
- suffix of the instruction file to be used.- See Also:
AmazonS3EncryptionClient.putInstructionFile(PutInstructionFileRequest)
-
isKeyWrapExpected
public boolean isKeyWrapExpected()
Returns true if key wrapping is expected; false otherwise. Note, however, that ifCryptoMode.StrictAuthenticatedEncryption
or KMS is in use, key wrapping is always expected for the CEK regardless.
-
setKeyWrapExpected
public void setKeyWrapExpected(boolean keyWrapExpected)
- Parameters:
keyWrapExpected
- true if key wrapping is expected for the CEK; false otherwse. Note, however, that ifCryptoMode.StrictAuthenticatedEncryption
or KMS is in use, key wrapping is always expected for the CEK regardless.If keyWrapExpected is set to true but the CEK is found to be not key-wrapped, it would cause a
KeyWrapException
to be thrown.
-
withKeyWrapExpected
public EncryptedGetObjectRequest withKeyWrapExpected(boolean keyWrapExpected)
Fluent API forsetKeyWrapExpected(boolean)
.
-
-