Class AWSModuleConfig

  • All Implemented Interfaces:
    org.github.gestalt.config.entity.GestaltModuleConfig

    public final class AWSModuleConfig
    extends java.lang.Object
    implements org.github.gestalt.config.entity.GestaltModuleConfig
    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.
    • Constructor Summary

      Constructors 
      Constructor Description
      AWSModuleConfig​(java.lang.String region)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      boolean hasS3Client()
      If the AWS Module Config has an S3 client registered.
      boolean hasSecretsClient()  
      java.lang.String name()  
      void setRegion​(java.lang.String region)
      Set region to use for aws.
      void setS3Client​(software.amazon.awssdk.services.s3.S3Client s3Client)
      Set the S3 Client.
      void 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
    • Constructor Detail

      • AWSModuleConfig

        public AWSModuleConfig​(java.lang.String region)
    • Method Detail

      • name

        public java.lang.String name()
        Specified by:
        name in interface org.github.gestalt.config.entity.GestaltModuleConfig
      • getRegion

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

        public void setRegion​(java.lang.String region)
        Set region to use for aws.
        Parameters:
        region - region to use for aws
      • hasSecretsClient

        public boolean hasSecretsClient()
      • 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 void 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.
      • hasS3Client

        public boolean hasS3Client()
        If the AWS Module Config has an S3 client registered.
        Returns:
        If the AWS Module Config has an S3 client registered.
      • getS3Client

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

        public void setS3Client​(software.amazon.awssdk.services.s3.S3Client s3Client)
        Set the S3 Client.
        Parameters:
        s3Client - the S4 Client used to interact with S3