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>
A builder for
CfnResourcePolicyProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.resourceArn(String resourceArn) Sets the value ofCfnResourcePolicyProps.getResourceArn()resourcePolicy(Object resourcePolicy) Sets the value ofCfnResourcePolicyProps.getResourcePolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
resourceArn
Sets the value ofCfnResourcePolicyProps.getResourceArn()- 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
Sets the value ofCfnResourcePolicyProps.getResourcePolicy()- 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
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnResourcePolicyProps>- Returns:
- a new instance of
CfnResourcePolicyProps - Throws:
NullPointerException- if any required attribute was not provided
-