Class AlertRule.Builder

  • Enclosing class:
    AlertRule

    public static class AlertRule.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • id

        public AlertRule.Builder id​(String id)
        The OCID of the alert rule.
        Parameters:
        id - the value to set
        Returns:
        this builder
      • budgetId

        public AlertRule.Builder budgetId​(String budgetId)
        The OCID of the budget.
        Parameters:
        budgetId - the value to set
        Returns:
        this builder
      • displayName

        public AlertRule.Builder displayName​(String displayName)
        The name of the alert rule.

        Avoid entering confidential information.

        Parameters:
        displayName - the value to set
        Returns:
        this builder
      • type

        public AlertRule.Builder type​(AlertType type)
        The type of the alert.

        Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

        Parameters:
        type - the value to set
        Returns:
        this builder
      • threshold

        public AlertRule.Builder threshold​(BigDecimal threshold)
        The threshold for triggering the alert.

        If the thresholdType is PERCENTAGE, the maximum value is 10000.

        Parameters:
        threshold - the value to set
        Returns:
        this builder
      • thresholdType

        public AlertRule.Builder thresholdType​(ThresholdType thresholdType)
        The type of threshold.
        Parameters:
        thresholdType - the value to set
        Returns:
        this builder
      • lifecycleState

        public AlertRule.Builder lifecycleState​(LifecycleState lifecycleState)
        The current state of the alert rule.
        Parameters:
        lifecycleState - the value to set
        Returns:
        this builder
      • message

        public AlertRule.Builder message​(String message)
        Custom message sent when an alert is triggered.
        Parameters:
        message - the value to set
        Returns:
        this builder
      • description

        public AlertRule.Builder description​(String description)
        The description of the alert rule.
        Parameters:
        description - the value to set
        Returns:
        this builder
      • version

        public AlertRule.Builder version​(Integer version)
        The version of the alert rule.

        Starts from 1 and increments by 1.

        Parameters:
        version - the value to set
        Returns:
        this builder
      • recipients

        public AlertRule.Builder recipients​(String recipients)
        The delimited list of email addresses to receive the alert when it triggers.

        Delimiter characters can be a comma, space, TAB, or semicolon.

        Parameters:
        recipients - the value to set
        Returns:
        this builder
      • timeCreated

        public AlertRule.Builder timeCreated​(Date timeCreated)
        The time the budget was created.
        Parameters:
        timeCreated - the value to set
        Returns:
        this builder
      • timeUpdated

        public AlertRule.Builder timeUpdated​(Date timeUpdated)
        The time the budget was updated.
        Parameters:
        timeUpdated - the value to set
        Returns:
        this builder
      • freeformTags

        public AlertRule.Builder freeformTags​(Map<String,​String> freeformTags)
        Free-form tags for this resource.

        Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

        Example: {"Department": "Finance"}

        Parameters:
        freeformTags - the value to set
        Returns:
        this builder
      • definedTags

        public AlertRule.Builder definedTags​(Map<String,​Map<String,​Object>> definedTags)
        Defined tags for this resource.

        Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

        Example: {"Operations": {"CostCenter": "42"}}

        Parameters:
        definedTags - the value to set
        Returns:
        this builder