S3Client

interface S3Client

S3 client wrapper protocol mainly used for providing an abstraction layer on top of AWS S3 SDK.

Inheritors

Types

Link copied to clipboard
data class KeyOptions(val isKeyCredentialled: Boolean = false)

Options for key handling in AWS S3 operations.

Properties

Link copied to clipboard
abstract val bucket: String

S3 bucket used by Email Service for storing RFC822 data.

Link copied to clipboard
abstract val region: String

AWS region hosting the S3 bucket.

Functions

Link copied to clipboard
abstract suspend fun delete(objectId: String, options: S3Client.KeyOptions = KeyOptions())

Deletes a RFC822 data from AWS S3.

Link copied to clipboard
abstract suspend fun download(key: String, options: S3Client.KeyOptions = KeyOptions()): ByteArray

Downloads a RFC822 data from AWS S3.

Link copied to clipboard
abstract suspend fun getObjectMetadata(key: String, options: S3Client.KeyOptions = KeyOptions()): ObjectMetadata

Returns the metadata associated with the object with the given key.

Link copied to clipboard
abstract suspend fun list(prefix: String, limit: Int? = null, nextToken: String? = null, options: S3Client.KeyOptions = KeyOptions()): S3ClientListResult

Returns a list of objects from AWS S3

Link copied to clipboard
abstract suspend fun updateObjectMetadata(key: String, metadata: Map<String, String>, options: S3Client.KeyOptions = KeyOptions())

Updates the metadata associated with the object with the given key.

Link copied to clipboard
abstract suspend fun upload(data: ByteArray, objectId: String, metadata: Map<String, String>? = null, options: S3Client.KeyOptions = KeyOptions()): String

Uploads a RFC822 data to AWS S3.