Class CfnResourcePolicy.Builder

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

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

    • create

      @Stability(Stable) public static CfnResourcePolicy.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 CfnResourcePolicy.Builder.
    • content

      @Stability(Stable) public CfnResourcePolicy.Builder content(Object content)
      The policy text of the organization resource policy.

      You can specify the resource policy content as a JSON object or a JSON string.

      When you specify the resource policy content as a JSON string, you can't perform drift detection on the CloudFormation stack. For this reason, we recommend specifying the resource policy content as a JSON object instead.

      Parameters:
      content - The policy text of the organization resource policy. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnResourcePolicy.Builder tags(List<? extends CfnTag> tags)
      A list of tags that you want to attach to the newly created resource policy.

      For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null . For more information about tagging, see Tagging AWS Organizations resources in the AWS Organizations User Guide .

      If any one of the tags is not valid or if you exceed the allowed number of tags for the resource policy, then the entire request fails and the resource policy is not created.

      Parameters:
      tags - A list of tags that you want to attach to the newly created resource policy. This parameter is required.
      Returns:
      this
    • build

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