/** * Sets the optional customer-provided server-side encryption key to use * when retrieving the metadata of a server-side encrypted object, and * retuns the updated request object so that additional method calls can be * chained together. * * @param sseKey * The optional customer-provided server-side encryption key to * use when retrieving the metadata of a server-side encrypted * object. * * @return This updated request object so that additional method calls can * be chained together. */ public GetObjectMetadataRequest withSSECustomerKey(SSECustomerKey sseKey) { setSSECustomerKey(sseKey); return this; }
/** * Sets the optional customer-provided server-side encryption key to use * when retrieving the metadata of a server-side encrypted object, and * retuns the updated request object so that additional method calls can be * chained together. * * @param sseKey * The optional customer-provided server-side encryption key to * use when retrieving the metadata of a server-side encrypted * object. * * @return This updated request object so that additional method calls can * be chained together. */ public GetObjectMetadataRequest withSSECustomerKey(SSECustomerKey sseKey) { setSSECustomerKey(sseKey); return this; }
/** * Sets the optional customer-provided server-side encryption key to use * when retrieving the metadata of a server-side encrypted object, and * retuns the updated request object so that additional method calls can be * chained together. * * @param sseKey * The optional customer-provided server-side encryption key to * use when retrieving the metadata of a server-side encrypted * object. * * @return This updated request object so that additional method calls can * be chained together. */ public GetObjectMetadataRequest withSSECustomerKey(SSECustomerKey sseKey) { setSSECustomerKey(sseKey); return this; }
/** * Sets the optional customer-provided server-side encryption key to use * when retrieving the metadata of a server-side encrypted object, and * retuns the updated request object so that additional method calls can be * chained together. * * @param sseKey * The optional customer-provided server-side encryption key to * use when retrieving the metadata of a server-side encrypted * object. * * @return This updated request object so that additional method calls can * be chained together. */ public GetObjectMetadataRequest withSSECustomerKey(SSECustomerKey sseKey) { setSSECustomerKey(sseKey); return this; }
getObjectMetadataRequest.setSSECustomerKey(getObjectRequest.getSSECustomerKey());
private ObjectMetadata getObjectMetadata(S3ResourceId s3ResourceId) throws AmazonClientException { GetObjectMetadataRequest request = new GetObjectMetadataRequest(s3ResourceId.getBucket(), s3ResourceId.getKey()); request.setSSECustomerKey(options.getSSECustomerKey()); return amazonS3.getObjectMetadata(request); }
sseKey.setMd5(md5.get()); req.setSSECustomerKey(sseKey);
/** * Request object metadata; increments counters in the process. * Retry policy: retry untranslated. * @param key key * @return the metadata * @throws IOException if the retry invocation raises one (it shouldn't). */ @Retries.RetryRaw protected ObjectMetadata getObjectMetadata(String key) throws IOException { GetObjectMetadataRequest request = new GetObjectMetadataRequest(bucket, key); //SSE-C requires to be filled in if enabled for object metadata if(S3AEncryptionMethods.SSE_C.equals(serverSideEncryptionAlgorithm) && isNotBlank(getServerSideEncryptionKey(bucket, getConf()))){ request.setSSECustomerKey(generateSSECustomerKey()); } ObjectMetadata meta = invoker.retryUntranslated("GET " + key, true, () -> { incrementStatistic(OBJECT_METADATA_REQUESTS); return s3.getObjectMetadata(request); }); incrementReadOperations(); return meta; }
getObjectMetadataRequest.setSSECustomerKey(getObjectRequest.getSSECustomerKey());