Interface BucketPolicyProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
BucketPolicyProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)", date="2025-11-10T13:40:13.998Z") @Stability(Stable) public interface BucketPolicyProps extends software.amazon.jsii.JsiiSerializable
Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.iam.*;
 import software.amazon.awscdk.services.s3.*;
 Bucket bucket;
 PolicyDocument policyDocument;
 BucketPolicyProps bucketPolicyProps = BucketPolicyProps.builder()
         .bucket(bucket)
         // the properties below are optional
         .document(policyDocument)
         .removalPolicy(RemovalPolicy.DESTROY)
         .build();
 
  • Method Details

    • getBucket

      @Stability(Stable) @NotNull IBucket getBucket()
      The Amazon S3 bucket that the policy applies to.
    • getDocument

      @Stability(Stable) @Nullable default PolicyDocument getDocument()
      Policy document to apply to the bucket.

      Default: - A new empty PolicyDocument will be created.

    • getRemovalPolicy

      @Stability(Stable) @Nullable default RemovalPolicy getRemovalPolicy()
      Policy to apply when the policy is removed from this stack.

      Default: - RemovalPolicy.DESTROY.

    • builder

      @Stability(Stable) static BucketPolicyProps.Builder builder()
      Returns:
      a BucketPolicyProps.Builder of BucketPolicyProps