Enum BucketNamespace

java.lang.Object
java.lang.Enum<BucketNamespace>
software.amazon.awscdk.services.s3.BucketNamespace
All Implemented Interfaces:
Serializable, Comparable<BucketNamespace>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)", date="2026-05-19T19:44:49.413Z") @Stability(Stable) public enum BucketNamespace extends Enum<BucketNamespace>
The namespace for the bucket name when using bucketNamePrefix.

Determines how CloudFormation generates the unique portion of the bucket name.

Example:

 Bucket.Builder.create(this, "MyBucket")
         .bucketNamePrefix("my-app")
         .bucketNamespace(BucketNamespace.ACCOUNT_REGIONAL)
         .build();
 
  • Enum Constant Details

    • GLOBAL

      @Stability(Stable) public static final BucketNamespace GLOBAL
      The bucket name is globally unique.
    • ACCOUNT_REGIONAL

      @Stability(Stable) public static final BucketNamespace ACCOUNT_REGIONAL
      The bucket name is unique within the account and region.
  • Method Details

    • values

      public static BucketNamespace[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static BucketNamespace valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null