create

abstract fun create(name: BucketName): S3Bucket

Attempts to create a bucket with the given name.

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

Return

A new S3Bucket instance wrapping the newly created bucket.

Parameters

name

Name of the bucket to create.

Throws

If a bucket already exists in the S3 store with the given name, and it was created by a user with the given access credentials.

If a bucket already exists in the S3 store with the given name.

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


abstract fun create(name: BucketName, action: BucketPutParams.() -> Unit): S3Bucket

Attempts to create a bucket with the given name with the operation configured by the given action.

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

Return

A new S3Bucket instance wrapping the newly created bucket.

Parameters

action

Action to configure the S3 operation.

Throws

If a bucket already exists in the S3 store with the given name, and it was created by a user with the given access credentials.

If a bucket already exists in the S3 store with the given name.

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


abstract fun create(name: BucketName, params: BucketPutParams): S3Bucket

Attempts to create a bucket with the given name with the operation configured by the given params.

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

Return

A new S3Bucket instance wrapping the newly created bucket.

Parameters

params

S3 operation parameters.

Throws

If a bucket already exists in the S3 store with the given name, and it was created by a user with the given access credentials.

If a bucket already exists in the S3 store with the given name.

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