- java.lang.Object
-
- org.github.gestalt.config.aws.config.AWSBuilder
-
public final class AWSBuilder extends java.lang.ObjectBuilder 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 AWSModuleConfigbuild()static AWSBuilderbuilder()Create a builder to create the AWS config.java.lang.StringgetRegion()Region to use for aws.software.amazon.awssdk.services.s3.S3ClientgetS3Client()Get the S3 Client.software.amazon.awssdk.services.secretsmanager.SecretsManagerClientgetSecretsClient()SecretsManagerClient to use to communicate with AWS.AWSBuildersetRegion(java.lang.String region)Set region to use for aws.AWSBuildersetS3Client(software.amazon.awssdk.services.s3.S3Client s3Client)Set the S3 Client.AWSBuildersetSecretsClient(software.amazon.awssdk.services.secretsmanager.SecretsManagerClient secretsClient)Set the SecretsManagerClient to use to communicate with AWS.
-
-
-
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
-
-