AthenaClientFactory.java
クラスは、Amazon Athena クライアントを作成して設定する方法を示しています。
package aws.example.athena;
import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.athena.AthenaClient;
import software.amazon.awssdk.services.athena.AthenaClientBuilder;
public class AthenaClientFactory {
private final AthenaClientBuilder builder = AthenaClient.builder()
.region(Region.US_WEST_2)
.credentialsProvider(ProfileCredentialsProvider.create());
public AthenaClient createClient() {
return builder.build();
}
}