class S3 extends AnyRef
Wrapper of AWS SDK's S3AsyncClient into fs2.Stream and cats.effect.IO
- Alphabetic
- By Inheritance
- S3
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new S3(s3: S3AsyncClient)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def delete(bucket: String, key: String): IO[Unit]
Deletes a file in a single request.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def getObjectMetadata(bucket: String, key: String): IO[Option[HeadObjectResponse]]
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def io[J, A](fut: => CompletableFuture[A]): IO[A]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def readFile(bucket: String, key: String): Stream[IO, Byte]
Reads a file in a single request.
Reads a file in a single request. Suitable for small files.
For big files, consider using readFileMultipart instead.
- def readFileMultipart(bucket: String, key: String, partSize: Int): Stream[IO, Byte]
Reads a file in multiple parts of the specified @partSize per request.
Reads a file in multiple parts of the specified @partSize per request. Suitable for big files.
It does so in constant memory. So at a given time, only the number of bytes indicated by @partSize will be loaded in memory.
For small files, consider using readFile instead.
- partSize
in megabytes
- val s3: S3AsyncClient
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def uploadFile(bucket: String, key: String, cannedAcl: List[String], serverSideEncryption: Option[String], grantFullControl: List[String]): Pipe[IO, Byte, PutObjectResponse]
Uploads a file in a single request.
Uploads a file in a single request. Suitable for small files.
For big files, consider using uploadFileMultipart instead.
- def uploadFileMultipart(bucket: String, key: String, partSize: Int, multiPartConcurrency: Int, cannedAcl: List[String], serverSideEncryption: Option[String], grantFullControl: List[String]): Pipe[IO, Byte, S3UploadResponse]
Uploads a file in multiple parts of the specified @partSize per request.
Uploads a file in multiple parts of the specified @partSize per request. Suitable for big files.
It does so in constant memory. So at a given time, only the number of bytes indicated by @partSize will be loaded in memory.
Note: AWS S3 API does not support uploading empty files via multipart upload. It does not gracefully respond on attempting to do this and returns a
400
response with a generic error message. This function accepts a booleanuploadEmptyFile
(set tofalse
by default) to determine how to handle this scenario. If set to false (default) and no data has passed through the stream, it will gracefully abort the multi-part upload request. If set to true, and no data has passed through the stream, an empty file will be uploaded on completion. AnOption[ETag]
ofNone
will be emitted on the stream if no file was uploaded, else aSome(ETag)
will be emitted. Alternatively, If you need to create empty files, consider using consider using uploadFile instead.For small files, consider using uploadFile instead.
- bucket
the bucket name
- key
the target file key
- partSize
the part size indicated in MBs. It must be at least 5, as required by AWS.
- multiPartConcurrency
the number of concurrent parts to upload
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)