Class Rule.Builder

  • Enclosing class:
    Rule

    public static class Rule.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • basis

        public Rule.Builder basis​(String basis)
        Based on what the rule is created.

        It can be based on a resourceProperty or a tag. If based on a tag, basis will be ‘definedTagEquals’ If based on a resource property, basis will be ‘inventoryProperties’

        Parameters:
        basis - the value to set
        Returns:
        this builder
      • compartmentId

        public Rule.Builder compartmentId​(String compartmentId)
        Compartment Id for which the rule is created.
        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • resourceCompartmentId

        public Rule.Builder resourceCompartmentId​(String resourceCompartmentId)
        The Compartment ID to dynamically search resources.

        Provide the compartment ID to which the rule is applicable.

        Parameters:
        resourceCompartmentId - the value to set
        Returns:
        this builder
      • conditions

        public Rule.Builder conditions​(List<Condition> conditions)
        Rule Conditions
        Parameters:
        conditions - the value to set
        Returns:
        this builder
      • matchCondition

        public Rule.Builder matchCondition​(Rule.MatchCondition matchCondition)
        Match condition for the rule selection.

        Include resources that match all rules or any of the rules. Default value for matchCondition is ANY

        Parameters:
        matchCondition - the value to set
        Returns:
        this builder
      • compartmentIdInSubtree

        public Rule.Builder compartmentIdInSubtree​(Boolean compartmentIdInSubtree)
        If set to true, resources will be returned for not only the provided compartment, but all compartments which descend from it.

        Which resources are returned and their field contents depends on the value of accessLevel. Default value for compartmentIdInSubtree is false

        Parameters:
        compartmentIdInSubtree - the value to set
        Returns:
        this builder
      • build

        public Rule build()