Oracle Cloud Infrastructure

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

getAlarms

This data source provides the list of Alarms in Oracle Cloud Infrastructure Monitoring service.

Lists the alarms for 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 testAlarms = Output.Create(Oci.Monitoring.GetAlarms.InvokeAsync(new Oci.Monitoring.GetAlarmsArgs
        {
            CompartmentId = @var.Compartment_id,
            CompartmentIdInSubtree = @var.Alarm_compartment_id_in_subtree,
            DisplayName = @var.Alarm_display_name,
            State = @var.Alarm_state,
        }));
    }

}
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.GetAlarms(ctx, &monitoring.GetAlarmsArgs{
			CompartmentId:          _var.Compartment_id,
			CompartmentIdInSubtree: pulumi.BoolRef(_var.Alarm_compartment_id_in_subtree),
			DisplayName:            pulumi.StringRef(_var.Alarm_display_name),
			State:                  pulumi.StringRef(_var.Alarm_state),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_alarms = oci.Monitoring.get_alarms(compartment_id=var["compartment_id"],
    compartment_id_in_subtree=var["alarm_compartment_id_in_subtree"],
    display_name=var["alarm_display_name"],
    state=var["alarm_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAlarms = oci.Monitoring.getAlarms({
    compartmentId: _var.compartment_id,
    compartmentIdInSubtree: _var.alarm_compartment_id_in_subtree,
    displayName: _var.alarm_display_name,
    state: _var.alarm_state,
});

Coming soon!

Using getAlarms

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAlarms(args: GetAlarmsArgs, opts?: InvokeOptions): Promise<GetAlarmsResult>
function getAlarmsOutput(args: GetAlarmsOutputArgs, opts?: InvokeOptions): Output<GetAlarmsResult>
def get_alarms(compartment_id: Optional[str] = None,
               compartment_id_in_subtree: Optional[bool] = None,
               display_name: Optional[str] = None,
               filters: Optional[Sequence[_monitoring.GetAlarmsFilter]] = None,
               state: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetAlarmsResult
def get_alarms_output(compartment_id: Optional[pulumi.Input[str]] = None,
               compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
               display_name: Optional[pulumi.Input[str]] = None,
               filters: Optional[pulumi.Input[Sequence[pulumi.Input[_monitoring.GetAlarmsFilterArgs]]]] = None,
               state: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetAlarmsResult]
func GetAlarms(ctx *Context, args *GetAlarmsArgs, opts ...InvokeOption) (*GetAlarmsResult, error)
func GetAlarmsOutput(ctx *Context, args *GetAlarmsOutputArgs, opts ...InvokeOption) GetAlarmsResultOutput

> Note: This function is named GetAlarms in the Go SDK.

public static class GetAlarms 
{
    public static Task<GetAlarmsResult> InvokeAsync(GetAlarmsArgs args, InvokeOptions? opts = null)
    public static Output<GetAlarmsResult> Invoke(GetAlarmsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlarmsResult> getAlarms(GetAlarmsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:Monitoring/getAlarms:getAlarms
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

CompartmentIdInSubtree bool

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId 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, returns resources from only the compartment specified in compartmentId. Default is false.

DisplayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

Filters List<GetAlarmsFilter>
State string

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

CompartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

CompartmentIdInSubtree bool

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId 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, returns resources from only the compartment specified in compartmentId. Default is false.

DisplayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

Filters []GetAlarmsFilter
State string

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

compartmentId String

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

compartmentIdInSubtree Boolean

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId 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, returns resources from only the compartment specified in compartmentId. Default is false.

displayName String

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

filters List<GetAlarmsFilter>
state String

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

compartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

compartmentIdInSubtree boolean

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId 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, returns resources from only the compartment specified in compartmentId. Default is false.

displayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

filters GetAlarmsFilter[]
state string

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

compartment_id str

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

compartment_id_in_subtree bool

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId 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, returns resources from only the compartment specified in compartmentId. Default is false.

display_name str

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

filters GetAlarmsFilter]
state str

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

compartmentId String

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

compartmentIdInSubtree Boolean

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId 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, returns resources from only the compartment specified in compartmentId. Default is false.

displayName String

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

filters List<Property Map>
state String

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

getAlarms Result

The following output properties are available:

Alarms List<GetAlarmsAlarm>

The list of alarms.

CompartmentId string

The OCID of the compartment containing the alarm.

Id string

The provider-assigned unique ID for this managed resource.

CompartmentIdInSubtree bool
DisplayName string

A user-friendly name for the alarm. It does not have to be unique, and it's changeable.

Filters List<GetAlarmsFilter>
State string

The current lifecycle state of the alarm. Example: DELETED

Alarms []GetAlarmsAlarm

The list of alarms.

CompartmentId string

The OCID of the compartment containing the alarm.

Id string

The provider-assigned unique ID for this managed resource.

CompartmentIdInSubtree bool
DisplayName string

A user-friendly name for the alarm. It does not have to be unique, and it's changeable.

Filters []GetAlarmsFilter
State string

The current lifecycle state of the alarm. Example: DELETED

alarms List<GetAlarmsAlarm>

The list of alarms.

compartmentId String

The OCID of the compartment containing the alarm.

id String

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree Boolean
displayName String

A user-friendly name for the alarm. It does not have to be unique, and it's changeable.

filters List<GetAlarmsFilter>
state String

The current lifecycle state of the alarm. Example: DELETED

alarms GetAlarmsAlarm[]

The list of alarms.

compartmentId string

The OCID of the compartment containing the alarm.

id string

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree boolean
displayName string

A user-friendly name for the alarm. It does not have to be unique, and it's changeable.

filters GetAlarmsFilter[]
state string

The current lifecycle state of the alarm. Example: DELETED

alarms GetAlarmsAlarm]

The list of alarms.

compartment_id str

The OCID of the compartment containing the alarm.

id str

The provider-assigned unique ID for this managed resource.

compartment_id_in_subtree bool
display_name str

A user-friendly name for the alarm. It does not have to be unique, and it's changeable.

filters GetAlarmsFilter]
state str

The current lifecycle state of the alarm. Example: DELETED

alarms List<Property Map>

The list of alarms.

compartmentId String

The OCID of the compartment containing the alarm.

id String

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree Boolean
displayName String

A user-friendly name for the alarm. It does not have to be unique, and it's changeable.

filters List<Property Map>
state String

The current lifecycle state of the alarm. Example: DELETED

Supporting Types

GetAlarmsAlarm

Body string

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. Example: High CPU usage alert. Follow runbook instructions for resolution.

CompartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

DefinedTags Dictionary<string, object>

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

Destinations List<string>

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

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

FreeformTags Dictionary<string, object>

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

Id string

The OCID of the alarm.

IsEnabled bool

Whether the alarm is enabled. Example: true

MessageFormat string

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

MetricCompartmentId string

The OCID of the compartment containing the metric being evaluated by the alarm.

MetricCompartmentIdInSubtree bool

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

The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent

PendingDuration string

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

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

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

The time between calculated aggregation windows for the alarm. Supported value: 1m

ResourceGroup string

Resource group to match for metric data retrieved by the alarm. A resource group is a custom string that you can match when retrieving custom metrics. 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 ($). Example: frontend-fleet

Severity string

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

State string

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

Suppressions List<GetAlarmsAlarmSuppression>

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

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. Example: High CPU usage alert. Follow runbook instructions for resolution.

CompartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

DefinedTags map[string]interface{}

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

Destinations []string

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

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

FreeformTags map[string]interface{}

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

Id string

The OCID of the alarm.

IsEnabled bool

Whether the alarm is enabled. Example: true

MessageFormat string

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

MetricCompartmentId string

The OCID of the compartment containing the metric being evaluated by the alarm.

MetricCompartmentIdInSubtree bool

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

The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent

PendingDuration string

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

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

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

The time between calculated aggregation windows for the alarm. Supported value: 1m

ResourceGroup string

Resource group to match for metric data retrieved by the alarm. A resource group is a custom string that you can match when retrieving custom metrics. 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 ($). Example: frontend-fleet

Severity string

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

State string

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

Suppressions []GetAlarmsAlarmSuppression

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

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. Example: High CPU usage alert. Follow runbook instructions for resolution.

compartmentId String

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

definedTags Map<String,Object>

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

destinations List<String>

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

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

freeformTags Map<String,Object>

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

id String

The OCID of the alarm.

isEnabled Boolean

Whether the alarm is enabled. Example: true

messageFormat String

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

metricCompartmentId String

The OCID of the compartment containing the metric being evaluated by the alarm.

metricCompartmentIdInSubtree Boolean

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

The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent

pendingDuration String

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

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

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

The time between calculated aggregation windows for the alarm. Supported value: 1m

resourceGroup String

Resource group to match for metric data retrieved by the alarm. A resource group is a custom string that you can match when retrieving custom metrics. 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 ($). Example: frontend-fleet

severity String

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

state String

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

suppressions List<GetAlarmsAlarmSuppression>

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

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. Example: High CPU usage alert. Follow runbook instructions for resolution.

compartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

definedTags {[key: string]: any}

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

destinations string[]

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

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

freeformTags {[key: string]: any}

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

id string

The OCID of the alarm.

isEnabled boolean

Whether the alarm is enabled. Example: true

messageFormat string

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

metricCompartmentId string

The OCID of the compartment containing the metric being evaluated by the alarm.

metricCompartmentIdInSubtree boolean

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

The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent

pendingDuration string

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

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

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

The time between calculated aggregation windows for the alarm. Supported value: 1m

resourceGroup string

Resource group to match for metric data retrieved by the alarm. A resource group is a custom string that you can match when retrieving custom metrics. 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 ($). Example: frontend-fleet

severity string

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

state string

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

suppressions GetAlarmsAlarmSuppression[]

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

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. Example: High CPU usage alert. Follow runbook instructions for resolution.

compartment_id str

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

defined_tags Mapping[str, Any]

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

destinations Sequence[str]

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

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

freeform_tags Mapping[str, Any]

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

id str

The OCID of the alarm.

is_enabled bool

Whether the alarm is enabled. Example: true

message_format str

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

metric_compartment_id str

The OCID of the compartment containing the metric being evaluated by the alarm.

metric_compartment_id_in_subtree bool

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

The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent

pending_duration str

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

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

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

The time between calculated aggregation windows for the alarm. Supported value: 1m

resource_group str

Resource group to match for metric data retrieved by the alarm. A resource group is a custom string that you can match when retrieving custom metrics. 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 ($). Example: frontend-fleet

severity str

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

state str

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

suppressions GetAlarmsAlarmSuppression]

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

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. Example: High CPU usage alert. Follow runbook instructions for resolution.

compartmentId String

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

definedTags Map<Any>

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

destinations List<String>

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

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

freeformTags Map<Any>

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

id String

The OCID of the alarm.

isEnabled Boolean

Whether the alarm is enabled. Example: true

messageFormat String

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

metricCompartmentId String

The OCID of the compartment containing the metric being evaluated by the alarm.

metricCompartmentIdInSubtree Boolean

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

The source service or application emitting the metric that is evaluated by the alarm. Example: oci_computeagent

pendingDuration String

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

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

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

The time between calculated aggregation windows for the alarm. Supported value: 1m

resourceGroup String

Resource group to match for metric data retrieved by the alarm. A resource group is a custom string that you can match when retrieving custom metrics. 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 ($). Example: frontend-fleet

severity String

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

state String

A filter to return only alarms that match the given lifecycle state exactly. When not specified, only alarms in the ACTIVE lifecycle state are listed.

suppressions List<Property Map>

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

GetAlarmsAlarmSuppression

Description string

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

TimeSuppressFrom string

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

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

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

TimeSuppressFrom string

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

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

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

timeSuppressFrom String

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

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

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

timeSuppressFrom string

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

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

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

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

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

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

timeSuppressFrom String

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

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

GetAlarmsFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

Package Details

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

This Pulumi package is based on the oci Terraform Provider.