Class CfnResourcePolicyProps.Builder
java.lang.Object
software.amazon.awscdk.services.eventsv2.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.eventBusArn(String eventBusArn) Sets the value ofCfnResourcePolicyProps.getEventBusArn()policyDocument(Object policyDocument) Sets the value ofCfnResourcePolicyProps.getPolicyDocument()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
eventBusArn
Sets the value ofCfnResourcePolicyProps.getEventBusArn()- Parameters:
eventBusArn- The Amazon Resource Name (ARN) of the event bus whose resource policy this is. This parameter is required. The bus must already exist. This resource does not create it.- Returns:
this
-
policyDocument
Sets the value ofCfnResourcePolicyProps.getPolicyDocument()- Parameters:
policyDocument- The resource policy document, as a JSON object. This parameter is required. The document can be up to 20 KB. This quota is adjustable. An empty object is not a valid policy. To remove the policy, delete this resource. The principals in the document must exist and be visible to the service when the policy is written. When you create a new IAM role or user, that principal might not be immediately visible to the service. You might need to enforce a delay before you include it in the document. For more information, see "Changes that I make are not always immediately visible" in the IAM User Guide. Declare Version. Write AWS account and role principals as ARNs rather than as account IDs. Write a single Action, Resource, or principal value as a scalar rather than as a one-element list. The service returns these forms as you wrote them. It normalizes other forms, and a normalized value can appear as drift. A stack update replaces the whole policy with this document, including any change made outside CloudFormation. For more information about event bus resource policies, see the Amazon EventBridge User Guide.- 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
-