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

    Constructors
    Constructor
    Description
    AwsS3Scanner(Charset encoding, boolean throwOnMissingLocations)
    Creates a new AWS S3 scanner.
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AwsS3Scanner

      public AwsS3Scanner(Charset encoding, boolean throwOnMissingLocations)
      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 be s3:{bucketName}/{optional prefix}.
      Specified by:
      scanForResources in class org.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.