Class PolicyStatement.Builder
java.lang.Object
software.amazon.awscdk.services.bedrockagentcore.PolicyStatement.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<PolicyStatement>
- Enclosing class:
PolicyStatement
@Stability(Stable)
public static final class PolicyStatement.Builder
extends Object
implements software.amazon.jsii.Builder<PolicyStatement>
A fluent builder for
PolicyStatement.-
Method Summary
Modifier and TypeMethodDescriptionaction(PolicyAction action) The action the statement applies to.build()static PolicyStatement.Buildercreate()effect(PolicyEffect effect) Whether the statement permits or forbids the action.principal(PolicyPrincipal principal) The principal the statement applies to.resource(PolicyResource resource) The resource the statement applies to.unless(List<? extends PolicyCondition> unless) Conditions that must not hold for the statement to apply.when(List<? extends PolicyCondition> when) Conditions that must all hold for the statement to apply.
-
Method Details
-
create
- Returns:
- a new instance of
PolicyStatement.Builder.
-
action
The action the statement applies to.- Parameters:
action- The action the statement applies to. This parameter is required.- Returns:
this
-
effect
Whether the statement permits or forbids the action.- Parameters:
effect- Whether the statement permits or forbids the action. This parameter is required.- Returns:
this
-
principal
The principal the statement applies to.- Parameters:
principal- The principal the statement applies to. This parameter is required.- Returns:
this
-
resource
The resource the statement applies to.- Parameters:
resource- The resource the statement applies to. This parameter is required.- Returns:
this
-
unless
Conditions that must not hold for the statement to apply.Default: - no exclusions
- Parameters:
unless- Conditions that must not hold for the statement to apply. This parameter is required.- Returns:
this
-
when
Conditions that must all hold for the statement to apply.Use
PolicyCondition.anyOf()for a member that only needs one of several conditions to hold.Default: - the statement applies whenever its principal, action and resource match
- Parameters:
when- Conditions that must all hold for the statement to apply. This parameter is required.- Returns:
this
-
build
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PolicyStatement>- Returns:
- a newly built instance of
PolicyStatement.
-