Class CfnResourcePolicyProps.Builder

java.lang.Object
software.amazon.awscdk.services.cloudtrail.CfnResourcePolicyProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResourcePolicyProps>
Enclosing interface:
CfnResourcePolicyProps

@Stability(Stable) public static final class CfnResourcePolicyProps.Builder extends Object implements software.amazon.jsii.Builder<CfnResourcePolicyProps>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • resourceArn

      @Stability(Stable) public CfnResourcePolicyProps.Builder resourceArn(String resourceArn)
      Parameters:
      resourceArn - The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy. This parameter is required. The following is the format of a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel .
      Returns:
      this
    • resourcePolicy

      @Stability(Stable) public CfnResourcePolicyProps.Builder resourcePolicy(Object resourcePolicy)
      Parameters:
      resourcePolicy - A JSON-formatted string for an AWS resource-based policy. This parameter is required. The following are requirements for the resource policy:

      • Contains only one action: cloudtrail-data:PutAuditEvents
      • Contains at least one statement. The policy can have a maximum of 20 statements.
      • Each statement contains at least one principal. A statement can have a maximum of 50 principals.
      Returns:
      this
    • build

      @Stability(Stable) public CfnResourcePolicyProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnResourcePolicyProps>
      Returns:
      a new instance of CfnResourcePolicyProps
      Throws:
      NullPointerException - if any required attribute was not provided