Class CfnBucketPolicy.Builder

java.lang.Object
software.amazon.awscdk.services.s3outposts.CfnBucketPolicy.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucketPolicy>
Enclosing class:
CfnBucketPolicy

@Stability(Stable) public static final class CfnBucketPolicy.Builder extends Object implements software.amazon.jsii.Builder<CfnBucketPolicy>
A fluent builder for CfnBucketPolicy.
  • Method Details

    • create

      @Stability(Stable) public static CfnBucketPolicy.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnBucketPolicy.Builder.
    • bucket

      @Stability(Stable) public CfnBucketPolicy.Builder bucket(String bucket)
      The name of the Amazon S3 Outposts bucket to which the policy applies.

      Parameters:
      bucket - The name of the Amazon S3 Outposts bucket to which the policy applies. This parameter is required.
      Returns:
      this
    • policyDocument

      @Stability(Stable) public CfnBucketPolicy.Builder policyDocument(Object policyDocument)
      A policy document containing permissions to add to the specified bucket.

      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 .

      Parameters:
      policyDocument - A policy document containing permissions to add to the specified bucket. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnBucketPolicy build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnBucketPolicy>
      Returns:
      a newly built instance of CfnBucketPolicy.