public class EncryptedGetObjectRequest extends GetObjectRequest implements java.io.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.
Constructor and Description |
---|
EncryptedGetObjectRequest(S3ObjectId s3ObjectId) |
EncryptedGetObjectRequest(java.lang.String bucketName,
java.lang.String key) |
EncryptedGetObjectRequest(java.lang.String bucketName,
java.lang.String key,
boolean isRequesterPays) |
EncryptedGetObjectRequest(java.lang.String bucketName,
java.lang.String key,
java.lang.String versionId) |
Modifier and Type | Method and Description |
---|---|
ExtraMaterialsDescription |
getExtraMaterialDescription()
Returns the supplemental material description to be used for retrieving
the encryption materials.
|
java.lang.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(java.lang.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(java.util.Map<java.lang.String,java.lang.String> supplemental)
Fluent API to set the supplemental materials description for the
encryption materials to be used with the current request.
|
EncryptedGetObjectRequest |
withInstructionFileSuffix(java.lang.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) . |
getBucketName, getGeneralProgressListener, getKey, getMatchingETagConstraints, getModifiedSinceConstraint, getNonmatchingETagConstraints, getPartNumber, getProgressListener, getRange, getResponseHeaders, getS3ObjectId, getSSECustomerKey, getUnmodifiedSinceConstraint, getVersionId, isRequesterPays, setBucketName, setGeneralProgressListener, setKey, setMatchingETagConstraints, setModifiedSinceConstraint, setNonmatchingETagConstraints, setPartNumber, setProgressListener, setRange, setRange, setRequesterPays, setResponseHeaders, setS3ObjectId, setSSECustomerKey, setUnmodifiedSinceConstraint, setVersionId, withBucketName, withGeneralProgressListener, withKey, withMatchingETagConstraint, withModifiedSinceConstraint, withNonmatchingETagConstraint, withPartNumber, withProgressListener, withRange, withRange, withRequesterPays, withResponseHeaders, withS3ObjectId, withSSECustomerKey, withUnmodifiedSinceConstraint, withVersionId
clone, getCloneRoot, getCloneSource, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public EncryptedGetObjectRequest(java.lang.String bucketName, java.lang.String key)
public EncryptedGetObjectRequest(java.lang.String bucketName, java.lang.String key, java.lang.String versionId)
public EncryptedGetObjectRequest(S3ObjectId s3ObjectId)
public EncryptedGetObjectRequest(java.lang.String bucketName, java.lang.String key, boolean isRequesterPays)
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(java.util.Map<java.lang.String,java.lang.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 java.lang.String getInstructionFileSuffix()
public void setInstructionFileSuffix(java.lang.String instructionFileSuffix)
instructionFileSuffix
- suffix of the instruction file to be used.AmazonS3EncryptionClient.putInstructionFile(PutInstructionFileRequest)
public EncryptedGetObjectRequest withInstructionFileSuffix(java.lang.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)
.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.