@Configuration
@ConditionalOnBean(value=com.amazonaws.auth.AWSCredentialsProvider.class)
@AutoConfigureAfter(value=org.springframework.cloud.aws.autoconfigure.context.ContextCredentialsAutoConfiguration.class)
@EnableConfigurationProperties(value={AwsCredentialsProperties.class,AwsCredentialsProperties.SpringCloudAwsRegionProperties.class,RetryProperties.class,S3FileTransferProperties.class})
public class GenieAwsS3AutoConfiguration
extends java.lang.Object
| Constructor and Description |
|---|
GenieAwsS3AutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
com.amazonaws.services.s3.AmazonS3 |
amazonS3(com.amazonaws.auth.AWSCredentialsProvider credentialsProvider,
com.amazonaws.ClientConfiguration clientConfiguration,
AwsCredentialsProperties.SpringCloudAwsRegionProperties springCloudAwsRegionProperties,
AwsCredentialsProperties awsCredentialsProperties)
Amazon S3 client configured using either the default credentials provider or an
STSAssumeRoleSessionCredentialsProvider if a role is desired to be assumed. |
com.amazonaws.ClientConfiguration |
genieAwsClientConfiguration(RetryProperties retryProperties)
Default AWS client configuration that sets the number of retries provided by the user.
|
S3FileTransferImpl |
s3FileTransferImpl(com.amazonaws.services.s3.AmazonS3 amazonS3,
io.micrometer.core.instrument.MeterRegistry registry,
S3FileTransferProperties s3FileTransferProperties)
Returns a bean which has an s3 implementation of the File Transfer interface.
|
@Bean
@ConditionalOnMissingBean(name="genieAwsClientConfiguration",
value=com.amazonaws.ClientConfiguration.class)
public com.amazonaws.ClientConfiguration genieAwsClientConfiguration(RetryProperties retryProperties)
retryProperties - The properties related to retry configuration in Genie@Bean
public com.amazonaws.services.s3.AmazonS3 amazonS3(com.amazonaws.auth.AWSCredentialsProvider credentialsProvider,
com.amazonaws.ClientConfiguration clientConfiguration,
AwsCredentialsProperties.SpringCloudAwsRegionProperties springCloudAwsRegionProperties,
AwsCredentialsProperties awsCredentialsProperties)
STSAssumeRoleSessionCredentialsProvider if a role is desired to be assumed.credentialsProvider - The default credentials provider to useclientConfiguration - The client configuration to usespringCloudAwsRegionProperties - Properties for the region coming from Spring Cloud AWSawsCredentialsProperties - The properties under the Genie namespace related to AWS context@Bean(name={"file.system.s3","file.system.s3n","file.system.s3a"})
@Order(value=1)
public S3FileTransferImpl s3FileTransferImpl(com.amazonaws.services.s3.AmazonS3 amazonS3,
io.micrometer.core.instrument.MeterRegistry registry,
S3FileTransferProperties s3FileTransferProperties)
amazonS3 - S3 client to useregistry - The metrics registry to uses3FileTransferProperties - Configuration properties