Package io.micronaut.aws.sdk.v2
Class CredentialsAndRegionFactory
java.lang.Object
io.micronaut.aws.sdk.v2.CredentialsAndRegionFactory
Factory that creates an AWS credentials and region providers that can read values from the Micronaut environment.
- Since:
- 2.0.0
- Author:
- Álvaro Sánchez-Mariscal
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionsoftware.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain
awsCredentialsProvider
(io.micronaut.context.env.Environment environment) software.amazon.awssdk.regions.providers.AwsRegionProviderChain
awsRegionProvider
(io.micronaut.context.env.Environment environment)
-
Constructor Details
-
CredentialsAndRegionFactory
public CredentialsAndRegionFactory()
-
-
Method Details
-
awsCredentialsProvider
@Bean(preDestroy="close") @Singleton public software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain awsCredentialsProvider(io.micronaut.context.env.Environment environment) - Parameters:
environment
- TheEnvironment
- Returns:
- An
AwsCredentialsProviderChain
that attempts to read the values from the Micronaut environment first, then delegates toDefaultCredentialsProvider
.
-
awsRegionProvider
@Singleton public software.amazon.awssdk.regions.providers.AwsRegionProviderChain awsRegionProvider(io.micronaut.context.env.Environment environment) - Parameters:
environment
- TheEnvironment
- Returns:
- An
AwsRegionProviderChain
that attempts to read the values from the Micronaut environment first, then delegates toDefaultAwsRegionProviderChain
.
-