withBucket

abstract fun <R> withBucket(name: BucketName, action: S3Bucket.() -> R): R

Executes the given action on the target bucket.

Parameters

name

Name of the target bucket.

action

Action that will be called on the S3Bucket handle on the target bucket.

Throws

If the target bucket does not exist.

If an implementation specific exception is thrown. The implementation specific exception will be set to the thrown exception's 'cause' value.