1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Monitoring
  5. Alarm
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Monitoring.Alarm

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This resource provides the Alarm resource in Oracle Cloud Infrastructure Monitoring service.

    Creates a new alarm in the specified compartment. For more information, see Creating an Alarm. For important limits information, see Limits on Monitoring.

    This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, or transactions, per second (TPS) for a given tenancy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAlarm = new oci.monitoring.Alarm("test_alarm", {
        compartmentId: compartmentId,
        destinations: [testNotificationTopic.id],
        displayName: alarmDisplayName,
        isEnabled: alarmIsEnabled,
        metricCompartmentId: alarmMetricCompartmentId,
        namespace: alarmNamespace,
        query: alarmQuery,
        severity: alarmSeverity,
        alarmSummary: alarmAlarmSummary,
        body: alarmBody,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        evaluationSlackDuration: alarmEvaluationSlackDuration,
        freeformTags: {
            Department: "Finance",
        },
        isNotificationsPerMetricDimensionEnabled: alarmIsNotificationsPerMetricDimensionEnabled,
        messageFormat: alarmMessageFormat,
        metricCompartmentIdInSubtree: alarmMetricCompartmentIdInSubtree,
        notificationTitle: alarmNotificationTitle,
        notificationVersion: alarmNotificationVersion,
        overrides: [{
            body: alarmOverridesBody,
            pendingDuration: alarmOverridesPendingDuration,
            query: alarmOverridesQuery,
            ruleName: testRule.name,
            severity: alarmOverridesSeverity,
        }],
        pendingDuration: alarmPendingDuration,
        repeatNotificationDuration: alarmRepeatNotificationDuration,
        resolution: alarmResolution,
        resourceGroup: alarmResourceGroup,
        ruleName: testRule.name,
        suppression: {
            timeSuppressFrom: alarmSuppressionTimeSuppressFrom,
            timeSuppressUntil: alarmSuppressionTimeSuppressUntil,
            description: alarmSuppressionDescription,
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_alarm = oci.monitoring.Alarm("test_alarm",
        compartment_id=compartment_id,
        destinations=[test_notification_topic["id"]],
        display_name=alarm_display_name,
        is_enabled=alarm_is_enabled,
        metric_compartment_id=alarm_metric_compartment_id,
        namespace=alarm_namespace,
        query=alarm_query,
        severity=alarm_severity,
        alarm_summary=alarm_alarm_summary,
        body=alarm_body,
        defined_tags={
            "Operations.CostCenter": "42",
        },
        evaluation_slack_duration=alarm_evaluation_slack_duration,
        freeform_tags={
            "Department": "Finance",
        },
        is_notifications_per_metric_dimension_enabled=alarm_is_notifications_per_metric_dimension_enabled,
        message_format=alarm_message_format,
        metric_compartment_id_in_subtree=alarm_metric_compartment_id_in_subtree,
        notification_title=alarm_notification_title,
        notification_version=alarm_notification_version,
        overrides=[{
            "body": alarm_overrides_body,
            "pending_duration": alarm_overrides_pending_duration,
            "query": alarm_overrides_query,
            "rule_name": test_rule["name"],
            "severity": alarm_overrides_severity,
        }],
        pending_duration=alarm_pending_duration,
        repeat_notification_duration=alarm_repeat_notification_duration,
        resolution=alarm_resolution,
        resource_group=alarm_resource_group,
        rule_name=test_rule["name"],
        suppression={
            "time_suppress_from": alarm_suppression_time_suppress_from,
            "time_suppress_until": alarm_suppression_time_suppress_until,
            "description": alarm_suppression_description,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Monitoring"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Monitoring.NewAlarm(ctx, "test_alarm", &Monitoring.AlarmArgs{
    			CompartmentId: pulumi.Any(compartmentId),
    			Destinations: pulumi.StringArray{
    				testNotificationTopic.Id,
    			},
    			DisplayName:         pulumi.Any(alarmDisplayName),
    			IsEnabled:           pulumi.Any(alarmIsEnabled),
    			MetricCompartmentId: pulumi.Any(alarmMetricCompartmentId),
    			Namespace:           pulumi.Any(alarmNamespace),
    			Query:               pulumi.Any(alarmQuery),
    			Severity:            pulumi.Any(alarmSeverity),
    			AlarmSummary:        pulumi.Any(alarmAlarmSummary),
    			Body:                pulumi.Any(alarmBody),
    			DefinedTags: pulumi.StringMap{
    				"Operations.CostCenter": pulumi.String("42"),
    			},
    			EvaluationSlackDuration: pulumi.Any(alarmEvaluationSlackDuration),
    			FreeformTags: pulumi.StringMap{
    				"Department": pulumi.String("Finance"),
    			},
    			IsNotificationsPerMetricDimensionEnabled: pulumi.Any(alarmIsNotificationsPerMetricDimensionEnabled),
    			MessageFormat:                            pulumi.Any(alarmMessageFormat),
    			MetricCompartmentIdInSubtree:             pulumi.Any(alarmMetricCompartmentIdInSubtree),
    			NotificationTitle:                        pulumi.Any(alarmNotificationTitle),
    			NotificationVersion:                      pulumi.Any(alarmNotificationVersion),
    			Overrides: monitoring.AlarmOverrideArray{
    				&monitoring.AlarmOverrideArgs{
    					Body:            pulumi.Any(alarmOverridesBody),
    					PendingDuration: pulumi.Any(alarmOverridesPendingDuration),
    					Query:           pulumi.Any(alarmOverridesQuery),
    					RuleName:        pulumi.Any(testRule.Name),
    					Severity:        pulumi.Any(alarmOverridesSeverity),
    				},
    			},
    			PendingDuration:            pulumi.Any(alarmPendingDuration),
    			RepeatNotificationDuration: pulumi.Any(alarmRepeatNotificationDuration),
    			Resolution:                 pulumi.Any(alarmResolution),
    			ResourceGroup:              pulumi.Any(alarmResourceGroup),
    			RuleName:                   pulumi.Any(testRule.Name),
    			Suppression: &monitoring.AlarmSuppressionTypeArgs{
    				TimeSuppressFrom:  pulumi.Any(alarmSuppressionTimeSuppressFrom),
    				TimeSuppressUntil: pulumi.Any(alarmSuppressionTimeSuppressUntil),
    				Description:       pulumi.Any(alarmSuppressionDescription),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testAlarm = new Oci.Monitoring.Alarm("test_alarm", new()
        {
            CompartmentId = compartmentId,
            Destinations = new[]
            {
                testNotificationTopic.Id,
            },
            DisplayName = alarmDisplayName,
            IsEnabled = alarmIsEnabled,
            MetricCompartmentId = alarmMetricCompartmentId,
            Namespace = alarmNamespace,
            Query = alarmQuery,
            Severity = alarmSeverity,
            AlarmSummary = alarmAlarmSummary,
            Body = alarmBody,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            EvaluationSlackDuration = alarmEvaluationSlackDuration,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            IsNotificationsPerMetricDimensionEnabled = alarmIsNotificationsPerMetricDimensionEnabled,
            MessageFormat = alarmMessageFormat,
            MetricCompartmentIdInSubtree = alarmMetricCompartmentIdInSubtree,
            NotificationTitle = alarmNotificationTitle,
            NotificationVersion = alarmNotificationVersion,
            Overrides = new[]
            {
                new Oci.Monitoring.Inputs.AlarmOverrideArgs
                {
                    Body = alarmOverridesBody,
                    PendingDuration = alarmOverridesPendingDuration,
                    Query = alarmOverridesQuery,
                    RuleName = testRule.Name,
                    Severity = alarmOverridesSeverity,
                },
            },
            PendingDuration = alarmPendingDuration,
            RepeatNotificationDuration = alarmRepeatNotificationDuration,
            Resolution = alarmResolution,
            ResourceGroup = alarmResourceGroup,
            RuleName = testRule.Name,
            Suppression = new Oci.Monitoring.Inputs.AlarmSuppressionArgs
            {
                TimeSuppressFrom = alarmSuppressionTimeSuppressFrom,
                TimeSuppressUntil = alarmSuppressionTimeSuppressUntil,
                Description = alarmSuppressionDescription,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Monitoring.Alarm;
    import com.pulumi.oci.Monitoring.AlarmArgs;
    import com.pulumi.oci.Monitoring.inputs.AlarmOverrideArgs;
    import com.pulumi.oci.Monitoring.inputs.AlarmSuppressionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testAlarm = new Alarm("testAlarm", AlarmArgs.builder()
                .compartmentId(compartmentId)
                .destinations(testNotificationTopic.id())
                .displayName(alarmDisplayName)
                .isEnabled(alarmIsEnabled)
                .metricCompartmentId(alarmMetricCompartmentId)
                .namespace(alarmNamespace)
                .query(alarmQuery)
                .severity(alarmSeverity)
                .alarmSummary(alarmAlarmSummary)
                .body(alarmBody)
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .evaluationSlackDuration(alarmEvaluationSlackDuration)
                .freeformTags(Map.of("Department", "Finance"))
                .isNotificationsPerMetricDimensionEnabled(alarmIsNotificationsPerMetricDimensionEnabled)
                .messageFormat(alarmMessageFormat)
                .metricCompartmentIdInSubtree(alarmMetricCompartmentIdInSubtree)
                .notificationTitle(alarmNotificationTitle)
                .notificationVersion(alarmNotificationVersion)
                .overrides(AlarmOverrideArgs.builder()
                    .body(alarmOverridesBody)
                    .pendingDuration(alarmOverridesPendingDuration)
                    .query(alarmOverridesQuery)
                    .ruleName(testRule.name())
                    .severity(alarmOverridesSeverity)
                    .build())
                .pendingDuration(alarmPendingDuration)
                .repeatNotificationDuration(alarmRepeatNotificationDuration)
                .resolution(alarmResolution)
                .resourceGroup(alarmResourceGroup)
                .ruleName(testRule.name())
                .suppression(AlarmSuppressionArgs.builder()
                    .timeSuppressFrom(alarmSuppressionTimeSuppressFrom)
                    .timeSuppressUntil(alarmSuppressionTimeSuppressUntil)
                    .description(alarmSuppressionDescription)
                    .build())
                .build());
    
        }
    }
    
    resources:
      testAlarm:
        type: oci:Monitoring:Alarm
        name: test_alarm
        properties:
          compartmentId: ${compartmentId}
          destinations:
            - ${testNotificationTopic.id}
          displayName: ${alarmDisplayName}
          isEnabled: ${alarmIsEnabled}
          metricCompartmentId: ${alarmMetricCompartmentId}
          namespace: ${alarmNamespace}
          query: ${alarmQuery}
          severity: ${alarmSeverity}
          alarmSummary: ${alarmAlarmSummary}
          body: ${alarmBody}
          definedTags:
            Operations.CostCenter: '42'
          evaluationSlackDuration: ${alarmEvaluationSlackDuration}
          freeformTags:
            Department: Finance
          isNotificationsPerMetricDimensionEnabled: ${alarmIsNotificationsPerMetricDimensionEnabled}
          messageFormat: ${alarmMessageFormat}
          metricCompartmentIdInSubtree: ${alarmMetricCompartmentIdInSubtree}
          notificationTitle: ${alarmNotificationTitle}
          notificationVersion: ${alarmNotificationVersion}
          overrides:
            - body: ${alarmOverridesBody}
              pendingDuration: ${alarmOverridesPendingDuration}
              query: ${alarmOverridesQuery}
              ruleName: ${testRule.name}
              severity: ${alarmOverridesSeverity}
          pendingDuration: ${alarmPendingDuration}
          repeatNotificationDuration: ${alarmRepeatNotificationDuration}
          resolution: ${alarmResolution}
          resourceGroup: ${alarmResourceGroup}
          ruleName: ${testRule.name}
          suppression:
            timeSuppressFrom: ${alarmSuppressionTimeSuppressFrom}
            timeSuppressUntil: ${alarmSuppressionTimeSuppressUntil}
            description: ${alarmSuppressionDescription}
    

    Create Alarm Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);
    @overload
    def Alarm(resource_name: str,
              args: AlarmArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Alarm(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              is_enabled: Optional[bool] = None,
              severity: Optional[str] = None,
              compartment_id: Optional[str] = None,
              query: Optional[str] = None,
              destinations: Optional[Sequence[str]] = None,
              display_name: Optional[str] = None,
              namespace: Optional[str] = None,
              metric_compartment_id: Optional[str] = None,
              evaluation_slack_duration: Optional[str] = None,
              pending_duration: Optional[str] = None,
              message_format: Optional[str] = None,
              freeform_tags: Optional[Mapping[str, str]] = None,
              metric_compartment_id_in_subtree: Optional[bool] = None,
              alarm_summary: Optional[str] = None,
              notification_title: Optional[str] = None,
              notification_version: Optional[str] = None,
              overrides: Optional[Sequence[_monitoring.AlarmOverrideArgs]] = None,
              is_notifications_per_metric_dimension_enabled: Optional[bool] = None,
              defined_tags: Optional[Mapping[str, str]] = None,
              repeat_notification_duration: Optional[str] = None,
              resolution: Optional[str] = None,
              resource_group: Optional[str] = None,
              rule_name: Optional[str] = None,
              body: Optional[str] = None,
              suppression: Optional[_monitoring.AlarmSuppressionArgs] = None)
    func NewAlarm(ctx *Context, name string, args AlarmArgs, opts ...ResourceOption) (*Alarm, error)
    public Alarm(string name, AlarmArgs args, CustomResourceOptions? opts = null)
    public Alarm(String name, AlarmArgs args)
    public Alarm(String name, AlarmArgs args, CustomResourceOptions options)
    
    type: oci:Monitoring:Alarm
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlarmArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var alarmResource = new Oci.Monitoring.Alarm("alarmResource", new()
    {
        IsEnabled = false,
        Severity = "string",
        CompartmentId = "string",
        Query = "string",
        Destinations = new[]
        {
            "string",
        },
        DisplayName = "string",
        Namespace = "string",
        MetricCompartmentId = "string",
        EvaluationSlackDuration = "string",
        PendingDuration = "string",
        MessageFormat = "string",
        FreeformTags = 
        {
            { "string", "string" },
        },
        MetricCompartmentIdInSubtree = false,
        AlarmSummary = "string",
        NotificationTitle = "string",
        NotificationVersion = "string",
        Overrides = new[]
        {
            new Oci.Monitoring.Inputs.AlarmOverrideArgs
            {
                Body = "string",
                PendingDuration = "string",
                Query = "string",
                RuleName = "string",
                Severity = "string",
            },
        },
        IsNotificationsPerMetricDimensionEnabled = false,
        DefinedTags = 
        {
            { "string", "string" },
        },
        RepeatNotificationDuration = "string",
        Resolution = "string",
        ResourceGroup = "string",
        RuleName = "string",
        Body = "string",
        Suppression = new Oci.Monitoring.Inputs.AlarmSuppressionArgs
        {
            TimeSuppressFrom = "string",
            TimeSuppressUntil = "string",
            Description = "string",
        },
    });
    
    example, err := Monitoring.NewAlarm(ctx, "alarmResource", &Monitoring.AlarmArgs{
    	IsEnabled:     pulumi.Bool(false),
    	Severity:      pulumi.String("string"),
    	CompartmentId: pulumi.String("string"),
    	Query:         pulumi.String("string"),
    	Destinations: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DisplayName:             pulumi.String("string"),
    	Namespace:               pulumi.String("string"),
    	MetricCompartmentId:     pulumi.String("string"),
    	EvaluationSlackDuration: pulumi.String("string"),
    	PendingDuration:         pulumi.String("string"),
    	MessageFormat:           pulumi.String("string"),
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	MetricCompartmentIdInSubtree: pulumi.Bool(false),
    	AlarmSummary:                 pulumi.String("string"),
    	NotificationTitle:            pulumi.String("string"),
    	NotificationVersion:          pulumi.String("string"),
    	Overrides: monitoring.AlarmOverrideArray{
    		&monitoring.AlarmOverrideArgs{
    			Body:            pulumi.String("string"),
    			PendingDuration: pulumi.String("string"),
    			Query:           pulumi.String("string"),
    			RuleName:        pulumi.String("string"),
    			Severity:        pulumi.String("string"),
    		},
    	},
    	IsNotificationsPerMetricDimensionEnabled: pulumi.Bool(false),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	RepeatNotificationDuration: pulumi.String("string"),
    	Resolution:                 pulumi.String("string"),
    	ResourceGroup:              pulumi.String("string"),
    	RuleName:                   pulumi.String("string"),
    	Body:                       pulumi.String("string"),
    	Suppression: &monitoring.AlarmSuppressionTypeArgs{
    		TimeSuppressFrom:  pulumi.String("string"),
    		TimeSuppressUntil: pulumi.String("string"),
    		Description:       pulumi.String("string"),
    	},
    })
    
    var alarmResource = new Alarm("alarmResource", AlarmArgs.builder()
        .isEnabled(false)
        .severity("string")
        .compartmentId("string")
        .query("string")
        .destinations("string")
        .displayName("string")
        .namespace("string")
        .metricCompartmentId("string")
        .evaluationSlackDuration("string")
        .pendingDuration("string")
        .messageFormat("string")
        .freeformTags(Map.of("string", "string"))
        .metricCompartmentIdInSubtree(false)
        .alarmSummary("string")
        .notificationTitle("string")
        .notificationVersion("string")
        .overrides(AlarmOverrideArgs.builder()
            .body("string")
            .pendingDuration("string")
            .query("string")
            .ruleName("string")
            .severity("string")
            .build())
        .isNotificationsPerMetricDimensionEnabled(false)
        .definedTags(Map.of("string", "string"))
        .repeatNotificationDuration("string")
        .resolution("string")
        .resourceGroup("string")
        .ruleName("string")
        .body("string")
        .suppression(AlarmSuppressionArgs.builder()
            .timeSuppressFrom("string")
            .timeSuppressUntil("string")
            .description("string")
            .build())
        .build());
    
    alarm_resource = oci.monitoring.Alarm("alarmResource",
        is_enabled=False,
        severity="string",
        compartment_id="string",
        query="string",
        destinations=["string"],
        display_name="string",
        namespace="string",
        metric_compartment_id="string",
        evaluation_slack_duration="string",
        pending_duration="string",
        message_format="string",
        freeform_tags={
            "string": "string",
        },
        metric_compartment_id_in_subtree=False,
        alarm_summary="string",
        notification_title="string",
        notification_version="string",
        overrides=[{
            "body": "string",
            "pending_duration": "string",
            "query": "string",
            "rule_name": "string",
            "severity": "string",
        }],
        is_notifications_per_metric_dimension_enabled=False,
        defined_tags={
            "string": "string",
        },
        repeat_notification_duration="string",
        resolution="string",
        resource_group="string",
        rule_name="string",
        body="string",
        suppression={
            "time_suppress_from": "string",
            "time_suppress_until": "string",
            "description": "string",
        })
    
    const alarmResource = new oci.monitoring.Alarm("alarmResource", {
        isEnabled: false,
        severity: "string",
        compartmentId: "string",
        query: "string",
        destinations: ["string"],
        displayName: "string",
        namespace: "string",
        metricCompartmentId: "string",
        evaluationSlackDuration: "string",
        pendingDuration: "string",
        messageFormat: "string",
        freeformTags: {
            string: "string",
        },
        metricCompartmentIdInSubtree: false,
        alarmSummary: "string",
        notificationTitle: "string",
        notificationVersion: "string",
        overrides: [{
            body: "string",
            pendingDuration: "string",
            query: "string",
            ruleName: "string",
            severity: "string",
        }],
        isNotificationsPerMetricDimensionEnabled: false,
        definedTags: {
            string: "string",
        },
        repeatNotificationDuration: "string",
        resolution: "string",
        resourceGroup: "string",
        ruleName: "string",
        body: "string",
        suppression: {
            timeSuppressFrom: "string",
            timeSuppressUntil: "string",
            description: "string",
        },
    });
    
    type: oci:Monitoring:Alarm
    properties:
        alarmSummary: string
        body: string
        compartmentId: string
        definedTags:
            string: string
        destinations:
            - string
        displayName: string
        evaluationSlackDuration: string
        freeformTags:
            string: string
        isEnabled: false
        isNotificationsPerMetricDimensionEnabled: false
        messageFormat: string
        metricCompartmentId: string
        metricCompartmentIdInSubtree: false
        namespace: string
        notificationTitle: string
        notificationVersion: string
        overrides:
            - body: string
              pendingDuration: string
              query: string
              ruleName: string
              severity: string
        pendingDuration: string
        query: string
        repeatNotificationDuration: string
        resolution: string
        resourceGroup: string
        ruleName: string
        severity: string
        suppression:
            description: string
            timeSuppressFrom: string
            timeSuppressUntil: string
    

    Alarm Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Alarm resource accepts the following input properties:

    CompartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    Destinations List<string>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    DisplayName string

    (Updatable) 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

    IsEnabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    MetricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    Namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    Query string

    (Updatable) 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) -----

    Severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    AlarmSummary string
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    Body string
    (Updatable) 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.
    DefinedTags Dictionary<string, string>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    EvaluationSlackDuration string
    (Updatable) 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.
    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    IsNotificationsPerMetricDimensionEnabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    MessageFormat string
    (Updatable) 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.
    MetricCompartmentIdInSubtree bool
    (Updatable) 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
    NotificationTitle string
    (Updatable) 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.
    NotificationVersion string
    (Updatable) 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.
    Overrides List<AlarmOverride>

    (Updatable) 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).

    PendingDuration string

    (Updatable) 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

    RepeatNotificationDuration string

    (Updatable) 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

    Resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    ResourceGroup string
    (Updatable) 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
    RuleName string
    (Updatable) 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.
    Suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    CompartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    Destinations []string
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    DisplayName string

    (Updatable) 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

    IsEnabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    MetricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    Namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    Query string

    (Updatable) 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) -----

    Severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    AlarmSummary string
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    Body string
    (Updatable) 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.
    DefinedTags map[string]string
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    EvaluationSlackDuration string
    (Updatable) 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.
    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    IsNotificationsPerMetricDimensionEnabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    MessageFormat string
    (Updatable) 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.
    MetricCompartmentIdInSubtree bool
    (Updatable) 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
    NotificationTitle string
    (Updatable) 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.
    NotificationVersion string
    (Updatable) 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.
    Overrides []AlarmOverrideArgs

    (Updatable) 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).

    PendingDuration string

    (Updatable) 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

    RepeatNotificationDuration string

    (Updatable) 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

    Resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    ResourceGroup string
    (Updatable) 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
    RuleName string
    (Updatable) 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.
    Suppression AlarmSuppressionTypeArgs
    (Updatable) The configuration details for suppressing an alarm.
    compartmentId String
    (Updatable) The OCID of the compartment containing the alarm.
    destinations List<String>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName String

    (Updatable) 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

    isEnabled Boolean
    (Updatable) Whether the alarm is enabled. Example: true
    metricCompartmentId String
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    namespace String
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    query String

    (Updatable) 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) -----

    severity String
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    alarmSummary String
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    body String
    (Updatable) 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.
    definedTags Map<String,String>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    evaluationSlackDuration String
    (Updatable) 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.
    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isNotificationsPerMetricDimensionEnabled Boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat String
    (Updatable) 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.
    metricCompartmentIdInSubtree Boolean
    (Updatable) 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
    notificationTitle String
    (Updatable) 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.
    notificationVersion String
    (Updatable) 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.
    overrides List<AlarmOverride>

    (Updatable) 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).

    pendingDuration String

    (Updatable) 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

    repeatNotificationDuration String

    (Updatable) 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

    resolution String
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup String
    (Updatable) 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
    ruleName String
    (Updatable) 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.
    suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    compartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    destinations string[]
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName string

    (Updatable) 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

    isEnabled boolean
    (Updatable) Whether the alarm is enabled. Example: true
    metricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    query string

    (Updatable) 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) -----

    severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    alarmSummary string
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    body string
    (Updatable) 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.
    definedTags {[key: string]: string}
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    evaluationSlackDuration string
    (Updatable) 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.
    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isNotificationsPerMetricDimensionEnabled boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat string
    (Updatable) 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.
    metricCompartmentIdInSubtree boolean
    (Updatable) 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
    notificationTitle string
    (Updatable) 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.
    notificationVersion string
    (Updatable) 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.
    overrides AlarmOverride[]

    (Updatable) 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).

    pendingDuration string

    (Updatable) 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

    repeatNotificationDuration string

    (Updatable) 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

    resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup string
    (Updatable) 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
    ruleName string
    (Updatable) 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.
    suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    compartment_id str
    (Updatable) The OCID of the compartment containing the alarm.
    destinations Sequence[str]
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    display_name str

    (Updatable) 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

    is_enabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    metric_compartment_id str
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    namespace str
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    query str

    (Updatable) 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) -----

    severity str
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    alarm_summary str
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    body str
    (Updatable) 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.
    defined_tags Mapping[str, str]
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    evaluation_slack_duration str
    (Updatable) 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.
    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    is_notifications_per_metric_dimension_enabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    message_format str
    (Updatable) 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.
    metric_compartment_id_in_subtree bool
    (Updatable) 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
    notification_title str
    (Updatable) 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.
    notification_version str
    (Updatable) 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.
    overrides Sequence[monitoring.AlarmOverrideArgs]

    (Updatable) 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).

    pending_duration str

    (Updatable) 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

    repeat_notification_duration str

    (Updatable) 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

    resolution str
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resource_group str
    (Updatable) 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
    rule_name str
    (Updatable) 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.
    suppression monitoring.AlarmSuppressionArgs
    (Updatable) The configuration details for suppressing an alarm.
    compartmentId String
    (Updatable) The OCID of the compartment containing the alarm.
    destinations List<String>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName String

    (Updatable) 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

    isEnabled Boolean
    (Updatable) Whether the alarm is enabled. Example: true
    metricCompartmentId String
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    namespace String
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    query String

    (Updatable) 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) -----

    severity String
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    alarmSummary String
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    body String
    (Updatable) 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.
    definedTags Map<String>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    evaluationSlackDuration String
    (Updatable) 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.
    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isNotificationsPerMetricDimensionEnabled Boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat String
    (Updatable) 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.
    metricCompartmentIdInSubtree Boolean
    (Updatable) 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
    notificationTitle String
    (Updatable) 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.
    notificationVersion String
    (Updatable) 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.
    overrides List<Property Map>

    (Updatable) 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).

    pendingDuration String

    (Updatable) 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

    repeatNotificationDuration String

    (Updatable) 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

    resolution String
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup String
    (Updatable) 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
    ruleName String
    (Updatable) 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.
    suppression Property Map
    (Updatable) The configuration details for suppressing an alarm.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Alarm resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current lifecycle state of the alarm. Example: DELETED
    TimeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current lifecycle state of the alarm. Example: DELETED
    TimeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current lifecycle state of the alarm. Example: DELETED
    timeCreated String
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated String
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The current lifecycle state of the alarm. Example: DELETED
    timeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The current lifecycle state of the alarm. Example: DELETED
    time_created str
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    time_updated str
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current lifecycle state of the alarm. Example: DELETED
    timeCreated String
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated String
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z

    Look up Existing Alarm Resource

    Get an existing Alarm resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AlarmState, opts?: CustomResourceOptions): Alarm
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alarm_summary: Optional[str] = None,
            body: Optional[str] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            destinations: Optional[Sequence[str]] = None,
            display_name: Optional[str] = None,
            evaluation_slack_duration: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            is_enabled: Optional[bool] = None,
            is_notifications_per_metric_dimension_enabled: Optional[bool] = None,
            message_format: Optional[str] = None,
            metric_compartment_id: Optional[str] = None,
            metric_compartment_id_in_subtree: Optional[bool] = None,
            namespace: Optional[str] = None,
            notification_title: Optional[str] = None,
            notification_version: Optional[str] = None,
            overrides: Optional[Sequence[_monitoring.AlarmOverrideArgs]] = None,
            pending_duration: Optional[str] = None,
            query: Optional[str] = None,
            repeat_notification_duration: Optional[str] = None,
            resolution: Optional[str] = None,
            resource_group: Optional[str] = None,
            rule_name: Optional[str] = None,
            severity: Optional[str] = None,
            state: Optional[str] = None,
            suppression: Optional[_monitoring.AlarmSuppressionArgs] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> Alarm
    func GetAlarm(ctx *Context, name string, id IDInput, state *AlarmState, opts ...ResourceOption) (*Alarm, error)
    public static Alarm Get(string name, Input<string> id, AlarmState? state, CustomResourceOptions? opts = null)
    public static Alarm get(String name, Output<String> id, AlarmState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AlarmSummary string
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    Body string
    (Updatable) 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.
    CompartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    DefinedTags Dictionary<string, string>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    Destinations List<string>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    DisplayName string

    (Updatable) 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

    EvaluationSlackDuration string
    (Updatable) 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.
    FreeformTags Dictionary<string, string>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    IsEnabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    IsNotificationsPerMetricDimensionEnabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    MessageFormat string
    (Updatable) 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.
    MetricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    MetricCompartmentIdInSubtree bool
    (Updatable) 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
    Namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    NotificationTitle string
    (Updatable) 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.
    NotificationVersion string
    (Updatable) 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.
    Overrides List<AlarmOverride>

    (Updatable) 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).

    PendingDuration string

    (Updatable) 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

    Query string

    (Updatable) 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) -----

    RepeatNotificationDuration string

    (Updatable) 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

    Resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    ResourceGroup string
    (Updatable) 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
    RuleName string
    (Updatable) 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.
    Severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    State string
    The current lifecycle state of the alarm. Example: DELETED
    Suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    TimeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    AlarmSummary string
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    Body string
    (Updatable) 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.
    CompartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    DefinedTags map[string]string
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    Destinations []string
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    DisplayName string

    (Updatable) 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

    EvaluationSlackDuration string
    (Updatable) 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.
    FreeformTags map[string]string
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    IsEnabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    IsNotificationsPerMetricDimensionEnabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    MessageFormat string
    (Updatable) 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.
    MetricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    MetricCompartmentIdInSubtree bool
    (Updatable) 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
    Namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    NotificationTitle string
    (Updatable) 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.
    NotificationVersion string
    (Updatable) 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.
    Overrides []AlarmOverrideArgs

    (Updatable) 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).

    PendingDuration string

    (Updatable) 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

    Query string

    (Updatable) 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) -----

    RepeatNotificationDuration string

    (Updatable) 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

    Resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    ResourceGroup string
    (Updatable) 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
    RuleName string
    (Updatable) 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.
    Severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    State string
    The current lifecycle state of the alarm. Example: DELETED
    Suppression AlarmSuppressionTypeArgs
    (Updatable) The configuration details for suppressing an alarm.
    TimeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    alarmSummary String
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    body String
    (Updatable) 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.
    compartmentId String
    (Updatable) The OCID of the compartment containing the alarm.
    definedTags Map<String,String>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    destinations List<String>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName String

    (Updatable) 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

    evaluationSlackDuration String
    (Updatable) 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.
    freeformTags Map<String,String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isEnabled Boolean
    (Updatable) Whether the alarm is enabled. Example: true
    isNotificationsPerMetricDimensionEnabled Boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat String
    (Updatable) 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.
    metricCompartmentId String
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    metricCompartmentIdInSubtree Boolean
    (Updatable) 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
    namespace String
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    notificationTitle String
    (Updatable) 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.
    notificationVersion String
    (Updatable) 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.
    overrides List<AlarmOverride>

    (Updatable) 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).

    pendingDuration String

    (Updatable) 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

    query String

    (Updatable) 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) -----

    repeatNotificationDuration String

    (Updatable) 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

    resolution String
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup String
    (Updatable) 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
    ruleName String
    (Updatable) 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.
    severity String
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    state String
    The current lifecycle state of the alarm. Example: DELETED
    suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    timeCreated String
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated String
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    alarmSummary string
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    body string
    (Updatable) 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.
    compartmentId string
    (Updatable) The OCID of the compartment containing the alarm.
    definedTags {[key: string]: string}
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    destinations string[]
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName string

    (Updatable) 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

    evaluationSlackDuration string
    (Updatable) 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.
    freeformTags {[key: string]: string}
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isEnabled boolean
    (Updatable) Whether the alarm is enabled. Example: true
    isNotificationsPerMetricDimensionEnabled boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat string
    (Updatable) 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.
    metricCompartmentId string
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    metricCompartmentIdInSubtree boolean
    (Updatable) 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
    namespace string
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    notificationTitle string
    (Updatable) 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.
    notificationVersion string
    (Updatable) 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.
    overrides AlarmOverride[]

    (Updatable) 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).

    pendingDuration string

    (Updatable) 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

    query string

    (Updatable) 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) -----

    repeatNotificationDuration string

    (Updatable) 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

    resolution string
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup string
    (Updatable) 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
    ruleName string
    (Updatable) 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.
    severity string
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    state string
    The current lifecycle state of the alarm. Example: DELETED
    suppression AlarmSuppression
    (Updatable) The configuration details for suppressing an alarm.
    timeCreated string
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated string
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    alarm_summary str
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    body str
    (Updatable) 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.
    compartment_id str
    (Updatable) The OCID of the compartment containing the alarm.
    defined_tags Mapping[str, str]
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    destinations Sequence[str]
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    display_name str

    (Updatable) 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

    evaluation_slack_duration str
    (Updatable) 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.
    freeform_tags Mapping[str, str]
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    is_enabled bool
    (Updatable) Whether the alarm is enabled. Example: true
    is_notifications_per_metric_dimension_enabled bool
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    message_format str
    (Updatable) 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.
    metric_compartment_id str
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    metric_compartment_id_in_subtree bool
    (Updatable) 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
    namespace str
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    notification_title str
    (Updatable) 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.
    notification_version str
    (Updatable) 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.
    overrides Sequence[monitoring.AlarmOverrideArgs]

    (Updatable) 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).

    pending_duration str

    (Updatable) 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

    query str

    (Updatable) 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) -----

    repeat_notification_duration str

    (Updatable) 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

    resolution str
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resource_group str
    (Updatable) 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
    rule_name str
    (Updatable) 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.
    severity str
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    state str
    The current lifecycle state of the alarm. Example: DELETED
    suppression monitoring.AlarmSuppressionArgs
    (Updatable) The configuration details for suppressing an alarm.
    time_created str
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    time_updated str
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z
    alarmSummary String
    (Updatable) 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 ListAlarmStatus GetAlarmHistory and RetrieveDimensionStates.
    body String
    (Updatable) 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.
    compartmentId String
    (Updatable) The OCID of the compartment containing the alarm.
    definedTags Map<String>
    (Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}
    destinations List<String>
    (Updatable) A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource, such as a topic. Supported destination services: Notifications, Streaming. Limit: One destination per supported destination service.
    displayName String

    (Updatable) 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

    evaluationSlackDuration String
    (Updatable) 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.
    freeformTags Map<String>
    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}
    isEnabled Boolean
    (Updatable) Whether the alarm is enabled. Example: true
    isNotificationsPerMetricDimensionEnabled Boolean
    (Updatable) When set to true, splits alarm notifications per metric stream. When set to false, groups alarm notifications across metric streams. Example: true
    messageFormat String
    (Updatable) 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.
    metricCompartmentId String
    (Updatable) The OCID of the compartment containing the metric being evaluated by the alarm.
    metricCompartmentIdInSubtree Boolean
    (Updatable) 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
    namespace String
    (Updatable) The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent
    notificationTitle String
    (Updatable) 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.
    notificationVersion String
    (Updatable) 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.
    overrides List<Property Map>

    (Updatable) 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).

    pendingDuration String

    (Updatable) 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

    query String

    (Updatable) 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) -----

    repeatNotificationDuration String

    (Updatable) 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

    resolution String
    (Updatable) The time between calculated aggregation windows for the alarm. Supported value: 1m
    resourceGroup String
    (Updatable) 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
    ruleName String
    (Updatable) 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.
    severity String
    (Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL
    state String
    The current lifecycle state of the alarm. Example: DELETED
    suppression Property Map
    (Updatable) The configuration details for suppressing an alarm.
    timeCreated String
    The date and time the alarm was created. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeUpdated String
    The date and time the alarm was last updated. Format defined by RFC3339. Example: 2023-02-03T01:02:29.600Z

    Supporting Types

    AlarmOverride, AlarmOverrideArgs

    Body string
    (Updatable) 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.
    PendingDuration string

    (Updatable) 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

    Query string

    (Updatable) 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) -----

    RuleName string
    (Updatable) A user-friendly description for this alarm override. Must be unique across all ruleName values for the alarm.
    Severity string
    (Updatable) The perceived severity of the alarm with regard to the affected system. Example: CRITICAL
    Body string
    (Updatable) 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.
    PendingDuration string

    (Updatable) 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

    Query string

    (Updatable) 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) -----

    RuleName string
    (Updatable) A user-friendly description for this alarm override. Must be unique across all ruleName values for the alarm.
    Severity string
    (Updatable) The perceived severity of the alarm with regard to the affected system. Example: CRITICAL
    body String
    (Updatable) 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.
    pendingDuration String

    (Updatable) 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

    query String

    (Updatable) 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) -----

    ruleName String
    (Updatable) A user-friendly description for this alarm override. Must be unique across all ruleName values for the alarm.
    severity String
    (Updatable) The perceived severity of the alarm with regard to the affected system. Example: CRITICAL
    body string
    (Updatable) 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.
    pendingDuration string

    (Updatable) 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

    query string

    (Updatable) 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) -----

    ruleName string
    (Updatable) A user-friendly description for this alarm override. Must be unique across all ruleName values for the alarm.
    severity string
    (Updatable) The perceived severity of the alarm with regard to the affected system. Example: CRITICAL
    body str
    (Updatable) 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.
    pending_duration str

    (Updatable) 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

    query str

    (Updatable) 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) -----

    rule_name str
    (Updatable) A user-friendly description for this alarm override. Must be unique across all ruleName values for the alarm.
    severity str
    (Updatable) The perceived severity of the alarm with regard to the affected system. Example: CRITICAL
    body String
    (Updatable) 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.
    pendingDuration String

    (Updatable) 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

    query String

    (Updatable) 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) -----

    ruleName String
    (Updatable) A user-friendly description for this alarm override. Must be unique across all ruleName values for the alarm.
    severity String
    (Updatable) The perceived severity of the alarm with regard to the affected system. Example: CRITICAL

    AlarmSuppression, AlarmSuppressionArgs

    TimeSuppressFrom string
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeSuppressUntil string

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Description string

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    TimeSuppressFrom string
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    TimeSuppressUntil string

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Description string

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    timeSuppressFrom String
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeSuppressUntil String

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    timeSuppressFrom string
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeSuppressUntil string

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description string

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    time_suppress_from str
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    time_suppress_until str

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description str

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    timeSuppressFrom String
    (Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T01:02:29.600Z
    timeSuppressUntil String

    (Updatable) The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2023-02-01T02:02:29.600Z

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    description String

    (Updatable) Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

    Oracle recommends including tracking information for the event or associated work, such as a ticket number.

    Example: Planned outage due to change IT-1234.

    Import

    Alarms can be imported using the id, e.g.

    $ pulumi import oci:Monitoring/alarm:Alarm test_alarm "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi