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 Details

    • ruleId

      Rule.Builder ruleId(String 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

      Rule.Builder enforcementMode(String 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

      Rule.Builder enforcementMode(PolicyEnforcementMode 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

      Rule.Builder denyWhen(DenyWhen 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

      default Rule.Builder denyWhen(Consumer<DenyWhen.Builder> denyWhen)

      The conditions that must all be true for the rule to match.

      This is a convenience method that creates an instance of the DenyWhen.Builder avoiding the need to create one manually via DenyWhen.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to denyWhen(DenyWhen).

      Parameters:
      denyWhen - a consumer that will call methods on DenyWhen.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: