Package org.flywaydb.locations.s3
Class AwsS3Scanner
java.lang.Object
org.flywaydb.core.internal.scanner.cloud.CloudScanner
org.flywaydb.locations.s3.AwsS3Scanner
public class AwsS3Scanner
extends org.flywaydb.core.internal.scanner.cloud.CloudScanner
-
Field Summary
Fields inherited from class org.flywaydb.core.internal.scanner.cloud.CloudScanner
encoding -
Constructor Summary
ConstructorsConstructorDescriptionAwsS3Scanner(Charset encoding, boolean throwOnMissingLocations) Creates a new AWS S3 scanner. -
Method Summary
Modifier and TypeMethodDescriptionCollection<org.flywaydb.core.api.resource.LoadableResource> scanForResources(org.flywaydb.core.api.Location location) Scans S3 for the resources.Methods inherited from class org.flywaydb.core.internal.scanner.cloud.CloudScanner
getBucketName, getPrefix
-
Constructor Details
-
AwsS3Scanner
Creates a new AWS S3 scanner.- Parameters:
encoding- The encoding to use.throwOnMissingLocations- whether to throw on missing locations.
-
-
Method Details
-
scanForResources
public Collection<org.flywaydb.core.api.resource.LoadableResource> scanForResources(org.flywaydb.core.api.Location location) Scans S3 for the resources. In AWS SDK v2, only the region that the client is configured with can be used. The format of the path is expected to bes3:{bucketName}/{optional prefix}.- Specified by:
scanForResourcesin classorg.flywaydb.core.internal.scanner.cloud.CloudScanner- Parameters:
location- The location in S3 to start searching. Subdirectories are also searched.- Returns:
- The resources that were found.
-