@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.731Z") @Stability(value=Stable) public enum BucketAccessControl extends Enum<BucketAccessControl>
Example:
Bucket websiteBucket = Bucket.Builder.create(this, "WebsiteBucket")
.websiteIndexDocument("index.html")
.publicReadAccess(true)
.build();
BucketDeployment.Builder.create(this, "DeployWebsite")
.sources(List.of(Source.asset("./website-dist")))
.destinationBucket(websiteBucket)
.destinationKeyPrefix("web/static") // optional prefix in destination bucket
.metadata(UserDefinedObjectMetadata.builder().A("1").b("2").build()) // user-defined metadata
// system-defined metadata
.contentType("text/html")
.contentLanguage("en")
.storageClass(StorageClass.INTELLIGENT_TIERING)
.serverSideEncryption(ServerSideEncryption.AES_256)
.cacheControl(List.of(CacheControl.setPublic(), CacheControl.maxAge(Duration.hours(1))))
.accessControl(BucketAccessControl.BUCKET_OWNER_FULL_CONTROL)
.build();
| Enum Constant and Description |
|---|
AUTHENTICATED_READ
Owner gets FULL_CONTROL.
|
AWS_EXEC_READ
Owner gets FULL_CONTROL.
|
BUCKET_OWNER_FULL_CONTROL
Both the object owner and the bucket owner get FULL_CONTROL over the object.
|
BUCKET_OWNER_READ
Object owner gets FULL_CONTROL.
|
LOG_DELIVERY_WRITE
The LogDelivery group gets WRITE and READ_ACP permissions on the bucket.
|
PRIVATE
Owner gets FULL_CONTROL.
|
PUBLIC_READ
Owner gets FULL_CONTROL.
|
PUBLIC_READ_WRITE
Owner gets FULL_CONTROL.
|
| Modifier and Type | Method and Description |
|---|---|
static BucketAccessControl |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BucketAccessControl[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final BucketAccessControl PRIVATE
No one else has access rights.
@Stability(value=Stable) public static final BucketAccessControl PUBLIC_READ
The AllUsers group gets READ access.
@Stability(value=Stable) public static final BucketAccessControl PUBLIC_READ_WRITE
The AllUsers group gets READ and WRITE access. Granting this on a bucket is generally not recommended.
@Stability(value=Stable) public static final BucketAccessControl AUTHENTICATED_READ
The AuthenticatedUsers group gets READ access.
@Stability(value=Stable) public static final BucketAccessControl LOG_DELIVERY_WRITE
@Stability(value=Stable) public static final BucketAccessControl BUCKET_OWNER_READ
Bucket owner gets READ access. If you specify this canned ACL when creating a bucket, Amazon S3 ignores it.
@Stability(value=Stable) public static final BucketAccessControl BUCKET_OWNER_FULL_CONTROL
If you specify this canned ACL when creating a bucket, Amazon S3 ignores it.
@Stability(value=Stable) public static final BucketAccessControl AWS_EXEC_READ
Amazon EC2 gets READ access to GET an Amazon Machine Image (AMI) bundle from Amazon S3.
public static BucketAccessControl[] values()
for (BucketAccessControl c : BucketAccessControl.values()) System.out.println(c);
public static BucketAccessControl valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.