public static class AlarmSummary.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
AlarmSummary |
build() |
AlarmSummary.Builder |
compartmentId(String compartmentId)
The OCID
of the compartment containing the alarm.
|
AlarmSummary.Builder |
copy(AlarmSummary model) |
AlarmSummary.Builder |
definedTags(Map<String,Map<String,Object>> definedTags)
Usage of predefined tag keys.
|
AlarmSummary.Builder |
destinations(List<String> destinations)
A list of destinations to which the notifications for this alarm will be delivered.
|
AlarmSummary.Builder |
displayName(String displayName)
A user-friendly name for the alarm.
|
AlarmSummary.Builder |
freeformTags(Map<String,String> freeformTags)
Simple key-value pair that is applied without any predefined name, type or scope.
|
AlarmSummary.Builder |
id(String id)
The OCID
of the alarm.
|
AlarmSummary.Builder |
isEnabled(Boolean isEnabled)
Whether the alarm is enabled.
|
AlarmSummary.Builder |
lifecycleState(Alarm.LifecycleState lifecycleState)
The current lifecycle state of the alarm.
|
AlarmSummary.Builder |
metricCompartmentId(String metricCompartmentId)
The OCID
of the compartment containing the metric being evaluated by the alarm.
|
AlarmSummary.Builder |
namespace(String namespace)
The source service or application emitting the metric that is evaluated by the alarm.
|
AlarmSummary.Builder |
query(String query)
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
|
AlarmSummary.Builder |
severity(AlarmSummary.Severity severity)
The perceived severity of the alarm with regard to the affected system.
|
AlarmSummary.Builder |
suppression(Suppression suppression)
The configuration details for suppressing an alarm.
|
public AlarmSummary.Builder id(String id)
The OCID of the alarm.
id
- the value to setpublic AlarmSummary.Builder displayName(String displayName)
A user-friendly name for the alarm. It does not have to be unique, and it’s changeable.
This name is sent as the title for notifications related to this alarm.
Example: High CPU Utilization
displayName
- the value to setpublic AlarmSummary.Builder compartmentId(String compartmentId)
The OCID of the compartment containing the alarm.
compartmentId
- the value to setpublic AlarmSummary.Builder metricCompartmentId(String metricCompartmentId)
The OCID of the compartment containing the metric being evaluated by the alarm.
metricCompartmentId
- the value to setpublic AlarmSummary.Builder namespace(String namespace)
The source service or application emitting the metric that is evaluated by the alarm.
Example: oci_computeagent
namespace
- the value to setpublic AlarmSummary.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 depend on the specified time range. More interval values are supported for
smaller time ranges. Supported grouping functions: grouping()
, groupBy()
.
For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL)
Reference. For
available dimensions, review the metric definition for the supported service. See
Supported
Services.
Example of threshold alarm:
-----
CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.groupBy(availabilityDomain).percentile(0.9) > 85
-----
Example of absence alarm:
-----
CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent()
-----
query
- the value to setpublic AlarmSummary.Builder severity(AlarmSummary.Severity severity)
The perceived severity of the alarm with regard to the affected system.
Example: CRITICAL
severity
- the value to setpublic AlarmSummary.Builder destinations(List<String> destinations)
A list of destinations to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.
destinations
- the value to setpublic AlarmSummary.Builder suppression(Suppression suppression)
The configuration details for suppressing an alarm.
suppression
- the value to setpublic AlarmSummary.Builder isEnabled(Boolean isEnabled)
Whether the alarm is enabled.
Example: true
isEnabled
- the value to setpublic AlarmSummary.Builder freeformTags(Map<String,String> freeformTags)
Simple key-value pair that is applied without any predefined name, type or scope. Exists
for cross-compatibility only. Example: {"Department": "Finance"}
freeformTags
- the value to setpublic AlarmSummary.Builder definedTags(Map<String,Map<String,Object>> definedTags)
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example:
{"Operations": {"CostCenter": "42"}}
definedTags
- the value to setpublic AlarmSummary.Builder lifecycleState(Alarm.LifecycleState lifecycleState)
The current lifecycle state of the alarm.
Example: DELETED
lifecycleState
- the value to setpublic AlarmSummary build()
public AlarmSummary.Builder copy(AlarmSummary model)
Copyright © 2016–2023. All rights reserved.