MetricBase¶
-
class
oci.autoscaling.models.
MetricBase
(**kwargs)¶ Bases:
object
MetricBase model.
Attributes
METRIC_SOURCE_COMPUTE_AGENT
A constant which can be used with the metric_source property of a MetricBase. METRIC_SOURCE_CUSTOM_QUERY
A constant which can be used with the metric_source property of a MetricBase. metric_source
Gets the metric_source of this MetricBase. pending_duration
Gets the pending_duration of this MetricBase. Methods
__init__
(**kwargs)Initializes a new MetricBase object with values from keyword arguments. get_subtype
(object_dictionary)Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype. -
METRIC_SOURCE_COMPUTE_AGENT
= 'COMPUTE_AGENT'¶ A constant which can be used with the metric_source property of a MetricBase. This constant has a value of “COMPUTE_AGENT”
-
METRIC_SOURCE_CUSTOM_QUERY
= 'CUSTOM_QUERY'¶ A constant which can be used with the metric_source property of a MetricBase. This constant has a value of “CUSTOM_QUERY”
-
__init__
(**kwargs)¶ Initializes a new MetricBase object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class:
The following keyword arguments are supported (corresponding to the getters/setters of this class):
Parameters: - pending_duration (str) – The value to assign to the pending_duration property of this MetricBase.
- metric_source (str) – The value to assign to the metric_source property of this MetricBase. Allowed values for this property are: “COMPUTE_AGENT”, “CUSTOM_QUERY”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
-
static
get_subtype
(object_dictionary)¶ Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
metric_source
¶ Gets the metric_source of this MetricBase. Source of the metric data for creating the alarm used to trigger autoscaling actions.
The following values are supported:
- COMPUTE_AGENT: CPU or memory metrics emitted by the Compute Instance Monitoring plugin.
- CUSTOM_QUERY: A custom Monitoring Query Language (MQL) expression.
Allowed values for this property are: “COMPUTE_AGENT”, “CUSTOM_QUERY”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The metric_source of this MetricBase. Return type: str
-
pending_duration
¶ Gets the pending_duration of this MetricBase. The period of time that the condition defined in the alarm must persist before the alarm state changes from “OK” to “FIRING” or vice versa. For example, a value of 5 minutes means that the alarm must persist in breaching the condition for five minutes before the alarm updates its state to “FIRING”; likewise, the alarm must persist in not breaching the condition for five minutes before the alarm updates its state to “OK.”
The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT3M. Maximum: PT1H. Default: PT3M.
Returns: The pending_duration of this MetricBase. Return type: str
-