Package com.oracle.bmc.autoscaling.model
Class CustomMetric.Builder
- java.lang.Object
-
- com.oracle.bmc.autoscaling.model.CustomMetric.Builder
-
- Enclosing class:
- CustomMetric
public static class CustomMetric.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomMetric
build()
CustomMetric.Builder
copy(CustomMetric model)
CustomMetric.Builder
metricCompartmentId(String metricCompartmentId)
The OCID of the compartment containing the metrics.CustomMetric.Builder
namespace(String namespace)
The namespace for the query.CustomMetric.Builder
pendingDuration(String pendingDuration)
CustomMetric.Builder
query(String query)
The Monitoring Query Language (MQL) expression to evaluate for the alarm.CustomMetric.Builder
resourceGroup(String resourceGroup)
The resource group for the query.
-
-
-
Method Detail
-
pendingDuration
public CustomMetric.Builder pendingDuration(String pendingDuration)
-
query
public CustomMetric.Builder query(String query)
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]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85
-----
- Parameters:
query
- the value to set- Returns:
- this builder
-
namespace
public CustomMetric.Builder namespace(String namespace)
The namespace for the query.- Parameters:
namespace
- the value to set- Returns:
- this builder
-
resourceGroup
public CustomMetric.Builder resourceGroup(String resourceGroup)
The resource group for the query.- Parameters:
resourceGroup
- the value to set- Returns:
- this builder
-
metricCompartmentId
public CustomMetric.Builder metricCompartmentId(String metricCompartmentId)
The OCID of the compartment containing the metrics.- Parameters:
metricCompartmentId
- the value to set- Returns:
- this builder
-
build
public CustomMetric build()
-
copy
public CustomMetric.Builder copy(CustomMetric model)
-
-