Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

Alarm

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

Creates a new alarm in the specified compartment. 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

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testAlarm = new Oci.Monitoring.Alarm("testAlarm", new Oci.Monitoring.AlarmArgs
        {
            CompartmentId = @var.Compartment_id,
            Destinations = 
            {
                oci_ons_notification_topic.Test_notification_topic.Id,
            },
            DisplayName = @var.Alarm_display_name,
            IsEnabled = @var.Alarm_is_enabled,
            MetricCompartmentId = @var.Alarm_metric_compartment_id,
            Namespace = @var.Alarm_namespace,
            Query = @var.Alarm_query,
            Severity = @var.Alarm_severity,
            Body = @var.Alarm_body,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            MessageFormat = @var.Alarm_message_format,
            MetricCompartmentIdInSubtree = @var.Alarm_metric_compartment_id_in_subtree,
            PendingDuration = @var.Alarm_pending_duration,
            RepeatNotificationDuration = @var.Alarm_repeat_notification_duration,
            Resolution = @var.Alarm_resolution,
            ResourceGroup = @var.Alarm_resource_group,
            Suppression = new Oci.Monitoring.Inputs.AlarmSuppressionArgs
            {
                TimeSuppressFrom = @var.Alarm_suppression_time_suppress_from,
                TimeSuppressUntil = @var.Alarm_suppression_time_suppress_until,
                Description = @var.Alarm_suppression_description,
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Monitoring"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Monitoring.NewAlarm(ctx, "testAlarm", &Monitoring.AlarmArgs{
			CompartmentId: pulumi.Any(_var.Compartment_id),
			Destinations: pulumi.StringArray{
				pulumi.Any(oci_ons_notification_topic.Test_notification_topic.Id),
			},
			DisplayName:         pulumi.Any(_var.Alarm_display_name),
			IsEnabled:           pulumi.Any(_var.Alarm_is_enabled),
			MetricCompartmentId: pulumi.Any(_var.Alarm_metric_compartment_id),
			Namespace:           pulumi.Any(_var.Alarm_namespace),
			Query:               pulumi.Any(_var.Alarm_query),
			Severity:            pulumi.Any(_var.Alarm_severity),
			Body:                pulumi.Any(_var.Alarm_body),
			DefinedTags: pulumi.AnyMap{
				"Operations.CostCenter": pulumi.Any("42"),
			},
			FreeformTags: pulumi.AnyMap{
				"Department": pulumi.Any("Finance"),
			},
			MessageFormat:                pulumi.Any(_var.Alarm_message_format),
			MetricCompartmentIdInSubtree: pulumi.Any(_var.Alarm_metric_compartment_id_in_subtree),
			PendingDuration:              pulumi.Any(_var.Alarm_pending_duration),
			RepeatNotificationDuration:   pulumi.Any(_var.Alarm_repeat_notification_duration),
			Resolution:                   pulumi.Any(_var.Alarm_resolution),
			ResourceGroup:                pulumi.Any(_var.Alarm_resource_group),
			Suppression: &monitoring.AlarmSuppressionArgs{
				TimeSuppressFrom:  pulumi.Any(_var.Alarm_suppression_time_suppress_from),
				TimeSuppressUntil: pulumi.Any(_var.Alarm_suppression_time_suppress_until),
				Description:       pulumi.Any(_var.Alarm_suppression_description),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_alarm = oci.monitoring.Alarm("testAlarm",
    compartment_id=var["compartment_id"],
    destinations=[oci_ons_notification_topic["test_notification_topic"]["id"]],
    display_name=var["alarm_display_name"],
    is_enabled=var["alarm_is_enabled"],
    metric_compartment_id=var["alarm_metric_compartment_id"],
    namespace=var["alarm_namespace"],
    query=var["alarm_query"],
    severity=var["alarm_severity"],
    body=var["alarm_body"],
    defined_tags={
        "Operations.CostCenter": "42",
    },
    freeform_tags={
        "Department": "Finance",
    },
    message_format=var["alarm_message_format"],
    metric_compartment_id_in_subtree=var["alarm_metric_compartment_id_in_subtree"],
    pending_duration=var["alarm_pending_duration"],
    repeat_notification_duration=var["alarm_repeat_notification_duration"],
    resolution=var["alarm_resolution"],
    resource_group=var["alarm_resource_group"],
    suppression=oci.monitoring.AlarmSuppressionArgs(
        time_suppress_from=var["alarm_suppression_time_suppress_from"],
        time_suppress_until=var["alarm_suppression_time_suppress_until"],
        description=var["alarm_suppression_description"],
    ))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAlarm = new oci.monitoring.Alarm("testAlarm", {
    compartmentId: _var.compartment_id,
    destinations: [oci_ons_notification_topic.test_notification_topic.id],
    displayName: _var.alarm_display_name,
    isEnabled: _var.alarm_is_enabled,
    metricCompartmentId: _var.alarm_metric_compartment_id,
    namespace: _var.alarm_namespace,
    query: _var.alarm_query,
    severity: _var.alarm_severity,
    body: _var.alarm_body,
    definedTags: {
        "Operations.CostCenter": "42",
    },
    freeformTags: {
        Department: "Finance",
    },
    messageFormat: _var.alarm_message_format,
    metricCompartmentIdInSubtree: _var.alarm_metric_compartment_id_in_subtree,
    pendingDuration: _var.alarm_pending_duration,
    repeatNotificationDuration: _var.alarm_repeat_notification_duration,
    resolution: _var.alarm_resolution,
    resourceGroup: _var.alarm_resource_group,
    suppression: {
        timeSuppressFrom: _var.alarm_suppression_time_suppress_from,
        timeSuppressUntil: _var.alarm_suppression_time_suppress_until,
        description: _var.alarm_suppression_description,
    },
});

Coming soon!

Create a Alarm Resource

new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);
@overload
def Alarm(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          body: Optional[str] = None,
          compartment_id: Optional[str] = None,
          defined_tags: Optional[Mapping[str, Any]] = None,
          destinations: Optional[Sequence[str]] = None,
          display_name: Optional[str] = None,
          freeform_tags: Optional[Mapping[str, Any]] = None,
          is_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,
          pending_duration: Optional[str] = None,
          query: Optional[str] = None,
          repeat_notification_duration: Optional[str] = None,
          resolution: Optional[str] = None,
          resource_group: Optional[str] = None,
          severity: Optional[str] = None,
          suppression: Optional[_monitoring.AlarmSuppressionArgs] = None)
@overload
def Alarm(resource_name: str,
          args: AlarmArgs,
          opts: Optional[ResourceOptions] = 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.

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.

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

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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

Severity string

(Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL

Body string

(Updatable) The human-readable content of the notification delivered. 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, object>

(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}

FreeformTags Dictionary<string, object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}

MessageFormat string

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

RepeatNotificationDuration string

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

Suppression AlarmSuppressionArgs

(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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

Severity string

(Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL

Body string

(Updatable) The human-readable content of the notification delivered. 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]interface{}

(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}

FreeformTags map[string]interface{}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}

MessageFormat string

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

RepeatNotificationDuration string

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

Suppression 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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

severity String

(Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL

body String

(Updatable) The human-readable content of the notification delivered. 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,Object>

(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}

freeformTags Map<String,Object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}

messageFormat String

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

repeatNotificationDuration String

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

suppression AlarmSuppressionArgs

(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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

severity string

(Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL

body string

(Updatable) The human-readable content of the notification delivered. 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]: any}

(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}

freeformTags {[key: string]: any}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}

messageFormat string

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

repeatNotificationDuration string

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

suppression AlarmSuppressionArgs

(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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

severity str

(Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL

body str

(Updatable) The human-readable content of the notification delivered. 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, Any]

(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}

freeform_tags Mapping[str, Any]

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}

message_format str

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

repeat_notification_duration str

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

suppression 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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

severity String

(Updatable) The perceived type of response required when the alarm is in the "FIRING" state. Example: CRITICAL

body String

(Updatable) The human-readable content of the notification delivered. 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<Any>

(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}

freeformTags Map<Any>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"Department": "Finance"}

messageFormat String

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

repeatNotificationDuration String

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

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: 2019-02-01T01:02:29.600Z

TimeUpdated string

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-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: 2019-02-01T01:02:29.600Z

TimeUpdated string

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-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: 2019-02-01T01:02:29.600Z

timeUpdated String

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-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: 2019-02-01T01:02:29.600Z

timeUpdated string

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-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: 2019-02-01T01:02:29.600Z

time_updated str

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-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: 2019-02-01T01:02:29.600Z

timeUpdated String

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-02-03T01:02:29.600Z

Look up an 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,
        body: Optional[str] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, Any]] = None,
        destinations: Optional[Sequence[str]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, Any]] = None,
        is_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,
        pending_duration: Optional[str] = None,
        query: Optional[str] = None,
        repeat_notification_duration: Optional[str] = None,
        resolution: Optional[str] = None,
        resource_group: 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:
