Class EncryptedGetObjectRequest

    • Constructor Detail

      • EncryptedGetObjectRequest

        public EncryptedGetObjectRequest​(String bucketName,
                                         String key)
      • EncryptedGetObjectRequest

        public EncryptedGetObjectRequest​(String bucketName,
                                         String key,
                                         String versionId)
      • EncryptedGetObjectRequest

        public EncryptedGetObjectRequest​(S3ObjectId s3ObjectId)
      • EncryptedGetObjectRequest

        public EncryptedGetObjectRequest​(String bucketName,
                                         String key,
                                         boolean isRequesterPays)
    • 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 if CryptoMode.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 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.