Class BlockPublicAccess
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.s3.BlockPublicAccess
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)",
date="2025-06-20T13:49:24.613Z")
@Stability(Stable)
public class BlockPublicAccess
extends software.amazon.jsii.JsiiObject
Example:
import software.amazon.awscdk.RemovalPolicy; Bucket.Builder.create(scope, "Bucket") .blockPublicAccess(BlockPublicAccess.BLOCK_ALL) .encryption(BucketEncryption.S3_MANAGED) .enforceSSL(true) .versioned(true) .removalPolicy(RemovalPolicy.RETAIN) .build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BlockPublicAccess
Deprecated.static final BlockPublicAccess
Use this option if you want to only block the ACLs, using this will set blockPublicPolicy and restrictPublicBuckets to false.static final BlockPublicAccess
Use this option if you want to ensure every public access method is blocked. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BlockPublicAccess
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
BlockPublicAccess
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoid
setBlockPublicAcls
(Boolean value) void
setBlockPublicPolicy
(Boolean value) void
setIgnorePublicAcls
(Boolean value) void
setRestrictPublicBuckets
(Boolean value) Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
BLOCK_ACLS
Deprecated.UseBLOCK_ACLS_ONLY
instead. -
BLOCK_ACLS_ONLY
Use this option if you want to only block the ACLs, using this will set blockPublicPolicy and restrictPublicBuckets to false. -
BLOCK_ALL
Use this option if you want to ensure every public access method is blocked.However keep in mind that this is the default state of an S3 bucket, and leaving blockPublicAccess undefined would also work.
-
-
Constructor Details
-
BlockPublicAccess
protected BlockPublicAccess(software.amazon.jsii.JsiiObjectRef objRef) -
BlockPublicAccess
protected BlockPublicAccess(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
BlockPublicAccess
- Parameters:
options
- This parameter is required.
-
-
Method Details
-
getBlockPublicAcls
-
setBlockPublicAcls
-
getBlockPublicPolicy
-
setBlockPublicPolicy
-
getIgnorePublicAcls
-
setIgnorePublicAcls
-
getRestrictPublicBuckets
-
setRestrictPublicBuckets
-
BLOCK_ACLS_ONLY
instead.