Class CreateAlarmDetails.Builder
- java.lang.Object
- 
- com.oracle.bmc.monitoring.model.CreateAlarmDetails.Builder
 
- 
- Enclosing class:
- CreateAlarmDetails
 
 public static class CreateAlarmDetails.Builder extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description Builder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateAlarmDetails.BuilderalarmSummary(String alarmSummary)Customizable alarm summary (alarmSummary alarm message parameter).CreateAlarmDetails.Builderbody(String body)The human-readable content of the delivered alarm notification.CreateAlarmDetailsbuild()CreateAlarmDetails.BuildercompartmentId(String compartmentId)The OCID of the compartment containing the alarm.CreateAlarmDetails.Buildercopy(CreateAlarmDetails model)CreateAlarmDetails.BuilderdefinedTags(Map<String,Map<String,Object>> definedTags)Usage of predefined tag keys.CreateAlarmDetails.Builderdestinations(List<String> destinations)A list of destinations for alarm notifications.CreateAlarmDetails.BuilderdisplayName(String displayName)A user-friendly name for the alarm.CreateAlarmDetails.BuilderevaluationSlackDuration(String evaluationSlackDuration)Customizable slack period to wait for metric ingestion before evaluating the alarm.CreateAlarmDetails.BuilderfreeformTags(Map<String,String> freeformTags)Simple key-value pair that is applied without any predefined name, type or scope.CreateAlarmDetails.BuilderisEnabled(Boolean isEnabled)Whether the alarm is enabled.CreateAlarmDetails.BuilderisNotificationsPerMetricDimensionEnabled(Boolean isNotificationsPerMetricDimensionEnabled)When set to true, splits alarm notifications per metric stream.CreateAlarmDetails.BuildermessageFormat(CreateAlarmDetails.MessageFormat messageFormat)The format to use for alarm notifications.CreateAlarmDetails.BuildermetricCompartmentId(String metricCompartmentId)The OCID of the compartment containing the metric being evaluated by the alarm.CreateAlarmDetails.BuildermetricCompartmentIdInSubtree(Boolean metricCompartmentIdInSubtree)When true, the alarm evaluates metrics from all compartments and subcompartments.CreateAlarmDetails.Buildernamespace(String namespace)The source service or application emitting the metric that is evaluated by the alarm.CreateAlarmDetails.BuildernotificationTitle(String notificationTitle)Customizable notification title (title alarm message parameter).CreateAlarmDetails.BuildernotificationVersion(String notificationVersion)The version of the alarm notification to be delivered.CreateAlarmDetails.Builderoverrides(List<AlarmOverride> overrides)A set of overrides that control evaluations of the alarm.CreateAlarmDetails.BuilderpendingDuration(String pendingDuration)The period of time that the condition defined in the alarm must persist before the alarm state changes from “OK” to “FIRING”.CreateAlarmDetails.Builderquery(String query)The Monitoring Query Language (MQL) expression to evaluate for the alarm.CreateAlarmDetails.BuilderrepeatNotificationDuration(String repeatNotificationDuration)The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption.CreateAlarmDetails.Builderresolution(String resolution)The time between calculated aggregation windows for the alarm.CreateAlarmDetails.BuilderresourceGroup(String resourceGroup)Resource group that you want to match.CreateAlarmDetails.BuilderruleName(String ruleName)Identifier of the alarm’s base values for alarm evaluation, for use when the alarm contains overrides.CreateAlarmDetails.Builderseverity(Alarm.Severity severity)The perceived type of response required when the alarm is in the “FIRING” state.CreateAlarmDetails.Buildersuppression(Suppression suppression)The configuration details for suppressing an alarm.
 
- 
- 
- 
Method Detail- 
displayNamepublic CreateAlarmDetails.Builder displayName(String displayName) A user-friendly name for the alarm.It does not have to be unique, and it’s changeable. Avoid entering confidential information. This value determines the title of each alarm notification. Example: High CPU Utilization - Parameters:
- displayName- the value to set
- Returns:
- this builder
 
 - 
compartmentIdpublic CreateAlarmDetails.Builder compartmentId(String compartmentId) The OCID of the compartment containing the alarm.- Parameters:
- compartmentId- the value to set
- Returns:
- this builder
 
 - 
