public static final class CfnBucketPolicyProps.Builder
extends java.lang.Object
CfnBucketPolicyProps
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CfnBucketPolicyProps.Builder |
bucket(java.lang.String bucket)
Sets the value of
CfnBucketPolicyProps.getBucket() |
CfnBucketPolicyProps |
build()
Builds the configured instance.
|
CfnBucketPolicyProps.Builder |
policyDocument(java.lang.Object policyDocument)
Sets the value of
CfnBucketPolicyProps.getPolicyDocument() |
public CfnBucketPolicyProps.Builder bucket(java.lang.String bucket)
CfnBucketPolicyProps.getBucket()
bucket
- The name of the Amazon S3 bucket to which the policy applies. This parameter is required.this
public CfnBucketPolicyProps.Builder policyDocument(java.lang.Object policyDocument)
CfnBucketPolicyProps.getPolicyDocument()
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 .this
public CfnBucketPolicyProps build()
CfnBucketPolicyProps
java.lang.NullPointerException
- if any required attribute was not provided