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 by
AmazonS3EncryptionClient
.
If EncryptedGetObjectRequest
is used against the non-encrypting
AmazonS3Client
, 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.
NOOP
Constructor and Description |
---|
EncryptedGetObjectRequest(S3ObjectId s3ObjectId) |
EncryptedGetObjectRequest(String bucketName,
String key) |
EncryptedGetObjectRequest(String bucketName,
String key,
boolean isRequesterPays) |
EncryptedGetObjectRequest(String bucketName,
String key,
String versionId) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
ExtraMaterialsDescription |
getExtraMaterialDescription()
Returns the supplemental material description to be used for retrieving
the encryption materials.
|
String |
getInstructionFileSuffix() |
Integer |
getPartNumber()
Deprecated.
|
long[] |
getRange()
Deprecated.
|
int |
hashCode() |
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) |
void |
setPartNumber(Integer partNumber)
Deprecated.
|
void |
setRange(long start)
Deprecated.
|
void |
setRange(long start,
long end)
Deprecated.
|
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 for
setKeyWrapExpected(boolean) . |
EncryptedGetObjectRequest |
withPartNumber(Integer partNumber)
Deprecated.
|
EncryptedGetObjectRequest |
withRange(long start)
Deprecated.
|
EncryptedGetObjectRequest |
withRange(long start,
long end)
Deprecated.
|
getBucketName, getExpectedBucketOwner, getKey, getMatchingETagConstraints, getModifiedSinceConstraint, getNonmatchingETagConstraints, getProgressListener, getResponseHeaders, getS3ObjectId, getSSECustomerKey, getUnmodifiedSinceConstraint, getVersionId, isRequesterPays, setBucketName, setExpectedBucketOwner, setKey, setMatchingETagConstraints, setModifiedSinceConstraint, setNonmatchingETagConstraints, setProgressListener, setRequesterPays, setResponseHeaders, setS3ObjectId, setSSECustomerKey, setUnmodifiedSinceConstraint, setVersionId, withBucketName, withExpectedBucketOwner, withKey, withMatchingETagConstraint, withModifiedSinceConstraint, withNonmatchingETagConstraint, withProgressListener, withRequesterPays, withResponseHeaders, withS3ObjectId, withSSECustomerKey, withUnmodifiedSinceConstraint, withVersionId
addHandlerContext, clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public EncryptedGetObjectRequest(String bucketName, String key, String versionId)
public EncryptedGetObjectRequest(S3ObjectId s3ObjectId)
@Deprecated public EncryptedGetObjectRequest withRange(long start, long end)
Sets the optional inclusive byte range within the desired object that
will be downloaded by this request.
Returns this GetObjectRequest
, enabling additional method
calls to be chained together.
The first byte in an object has position 0; as an example, the first ten bytes of an object can be downloaded by specifying a range of 0 to 9.
If no byte range is specified, this request downloads the entire object from Amazon S3.
Range gets do not provide authenticated encryption properties even when used with an authenticated mode (AES-GCM).
withRange
in class GetObjectRequest
start
- The start of the inclusive byte range to download.end
- The end of the inclusive byte range to download.GetObjectRequest
, enabling additional method
calls to be chained together.GetObjectRequest.getRange()
,
GetObjectRequest.setRange(long, long)
@Deprecated public void setRange(long start, long end)
Sets the optional inclusive byte range within the desired object that will be downloaded by this request.
The first byte in an object has position 0; as an example, the first ten bytes of an object can be downloaded by specifying a range of 0 to 9.
If no byte range is specified, this request downloads the entire object from Amazon S3.
Range gets do not provide authenticated encryption properties even when used with an authenticated mode (AES-GCM).
setRange
in class GetObjectRequest
start
- The start of the inclusive byte range to download.end
- The end of the inclusive byte range to download.GetObjectRequest.getRange()
,
GetObjectRequest.withRange(long, long)
@Deprecated public EncryptedGetObjectRequest withRange(long start)
Sets the optional inclusive start range within the desired object that the rest of which will be downloaded by this request.
Returns thisGetObjectRequest
, enabling additional method
calls to be chained together.
The first byte in an object has position 0; as an example, the object is of 10 bytes in length, the last 4 bytes can be downloaded by specifying the start range as 6.
If no byte range is specified, this request downloads the entire object from Amazon S3.
Range gets do not provide authenticated encryption properties even when used with an authenticated mode (AES-GCM).
withRange
in class GetObjectRequest
start
- The start of the inclusive byte range to download.GetObjectRequest
, enabling additional method
calls to be chained together.GetObjectRequest.withRange(long, long)
,
GetObjectRequest.setRange(long)
@Deprecated public void setRange(long start)
Sets the optional inclusive start range within the desired object that the rest of which will be downloaded by this request.
The first byte in an object has position 0; as an example, the object is of 10 bytes in length, the last 4 bytes can be downloaded by specifying the start range as 6.
If no byte range is specified, this request downloads the entire object from Amazon S3.
Range gets do not provide authenticated encryption properties even when used with an authenticated mode (AES-GCM).
setRange
in class GetObjectRequest
start
- The start of the inclusive byte range to download.GetObjectRequest.setRange(long, long)
,
GetObjectRequest.withRange(long)
@Deprecated public long[] getRange()
Gets the optional inclusive byte range within the desired object that will be downloaded by this request.
The range is returned as
a two element array, containing the start and end index of the byte range.
If no byte range has been specified, the entire object is downloaded and
this method returns null
.
Range gets do not provide authenticated encryption properties even when used with an authenticated mode (AES-GCM).
getRange
in class GetObjectRequest
null
if no range has been specified,
and the whole object is
to be downloaded.GetObjectRequest.setRange(long, long)
,
GetObjectRequest.withRange(long, long)
@Deprecated public EncryptedGetObjectRequest withPartNumber(Integer partNumber)
Sets the optional part number that indicates the part to be downloaded in a multipart object.
The valid range for part number is 1 - 10000 inclusive. Part numbers are 1 based. If an object has 1 part, partNumber=1 would be the correct not 0. For partNumber < 1, an AmazonS3Exception is thrown with response code 400 bad request. For partNumber larger than actual part count, an AmazonS3Exception is thrown with response code 416 Request Range Not Satisfiable.
Range gets do not provide authenticated encryption properties even when used with an authenticated mode (AES-GCM).
withPartNumber
in class GetObjectRequest
partNumber
- The part number representing a part in a multipart object.GetObjectRequest
, enabling additional method
calls to be chained together.GetObjectRequest.getPartNumber()
,
GetObjectRequest.setPartNumber(Integer)
@Deprecated public void setPartNumber(Integer partNumber)
Sets the optional part number that indicates the part to be downloaded in a multipart object.
The valid range for part number is 1 - 10000 inclusive. Part numbers are 1 based. If an object has 1 part, partNumber=1 would be the correct not 0. For partNumber < 1, an AmazonS3Exception is thrown with response code 400 bad request. For partNumber larger than actual part count, an AmazonS3Exception is thrown with response code 416 Request Range Not Satisfiable.
Range gets do not provide authenticated encryption properties even when used with an authenticated mode (AES-GCM).
setPartNumber
in class GetObjectRequest
partNumber
- The part number representing a part in a multipart object.GetObjectRequest.getPartNumber()
,
GetObjectRequest.withPartNumber(Integer)
@Deprecated public Integer getPartNumber()
Returns the optional part number that indicates the part to be downloaded in a multipart object.
Range gets do not provide authenticated encryption properties even when used with an authenticated mode (AES-GCM).
getPartNumber
in class GetObjectRequest
GetObjectRequest.setPartNumber(Integer)
,
GetObjectRequest.withPartNumber(Integer)
public ExtraMaterialsDescription getExtraMaterialDescription()
public void setExtraMaterialDescription(ExtraMaterialsDescription supplemental)
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 onpublic EncryptedGetObjectRequest withExtraMaterialsDescription(ExtraMaterialsDescription supplemental)
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 onpublic EncryptedGetObjectRequest withExtraMaterialsDescription(Map<String,String> supplemental)
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 onpublic String getInstructionFileSuffix()
public void setInstructionFileSuffix(String instructionFileSuffix)
instructionFileSuffix
- suffix of the instruction file to be used.AmazonS3EncryptionClient.putInstructionFile(PutInstructionFileRequest)
public EncryptedGetObjectRequest withInstructionFileSuffix(String instructionFileSuffix)
instructionFileSuffix
- suffix of the instruction file to be used.AmazonS3EncryptionClient.putInstructionFile(PutInstructionFileRequest)
public boolean isKeyWrapExpected()
CryptoMode.StrictAuthenticatedEncryption
or KMS is in
use, key wrapping is always expected for the CEK regardless.public void setKeyWrapExpected(boolean keyWrapExpected)
keyWrapExpected
- true if key wrapping is expected for the CEK; false otherwse.
Note, however, that if
CryptoMode.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.
public EncryptedGetObjectRequest withKeyWrapExpected(boolean keyWrapExpected)
setKeyWrapExpected(boolean)
.public boolean equals(Object o)
equals
in class GetObjectRequest
public int hashCode()
hashCode
in class GetObjectRequest
Copyright © 2023. All rights reserved.