metricCompartmentIdpublic CreateAlarmDetails.Builder metricCompartmentId(String metricCompartmentId) The OCID of the compartment containing the metric being evaluated by the alarm.- Parameters:
- metricCompartmentId- the value to set
- Returns:
- this builder
 
 - 
metricCompartmentIdInSubtreepublic CreateAlarmDetails.Builder metricCompartmentIdInSubtree(Boolean metricCompartmentIdInSubtree) When true, the alarm evaluates metrics from all compartments and subcompartments.The parameter can only be set to true when metricCompartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, the alarm evaluates metrics from only the compartment specified in metricCompartmentId. Default is false. Example: true - Parameters:
- metricCompartmentIdInSubtree- the value to set
- Returns:
- this builder
 
 - 
namespacepublic CreateAlarmDetails.Builder namespace(String namespace) The source service or application emitting the metric that is evaluated by the alarm.Example: oci_computeagent - Parameters:
- namespace- the value to set
- Returns:
- this builder
 
 - 
resourceGrouppublic CreateAlarmDetails.Builder resourceGroup(String resourceGroup) Resource group that you want to match.A null value returns only metric data that has no resource groups. The alarm retrieves metric data associated with the specified resource group only. Only one resource group can be applied per metric. A valid resourceGroup value starts with an alphabetical character and includes only alphanumeric characters, periods (.), underscores (_), hyphens (-), and dollar signs ($). Avoid entering confidential information. Example: frontend-fleet - Parameters:
- resourceGroup- the value to set
- Returns:
- this builder
 
 - 
querypublic CreateAlarmDetails.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. You can optionally specify dimensions and grouping functions. Also, you can customize the absence detection period. Supported grouping functions: grouping(), groupBy(). For information about writing MQL expressions, see Editing the MQL Expression for a Query. For details about 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() ----- Example of absence alarm with custom absence detection period of 20 hours: ----- CpuUtilization[1m]{availabilityDomain="cumS:PHX-AD-1"}.absent(20h) ----- - Parameters:
- query- the value to set
- Returns:
- this builder
 
 - 
resolutionpublic CreateAlarmDetails.Builder resolution(String resolution) The time between calculated aggregation windows for the alarm.Supported value: 1m - Parameters:
- resolution- the value to set
- Returns:
- this builder
 
 - 
pendingDurationpublic CreateAlarmDetails.Builder pendingDuration(String pendingDuration) The period of time that the condition defined in the alarm must persist before the alarm state changes from “OK” to “FIRING”.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”. The duration is specified as a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT1M. Maximum: PT1H. Default: PT1M. Under the default value of PT1M, the first evaluation that breaches the alarm updates the state to "FIRING". The alarm updates its status to "OK" when the breaching condition has been clear for the most recent minute. Example: PT5M - Parameters:
- pendingDuration- the value to set
- Returns:
- this builder
 
 - 
severitypublic CreateAlarmDetails.Builder severity(Alarm.Severity severity) The perceived type of response required when the alarm is in the “FIRING” state.Example: CRITICAL - Parameters:
- severity- the value to set
- Returns:
- this builder
 
 - 
bodypublic CreateAlarmDetails.Builder body(String body) The human-readable content of the delivered alarm notification.Optionally include dynamic variables. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information. Example: High CPU usage alert. Follow runbook instructions for resolution. - Parameters:
- body- the value to set
- Returns:
- this builder
 
 - 
isNotificationsPerMetricDimensionEnabledpublic CreateAlarmDetails.Builder isNotificationsPerMetricDimensionEnabled(Boolean isNotificationsPerMetricDimensionEnabled) When set to true, splits alarm notifications per metric stream.When set to false, groups alarm notifications across metric streams. Example: true - Parameters:
- isNotificationsPerMetricDimensionEnabled- the value to set
- Returns:
- this builder
 
 - 
messageFormatpublic CreateAlarmDetails.Builder messageFormat(CreateAlarmDetails.MessageFormat messageFormat) The format to use for alarm notifications.The formats are: * RAW - Raw JSON blob. Default value. When the destinations attribute specifies Streaming, all alarm notifications use this format. * PRETTY_JSON: JSON with new lines and indents. Available when the destinations attribute specifies Notifications only. * ONS_OPTIMIZED: Simplified, user-friendly layout. Available when the destinations attribute specifies Notifications only. Applies to Email subscription types only. - Parameters:
- messageFormat- the value to set
- Returns:
- this builder
 
 - 
