Class CfnBucketPolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.s3.CfnBucketPolicyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucketPolicyProps>
- Enclosing interface:
CfnBucketPolicyProps
@Stability(Stable)
public static final class CfnBucketPolicyProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucketPolicyProps>
A builder for
CfnBucketPolicyProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnBucketPolicyProps.getBucket()
build()
Builds the configured instance.policyDocument
(Object policyDocument) Sets the value ofCfnBucketPolicyProps.getPolicyDocument()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucket
Sets the value ofCfnBucketPolicyProps.getBucket()
- Parameters:
bucket
- The name of the Amazon S3 bucket to which the policy applies. This parameter is required.- Returns:
this
-
policyDocument
Sets the value ofCfnBucketPolicyProps.getPolicyDocument()
- Parameters:
policyDocument
- A policy document containing permissions to add to the specified bucket. This parameter is required. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM. For more information, see the AWS::IAM::Policy PolicyDocument resource description in this guide and Access Policy Language Overview in the Amazon S3 User Guide .- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnBucketPolicyProps>
- Returns:
- a new instance of
CfnBucketPolicyProps
- Throws:
NullPointerException
- if any required attribute was not provided
-