Class CfnResourcePolicy.Builder

java.lang.Object
software.amazon.awscdk.services.cloudtrail.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.
    • resourceArn

      @Stability(Stable) public CfnResourcePolicy.Builder resourceArn(String resourceArn)
      The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy.

      The following is the format of a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel .

      Parameters:
      resourceArn - The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy. This parameter is required.
      Returns:
      this
    • resourcePolicy

      @Stability(Stable) public CfnResourcePolicy.Builder resourcePolicy(Object resourcePolicy)
      A JSON-formatted string for an AWS resource-based policy.

      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.

      Parameters:
      resourcePolicy - A JSON-formatted string for an AWS resource-based 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.