Body string

(Updatable) The human-readable content of the notification delivered. 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, object>

(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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

FreeformTags Dictionary<string, object>

(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

MessageFormat string

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

RepeatNotificationDuration string

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

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 AlarmSuppressionArgs

(Updatable) The configuration details for suppressing an alarm.

TimeCreated string

The date and time the alarm was created. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

TimeUpdated string

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-02-03T01:02:29.600Z

Body string

(Updatable) The human-readable content of the notification delivered. 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]interface{}

(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}

Destinations []string

(Updatable) A list of destinations to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

FreeformTags map[string]interface{}

(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

MessageFormat string

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

RepeatNotificationDuration string

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

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 AlarmSuppressionArgs

(Updatable) The configuration details for suppressing an alarm.

TimeCreated string

The date and time the alarm was created. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

TimeUpdated string

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-02-03T01:02:29.600Z

body String

(Updatable) The human-readable content of the notification delivered. 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,Object>

(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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

freeformTags Map<String,Object>

(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

messageFormat String

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

repeatNotificationDuration String

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

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 AlarmSuppressionArgs

(Updatable) The configuration details for suppressing an alarm.

timeCreated String

The date and time the alarm was created. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

timeUpdated String

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-02-03T01:02:29.600Z

body string

(Updatable) The human-readable content of the notification delivered. 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]: any}

(Updatable) Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"Operations.CostCenter": "42"}

destinations string[]

(Updatable) A list of destinations to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

freeformTags {[key: string]: any}

(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

messageFormat string

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

repeatNotificationDuration string

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

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 AlarmSuppressionArgs

(Updatable) The configuration details for suppressing an alarm.

timeCreated string

The date and time the alarm was created. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

timeUpdated string

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-02-03T01:02:29.600Z

body str

(Updatable) The human-readable content of the notification delivered. 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, Any]

(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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

freeform_tags Mapping[str, Any]

(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

message_format str

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

repeat_notification_duration str

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

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 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: 2019-02-01T01:02:29.600Z

time_updated str

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-02-03T01:02:29.600Z

body String

(Updatable) The human-readable content of the notification delivered. 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<Any>

(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 to which the notifications for this alarm will be delivered. Each destination is represented by an OCID related to the supported destination service. For example, a destination using the Notifications service is represented by a topic OCID. Supported destination services: Notifications Service. Limit: One destination per supported destination service.

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.

freeformTags Map<Any>

(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

messageFormat String

(Updatable) The format to use for notification messages sent from this alarm. The formats are:

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

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".

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. Supported grouping functions: grouping(), groupBy(). For details about Monitoring Query Language (MQL), see Monitoring Query Language (MQL) Reference. For available dimensions, review the metric definition for the supported service. See Supported Services.

repeatNotificationDuration String

(Updatable) The frequency at which notifications are re-submitted, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum: PT1M. Maximum: P30D.

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

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: 2019-02-01T01:02:29.600Z

timeUpdated String

The date and time the alarm was last updated. Format defined by RFC3339. Example: 2019-02-03T01:02:29.600Z

Supporting Types

AlarmSuppression

TimeSuppressFrom string

(Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-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: 2019-02-01T02:02:29.600Z

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.

TimeSuppressFrom string

(Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-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: 2019-02-01T02:02:29.600Z

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.

timeSuppressFrom String

(Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-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: 2019-02-01T02:02:29.600Z

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.

timeSuppressFrom string

(Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-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: 2019-02-01T02:02:29.600Z

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.

time_suppress_from str

(Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-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: 2019-02-01T02:02:29.600Z

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.

timeSuppressFrom String

(Updatable) The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-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: 2019-02-01T02:02:29.600Z

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.

Import

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

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

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.