Enum ObjectOwnership
- All Implemented Interfaces:
Serializable
,Comparable<ObjectOwnership>
,java.lang.constant.Constable
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-12T12:32:10.462Z")
@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(); accessLogsBucket.addToResourcePolicy( PolicyStatement.Builder.create() .actions(List.of("s3:*")) .resources(List.of(accessLogsBucket.getBucketArn(), accessLogsBucket.arnForObjects("*"))) .principals(List.of(new AnyPrincipal())) .build()); Bucket bucket = Bucket.Builder.create(this, "MyBucket") .serverAccessLogsBucket(accessLogsBucket) .serverAccessLogsPrefix("logs") .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionACLs are disabled, and the bucket owner automatically owns and has full control over every object in the bucket.The bucket owner will own the object if the object is uploaded with the bucket-owner-full-control canned ACL.The uploading account will own the object. -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectOwnership
Returns the enum constant of this type with the specified name.static ObjectOwnership[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
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
The uploading account will own the object.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-