Enum ObjectOwnership

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:36.619Z") @Stability(Stable) public enum ObjectOwnership extends Enum<ObjectOwnership>
The ObjectOwnership of the bucket.

Example:

 Bucket accessLogsBucket = Bucket.Builder.create(this, "AccessLogsBucket")
         .objectOwnership(ObjectOwnership.BUCKET_OWNER_ENFORCED)
         .build();
 Bucket bucket = Bucket.Builder.create(this, "MyBucket")
         .serverAccessLogsBucket(accessLogsBucket)
         .serverAccessLogsPrefix("logs")
         .build();
 

See Also:
  • Enum Constant Details

    • BUCKET_OWNER_ENFORCED

      @Stability(Stable) public static final ObjectOwnership BUCKET_OWNER_ENFORCED
      ACLs are disabled, and the bucket owner automatically owns and has full control over every object in the bucket.

      ACLs no longer affect permissions to data in the S3 bucket. The bucket uses policies to define access control.

    • BUCKET_OWNER_PREFERRED

      @Stability(Stable) public static final ObjectOwnership BUCKET_OWNER_PREFERRED
      The bucket owner will own the object if the object is uploaded with the bucket-owner-full-control canned ACL.

      Without this setting and canned ACL, the object is uploaded and remains owned by the uploading account.

    • OBJECT_WRITER

      @Stability(Stable) public static final ObjectOwnership OBJECT_WRITER
      The uploading account will own the object.
  • Method Details

    • values

      public static ObjectOwnership[] 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 ObjectOwnership 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