AwsS3Api

org.encalmo.aws.AwsS3Api
object AwsS3Api

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
AwsS3Api.type

Members list

Value members

Concrete methods

def checkObjectExists(bucketName: String, objectKey: String)(using aws: AwsClient): Boolean
def checkObjectNotExists(bucketName: String, objectKey: String)(using aws: AwsClient): Boolean
inline def createBucket(bucketName: String)(using aws: AwsClient): Boolean

Creates an Amazon S3 bucket.

Creates an Amazon S3 bucket.

Attributes

def createPresignedGetUrl(bucketName: String, objectKey: String, durationMinutes: Int)(using aws: AwsClient): String
def createPresignedPutUrl(bucketName: String, objectKey: String, durationMinutes: Int, metadata: Map[String, String])(using aws: AwsClient): String
inline def getObjectAttributes(bucketName: String, objectKey: String)(using aws: AwsClient): GetObjectAttributesResponse

Retrieves all the metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

Retrieves all the metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

Attributes

def getObjectInputStream(bucketName: String, objectKey: String)(using aws: AwsClient): InputStream

Retrieves an object from Amazon S3.

Retrieves an object from Amazon S3.

Attributes

def getObjectMetadata(bucketName: String, objectKey: String)(using aws: AwsClient): Map[String, String]

Returns a map of metadata of the object in S3.

Returns a map of metadata of the object in S3.

Attributes

def headObject(bucketName: String, objectKey: String)(using aws: AwsClient): HeadObjectResponse

The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're interested only in an object's metadata.

A HEAD request has the same options as a GET operation on an object. The response is identical to the GET response except that there is no response body. Because of this, if the HEAD request generates an error, it returns a generic code, such as 400 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed, 412 Precondition Failed, or 304 Not Modified. It's not possible to retrieve the exact exception of these error codes.

Attributes

inline def listBucketObjects(bucketName: String)(using aws: AwsClient): Seq[S3Object]

Returns some or all (up to 1,000) of the objects in a bucket.

Returns some or all (up to 1,000) of the objects in a bucket.

Attributes

inline def listBucketObjects(bucketName: String, objectKeyPrefix: String)(using aws: AwsClient): Seq[S3Object]

Returns some or all (up to 1,000) of the objects in a bucket. Limits the response to keys that begin with the specified prefix.

Returns some or all (up to 1,000) of the objects in a bucket. Limits the response to keys that begin with the specified prefix.

Attributes

inline def listBuckets()(using aws: AwsClient): Seq[Bucket]

Returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the aws.s3:ListAllMyBuckets permission.

Returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the aws.s3:ListAllMyBuckets permission.

Attributes

def putObjectUsingByteArray(bucketName: String, objectKey: String, bytes: Array[Byte], metadata: Map[String, String])(using aws: AwsClient): PutObjectResponse

Adds an object to a bucket.

Adds an object to a bucket.

Attributes

def putObjectUsingByteBuffer(bucketName: String, objectKey: String, buffer: ByteBuffer, metadata: Map[String, String])(using aws: AwsClient): PutObjectResponse

Adds an object to a bucket.

Adds an object to a bucket.

Attributes

def putObjectUsingPath(bucketName: String, objectKey: String, path: Path, metadata: Map[String, String])(using aws: AwsClient): PutObjectResponse

Adds an object to a bucket.

Adds an object to a bucket.

Attributes