1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 package software.amazon.awssdk.crt.s3; 6 7 import java.util.concurrent.CompletableFuture; 8 9 import software.amazon.awssdk.crt.auth.credentials.Credentials; 10 11 /** 12 * Interface to override the S3Express Credentials provider. 13 */ 14 public interface S3ExpressCredentialsProviderHandler { 15 /** 16 * To resolve the S3Express Credentials. Invoked when a single request needs to be signed. 17 * 18 * @param properties The properties needed to derive the S3Express credentials from. 19 * @param origCredentials The original Credentials for fetching S3Express credentials. 20 * @return The future to be resolved when the S3 Express credentials are resolved. 21 */ getS3ExpressCredentials(S3ExpressCredentialsProperties properties, Credentials origCredentials)22 public CompletableFuture<Credentials> getS3ExpressCredentials(S3ExpressCredentialsProperties properties, Credentials origCredentials); 23 24 /** 25 * Invoked when the S3 client starts to destroy to clean up related resource. 26 * 27 * @return The future to be resolved when the resource finishes cleaning up. 28 */ destroyProvider()29 public CompletableFuture<Void> destroyProvider(); 30 } 31