Interface Rule.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<Rule.Builder,,Rule> SdkBuilder<Rule.Builder,,Rule> SdkPojo
- Enclosing class:
Rule
@Mutable
@NotThreadSafe
public static interface Rule.Builder
extends SdkPojo, CopyableBuilder<Rule.Builder,Rule>
-
Method Summary
Modifier and TypeMethodDescriptiondefault Rule.BuilderdenyWhen(Consumer<DenyWhen.Builder> denyWhen) The conditions that must all be true for the rule to match.The conditions that must all be true for the rule to match.enforcementMode(String enforcementMode) What happens when the rule matches.enforcementMode(PolicyEnforcementMode enforcementMode) What happens when the rule matches.The identifier of the rule, unique within the policy.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
ruleId
The identifier of the rule, unique within the policy. Policy exceptions and decision evidence refer to rules by this ID.
- Parameters:
ruleId- The identifier of the rule, unique within the policy. Policy exceptions and decision evidence refer to rules by this ID.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
enforcementMode
What happens when the rule matches. ENFORCE denies the package. AUDIT records the match and allows the package.
- Parameters:
enforcementMode- What happens when the rule matches. ENFORCE denies the package. AUDIT records the match and allows the package.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
enforcementMode
What happens when the rule matches. ENFORCE denies the package. AUDIT records the match and allows the package.
- Parameters:
enforcementMode- What happens when the rule matches. ENFORCE denies the package. AUDIT records the match and allows the package.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
denyWhen
The conditions that must all be true for the rule to match.
- Parameters:
denyWhen- The conditions that must all be true for the rule to match.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
denyWhen
The conditions that must all be true for the rule to match.
This is a convenience method that creates an instance of theDenyWhen.Builderavoiding the need to create one manually viaDenyWhen.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todenyWhen(DenyWhen).- Parameters:
denyWhen- a consumer that will call methods onDenyWhen.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-