createIfNotExists

Attempts to create a bucket with the given name if it does not already exist in the S3 instance.

Warning This may not be allowed based on the security policy/ permissions granted on the target S3 instance.

Return

A new S3Bucket instance wrapping either the newly created bucket or the pre-existing bucket.

Parameters

name

Name of the bucket to create.


abstract fun createIfNotExists(name: BucketName, action: BucketUpsertParams.() -> Unit): S3Bucket

Attempts to create a bucket with the given name if it does not already exist in the S3 instance.

Warning This may not be allowed based on the security policy/ permissions granted on the target S3 instance.

Return

A new S3Bucket instance wrapping either the newly created bucket or the pre-existing bucket.

Parameters

action

Action used to configure the S3 operation parameters.

Throws

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


Attempts to create a bucket with the given name if it does not already exist in the S3 instance.

Warning This may not be allowed based on the security policy/ permissions granted on the target S3 instance.

Return

A new S3Bucket instance wrapping either the newly created bucket or the pre-existing bucket.

Parameters

params

S3 operation parameters.

Throws

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