destinationspublic CreateAlarmDetails.Builder destinations(List<String> destinations) A list of destinations for alarm notifications.Each destination is represented by the OCID of a related resource, such as a NotificationTopic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.- Parameters:
- destinations- the value to set
- Returns:
- this builder
 
 - 
repeatNotificationDurationpublic CreateAlarmDetails.Builder repeatNotificationDuration(String repeatNotificationDuration) The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption.Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D. Default value: null (notifications are not re-submitted). Example: PT2H - Parameters:
- repeatNotificationDuration- the value to set
- Returns:
- this builder
 
 - 
suppressionpublic CreateAlarmDetails.Builder suppression(Suppression suppression) The configuration details for suppressing an alarm.- Parameters:
- suppression- the value to set
- Returns:
- this builder
 
 - 
isEnabledpublic CreateAlarmDetails.Builder isEnabled(Boolean isEnabled) Whether the alarm is enabled.Example: true - Parameters:
- isEnabled- the value to set
- Returns:
- this builder
 
 - 
freeformTagspublic CreateAlarmDetails.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”} - Parameters:
- freeformTags- the value to set
- Returns:
- this builder
 
 - 
definedTagspublic CreateAlarmDetails.Builder definedTags(Map<String,Map<String,Object>> definedTags) Usage of predefined tag keys.These predefined keys are scoped to namespaces. Example: {“Operations”: {“CostCenter”: “42”}} - Parameters:
- definedTags- the value to set
- Returns:
- this builder
 
 - 
overridespublic CreateAlarmDetails.Builder overrides(List<AlarmOverride> overrides) A set of overrides that control evaluations of the alarm.Each override can specify values for query, severity, body, and pending duration. When an alarm contains overrides, the Monitoring service evaluates each override in order, beginning with the first override in the array (index position 0), and then evaluates the alarm's base values (ruleName value of BASE). - Parameters:
- overrides- the value to set
- Returns:
- this builder
 
 - 
ruleNamepublic CreateAlarmDetails.Builder ruleName(String ruleName) Identifier of the alarm’s base values for alarm evaluation, for use when the alarm contains overrides.Default value is BASE. For information about alarm overrides, see alarmOverride.- Parameters:
- ruleName- the value to set
- Returns:
- this builder
 
 - 
notificationVersionpublic CreateAlarmDetails.Builder notificationVersion(String notificationVersion) The version of the alarm notification to be delivered.Allowed value: 1.X The value must start with a number (up to four digits), followed by a period and an uppercase X. - Parameters:
- notificationVersion- the value to set
- Returns:
- this builder
 
 - 
notificationTitlepublic CreateAlarmDetails.Builder notificationTitle(String notificationTitle) Customizable notification title (title alarm message parameter).Optionally include dynamic variables. The notification title appears as the subject line in a formatted email message and as the title in a Slack message. - Parameters:
- notificationTitle- the value to set
- Returns:
- this builder
 
 - 
evaluationSlackDurationpublic CreateAlarmDetails.Builder evaluationSlackDuration(String evaluationSlackDuration) Customizable slack period to wait for metric ingestion before evaluating the alarm.Specify a string in ISO 8601 format (PT10M for ten minutes or PT1H for one hour). Minimum: PT3M. Maximum: PT2H. Default: PT3M. For more information about the slack period, see About the Internal Reset Period. - Parameters:
- evaluationSlackDuration- the value to set
- Returns:
- this builder
 
 - 
alarmSummarypublic CreateAlarmDetails.Builder alarmSummary(String alarmSummary) Customizable alarm summary (alarmSummary alarm message parameter).Optionally include dynamic variables. The alarm summary appears within the body of the alarm message and in responses to listAlarmsStatusgetAlarmHistoryandretrieveDimensionStates.- Parameters:
- alarmSummary- the value to set
- Returns:
- this builder
 
 - 
buildpublic CreateAlarmDetails build() 
 - 
copypublic CreateAlarmDetails.Builder copy(CreateAlarmDetails model) 
 
- 
 
-