BucketName

value class BucketName(val name: String)

Validating bucket name wrapper.

Wraps a bucket name value and enforces the following validity rules:

  • Bucket names must be between 3 (min) and 63 (max) characters.

  • Bucket names must consist of only lowercase letters, numbers, dots (.), and hyphens (-).

  • Bucket names must begin and end with a letter or number.

  • Bucket names must not be formatted as an IP address (for example, 192.168.5.4).

  • Bucket names must not start with the prefix "xn--".

  • Bucket names must not end with the suffix "-s3alias".

If any of the above are true, then the creation of this type will fail with an IllegalArgumentException.

Author

Elizabeth Paige Harper https://github.com/Foxcapades

Since

v0.1.0

Parameters

name

Valid bucket name.

Throws

If the input name value violates any of the bucket naming rules above.

Constructors

Link copied to clipboard
fun BucketName(name: String)

Tests the input string and creates a new BucketName instance.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard