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.119.0 (build 1634eac)",
date="2025-11-20T23:37:29.208Z")
@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 BlockPublicAccessDeprecated.static final BlockPublicAccessUse this option if you want to only block the ACLs, using this will set blockPublicPolicy and restrictPublicBuckets to false.static final BlockPublicAccessUse this option if you want to ensure every public access method is blocked. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBlockPublicAccess(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedBlockPublicAccess(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetBlockPublicAcls(Boolean value) voidsetBlockPublicPolicy(Boolean value) voidsetIgnorePublicAcls(Boolean value) voidsetRestrictPublicBuckets(Boolean value) Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
BLOCK_ACLS
Deprecated.UseBLOCK_ACLS_ONLYinstead. -
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_ONLYinstead.