Class AWSBuilder


  • public final class AWSBuilder
    extends java.lang.Object
    Builder for creating AWS specific configuration. You can either specify the region and Gestalt will use defaults to build the SecretsManagerClient or you can provide a SecretsManagerClient yourself.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AWSModuleConfig build()  
      static AWSBuilder builder()
      Create a builder to create the AWS config.
      java.lang.String getRegion()
      Region to use for aws.
      software.amazon.awssdk.services.s3.S3Client getS3Client()
      Get the S3 Client.
      software.amazon.awssdk.services.secretsmanager.SecretsManagerClient getSecretsClient()
      SecretsManagerClient to use to communicate with AWS.
      AWSBuilder setRegion​(java.lang.String region)
      Set region to use for aws.
      AWSBuilder setS3Client​(software.amazon.awssdk.services.s3.S3Client s3Client)
      Set the S3 Client.
      AWSBuilder setSecretsClient​(software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsClient)
      Set the SecretsManagerClient to use to communicate with AWS.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • builder

        public static AWSBuilder builder()
        Create a builder to create the AWS config.
        Returns:
        a builder to create the AWS config.
      • getRegion

        public java.lang.String getRegion()
        Region to use for aws.
        Returns:
        Region to use for aws
      • setRegion

        public AWSBuilder setRegion​(java.lang.String region)
        Set region to use for aws.
        Parameters:
        region - region to use for aws
        Returns:
        the builder
      • build

        public AWSModuleConfig build()
                              throws org.github.gestalt.config.exceptions.GestaltConfigurationException
        Throws:
        org.github.gestalt.config.exceptions.GestaltConfigurationException
      • getSecretsClient

        public software.amazon.awssdk.services.secretsmanager.SecretsManagerClient getSecretsClient()
        SecretsManagerClient to use to communicate with AWS.
        Returns:
        SecretsManagerClient to use to communicate with AWS.
      • setSecretsClient

        public AWSBuilder setSecretsClient​(software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsClient)
        Set the SecretsManagerClient to use to communicate with AWS. If this is not set, then you must provide the region, and it will be constructed using defaults.
        Parameters:
        secretsClient - Set the SecretsManagerClient to use to communicate with AWS.
        Returns:
        the builder
      • getS3Client

        public software.amazon.awssdk.services.s3.S3Client getS3Client()
        Get the S3 Client.
        Returns:
        the S3 Client.
      • setS3Client

        public AWSBuilder setS3Client​(software.amazon.awssdk.services.s3.S3Client s3Client)
        Set the S3 Client.
        Parameters:
        s3Client - the S3 Client
        Returns:
        the builder