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
-
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 event data store, dashboard, or channel attached to the resource-based policy. This parameter is required. Example event data store ARN format:arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
Example dashboard ARN format:
arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash
Example channel ARN format:
arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
- Returns:
this
-
resourcePolicy
Sets the value ofCfnResourcePolicyProps.getResourcePolicy()
- Parameters:
resourcePolicy
- A JSON-formatted string for an AWS resource-based policy. This parameter is required. For example resource-based policies, see CloudTrail resource-based policy examples in the CloudTrail User Guide .- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnResourcePolicyProps>
- Returns:
- a new instance of
CfnResourcePolicyProps
- Throws:
NullPointerException
- if any required attribute was not provided
-