Class BucketPolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.s3.BucketPolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BucketPolicyProps>
- Enclosing interface:
BucketPolicyProps
@Stability(Stable)
public static final class BucketPolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<BucketPolicyProps>
A builder for
BucketPolicyProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofBucketPolicyProps.getBucket()build()Builds the configured instance.document(PolicyDocument document) Sets the value ofBucketPolicyProps.getDocument()removalPolicy(RemovalPolicy removalPolicy) Sets the value ofBucketPolicyProps.getRemovalPolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucket
Sets the value ofBucketPolicyProps.getBucket()- Parameters:
bucket- The Amazon S3 bucket that the policy applies to. This parameter is required.- Returns:
this
-
document
Sets the value ofBucketPolicyProps.getDocument()- Parameters:
document- Policy document to apply to the bucket.- Returns:
this
-
removalPolicy
Sets the value ofBucketPolicyProps.getRemovalPolicy()- Parameters:
removalPolicy- Policy to apply when the policy is removed from this stack.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<BucketPolicyProps>- Returns:
- a new instance of
BucketPolicyProps - Throws:
NullPointerException- if any required attribute was not provided
-