AlertRule

class oci.budget.models.AlertRule(**kwargs)

Bases: object

The alert rule.

Attributes

LIFECYCLE_STATE_ACTIVE A constant which can be used with the lifecycle_state property of a AlertRule.
LIFECYCLE_STATE_INACTIVE A constant which can be used with the lifecycle_state property of a AlertRule.
THRESHOLD_TYPE_ABSOLUTE A constant which can be used with the threshold_type property of a AlertRule.
THRESHOLD_TYPE_PERCENTAGE A constant which can be used with the threshold_type property of a AlertRule.
TYPE_ACTUAL A constant which can be used with the type property of a AlertRule.
TYPE_FORECAST A constant which can be used with the type property of a AlertRule.
budget_id [Required] Gets the budget_id of this AlertRule.
defined_tags Gets the defined_tags of this AlertRule.
description Gets the description of this AlertRule.
display_name [Required] Gets the display_name of this AlertRule.
freeform_tags Gets the freeform_tags of this AlertRule.
id [Required] Gets the id of this AlertRule.
lifecycle_state [Required] Gets the lifecycle_state of this AlertRule.
message Gets the message of this AlertRule.
recipients [Required] Gets the recipients of this AlertRule.
threshold [Required] Gets the threshold of this AlertRule.
threshold_type [Required] Gets the threshold_type of this AlertRule.
time_created [Required] Gets the time_created of this AlertRule.
time_updated [Required] Gets the time_updated of this AlertRule.
type [Required] Gets the type of this AlertRule.
version Gets the version of this AlertRule.

Methods

__init__(**kwargs) Initializes a new AlertRule object with values from keyword arguments.
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

A constant which can be used with the lifecycle_state property of a AlertRule. This constant has a value of “ACTIVE”

LIFECYCLE_STATE_INACTIVE = 'INACTIVE'

A constant which can be used with the lifecycle_state property of a AlertRule. This constant has a value of “INACTIVE”

THRESHOLD_TYPE_ABSOLUTE = 'ABSOLUTE'

A constant which can be used with the threshold_type property of a AlertRule. This constant has a value of “ABSOLUTE”

THRESHOLD_TYPE_PERCENTAGE = 'PERCENTAGE'

A constant which can be used with the threshold_type property of a AlertRule. This constant has a value of “PERCENTAGE”

TYPE_ACTUAL = 'ACTUAL'

A constant which can be used with the type property of a AlertRule. This constant has a value of “ACTUAL”

TYPE_FORECAST = 'FORECAST'

A constant which can be used with the type property of a AlertRule. This constant has a value of “FORECAST”

__init__(**kwargs)

Initializes a new AlertRule object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • id (str) – The value to assign to the id property of this AlertRule.
  • budget_id (str) – The value to assign to the budget_id property of this AlertRule.
  • display_name (str) – The value to assign to the display_name property of this AlertRule.
  • type (str) – The value to assign to the type property of this AlertRule. Allowed values for this property are: “ACTUAL”, “FORECAST”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • threshold (float) – The value to assign to the threshold property of this AlertRule.
  • threshold_type (str) – The value to assign to the threshold_type property of this AlertRule. Allowed values for this property are: “PERCENTAGE”, “ABSOLUTE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this AlertRule. Allowed values for this property are: “ACTIVE”, “INACTIVE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • message (str) – The value to assign to the message property of this AlertRule.
  • description (str) – The value to assign to the description property of this AlertRule.
  • version (int) – The value to assign to the version property of this AlertRule.
  • recipients (str) – The value to assign to the recipients property of this AlertRule.
  • time_created (datetime) – The value to assign to the time_created property of this AlertRule.
  • time_updated (datetime) – The value to assign to the time_updated property of this AlertRule.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this AlertRule.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this AlertRule.
budget_id

[Required] Gets the budget_id of this AlertRule. The OCID of the budget.

Returns:The budget_id of this AlertRule.
Return type:str
defined_tags

Gets the defined_tags of this AlertRule. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Example: {“Operations”: {“CostCenter”: “42”}}

Returns:The defined_tags of this AlertRule.
Return type:dict(str, dict(str, object))
description

Gets the description of this AlertRule. The description of the alert rule.

Returns:The description of this AlertRule.
Return type:str
display_name

[Required] Gets the display_name of this AlertRule. The name of the alert rule. Avoid entering confidential information.

Returns:The display_name of this AlertRule.
Return type:str
freeform_tags

Gets the freeform_tags of this AlertRule. 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”}

Returns:The freeform_tags of this AlertRule.
Return type:dict(str, str)
id

[Required] Gets the id of this AlertRule. The OCID of the alert rule.

Returns:The id of this AlertRule.
Return type:str
lifecycle_state

[Required] Gets the lifecycle_state of this AlertRule. The current state of the alert rule.

Allowed values for this property are: “ACTIVE”, “INACTIVE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The lifecycle_state of this AlertRule.
Return type:str
message

Gets the message of this AlertRule. Custom message sent when an alert is triggered.

Returns:The message of this AlertRule.
Return type:str
recipients

[Required] Gets the recipients of this AlertRule. The delimited list of email addresses to receive the alert when it triggers. Delimiter characters can be a comma, space, TAB, or semicolon.

Returns:The recipients of this AlertRule.
Return type:str
threshold

[Required] Gets the threshold of this AlertRule. The threshold for triggering the alert. If the thresholdType is PERCENTAGE, the maximum value is 10000.

Returns:The threshold of this AlertRule.
Return type:float
threshold_type

[Required] Gets the threshold_type of this AlertRule. The type of threshold.

Allowed values for this property are: “PERCENTAGE”, “ABSOLUTE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The threshold_type of this AlertRule.
Return type:str
time_created

[Required] Gets the time_created of this AlertRule. The time the budget was created.

Returns:The time_created of this AlertRule.
Return type:datetime
time_updated

[Required] Gets the time_updated of this AlertRule. The time the budget was updated.

Returns:The time_updated of this AlertRule.
Return type:datetime
type

[Required] Gets the type of this AlertRule. 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).

Allowed values for this property are: “ACTUAL”, “FORECAST”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The type of this AlertRule.
Return type:str
version

Gets the version of this AlertRule. The version of the alert rule. Starts from 1 and increments by 1.

Returns:The version of this AlertRule.
Return type:int