Class PolicyStatementProps.Builder
java.lang.Object
software.amazon.awscdk.services.bedrockagentcore.PolicyStatementProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PolicyStatementProps>
- Enclosing interface:
PolicyStatementProps
@Stability(Stable)
public static final class PolicyStatementProps.Builder
extends Object
implements software.amazon.jsii.Builder<PolicyStatementProps>
A builder for
PolicyStatementProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction(PolicyAction action) Sets the value ofPolicyStatementProps.getAction()build()Builds the configured instance.effect(PolicyEffect effect) Sets the value ofPolicyStatementProps.getEffect()principal(PolicyPrincipal principal) Sets the value ofPolicyStatementProps.getPrincipal()resource(PolicyResource resource) Sets the value ofPolicyStatementProps.getResource()unless(List<? extends PolicyCondition> unless) Sets the value ofPolicyStatementProps.getUnless()when(List<? extends PolicyCondition> when) Sets the value ofPolicyStatementProps.getWhen()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
action
Sets the value ofPolicyStatementProps.getAction()- Parameters:
action- The action the statement applies to. This parameter is required.- Returns:
this
-
effect
Sets the value ofPolicyStatementProps.getEffect()- Parameters:
effect- Whether the statement permits or forbids the action. This parameter is required.- Returns:
this
-
principal
Sets the value ofPolicyStatementProps.getPrincipal()- Parameters:
principal- The principal the statement applies to. This parameter is required.- Returns:
this
-
resource
Sets the value ofPolicyStatementProps.getResource()- Parameters:
resource- The resource the statement applies to. This parameter is required.- Returns:
this
-
unless
@Stability(Stable) public PolicyStatementProps.Builder unless(List<? extends PolicyCondition> unless) Sets the value ofPolicyStatementProps.getUnless()- Parameters:
unless- Conditions that must not hold for the statement to apply.- Returns:
this
-
when
Sets the value ofPolicyStatementProps.getWhen()- Parameters:
when- Conditions that must all hold for the statement to apply. UsePolicyCondition.anyOf()for a member that only needs one of several conditions to hold.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PolicyStatementProps>- Returns:
- a new instance of
PolicyStatementProps - Throws:
NullPointerException- if any required attribute was not provided
-