ManagedComputeClusterCustomExpressionQueryScalingConfiguration

class oci.data_science.models.ManagedComputeClusterCustomExpressionQueryScalingConfiguration(**kwargs)

Bases: ManagedComputeClusterScalingConfiguration

The scaling configuration for the custom metric expression rule.

Attributes:

SCALING_CONFIGURATION_TYPE_QUERY

A constant which can be used with the scaling_configuration_type property of a ManagedComputeClusterScalingConfiguration.

SCALING_CONFIGURATION_TYPE_THRESHOLD

A constant which can be used with the scaling_configuration_type property of a ManagedComputeClusterScalingConfiguration.

instance_count_adjustment

Gets the instance_count_adjustment of this ManagedComputeClusterScalingConfiguration.

pending_duration

Gets the pending_duration of this ManagedComputeClusterScalingConfiguration.

query

[Required] Gets the query of this ManagedComputeClusterCustomExpressionQueryScalingConfiguration. The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval: 1m-60m (also 1h). You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). Example of threshold alarm: `   CPUUtilization[1m]{resourceId = "Compute_Target_OCID"}.grouping().mean() < 25   CPUUtilization[1m]{resourceId = "Compute_Target_OCID"}.grouping().mean() > 75   `.

scaling_configuration_type

[Required] Gets the scaling_configuration_type of this ManagedComputeClusterScalingConfiguration.

Methods:

__init__(**kwargs)

Initializes a new ManagedComputeClusterCustomExpressionQueryScalingConfiguration 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.

SCALING_CONFIGURATION_TYPE_QUERY = 'QUERY'

A constant which can be used with the scaling_configuration_type property of a ManagedComputeClusterScalingConfiguration. This constant has a value of “QUERY”

SCALING_CONFIGURATION_TYPE_THRESHOLD = 'THRESHOLD'

A constant which can be used with the scaling_configuration_type property of a ManagedComputeClusterScalingConfiguration. This constant has a value of “THRESHOLD”

__init__(**kwargs)

Initializes a new ManagedComputeClusterCustomExpressionQueryScalingConfiguration object with values from keyword arguments. The default value of the scaling_configuration_type attribute of this class is QUERY and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • scaling_configuration_type (str) – The value to assign to the scaling_configuration_type property of this ManagedComputeClusterCustomExpressionQueryScalingConfiguration. Allowed values for this property are: “THRESHOLD”, “QUERY”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • pending_duration (str) – The value to assign to the pending_duration property of this ManagedComputeClusterCustomExpressionQueryScalingConfiguration.

  • instance_count_adjustment (int) – The value to assign to the instance_count_adjustment property of this ManagedComputeClusterCustomExpressionQueryScalingConfiguration.

  • query (str) – The value to assign to the query property of this ManagedComputeClusterCustomExpressionQueryScalingConfiguration.

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.

property instance_count_adjustment

Gets the instance_count_adjustment of this ManagedComputeClusterScalingConfiguration. The value is used for adjusting the count of instances by.

Returns

The instance_count_adjustment of this ManagedComputeClusterScalingConfiguration.

Return type

int

property pending_duration

Gets the pending_duration of this ManagedComputeClusterScalingConfiguration. 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 ManagedComputeClusterScalingConfiguration.

Return type

str

property query

[Required] Gets the query of this ManagedComputeClusterCustomExpressionQueryScalingConfiguration. The Monitoring Query Language (MQL) expression to evaluate for the alarm. The Alarms feature of the Monitoring service interprets results for each returned time series as Boolean values, where zero represents false and a non-zero value represents true. A true value means that the trigger rule condition has been met. The query must specify a metric, statistic, interval, and trigger rule (threshold or absence). Supported values for interval: 1m-60m (also 1h). You can optionally specify dimensions and grouping functions. Supported grouping functions: grouping(), groupBy(). Example of threshold alarm:

` CPUUtilization[1m]{resourceId = "Compute_Target_OCID"}.grouping().mean() < 25 CPUUtilization[1m]{resourceId = "Compute_Target_OCID"}.grouping().mean() > 75 `

Returns

The query of this ManagedComputeClusterCustomExpressionQueryScalingConfiguration.

Return type

str

property scaling_configuration_type

[Required] Gets the scaling_configuration_type of this ManagedComputeClusterScalingConfiguration. The type of scaling configuration.

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

Returns

The scaling_configuration_type of this ManagedComputeClusterScalingConfiguration.

Return type

str