1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. StackMonitoring
  5. getMonitoringTemplateAlarmCondition
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.StackMonitoring.getMonitoringTemplateAlarmCondition

Explore with Pulumi AI

This data source provides details about a specific Monitoring Template Alarm Condition resource in Oracle Cloud Infrastructure Stack Monitoring service.

Gets a Alarm Condition by identifier.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testMonitoringTemplateAlarmCondition = oci.StackMonitoring.getMonitoringTemplateAlarmCondition({
    alarmConditionId: testAlarmCondition.id,
    monitoringTemplateId: testMonitoringTemplate.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_monitoring_template_alarm_condition = oci.StackMonitoring.get_monitoring_template_alarm_condition(alarm_condition_id=test_alarm_condition["id"],
    monitoring_template_id=test_monitoring_template["id"])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := stackmonitoring.GetMonitoringTemplateAlarmCondition(ctx, &stackmonitoring.GetMonitoringTemplateAlarmConditionArgs{
			AlarmConditionId:     testAlarmCondition.Id,
			MonitoringTemplateId: testMonitoringTemplate.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testMonitoringTemplateAlarmCondition = Oci.StackMonitoring.GetMonitoringTemplateAlarmCondition.Invoke(new()
    {
        AlarmConditionId = testAlarmCondition.Id,
        MonitoringTemplateId = testMonitoringTemplate.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.StackMonitoring.StackMonitoringFunctions;
import com.pulumi.oci.StackMonitoring.inputs.GetMonitoringTemplateAlarmConditionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testMonitoringTemplateAlarmCondition = StackMonitoringFunctions.getMonitoringTemplateAlarmCondition(GetMonitoringTemplateAlarmConditionArgs.builder()
            .alarmConditionId(testAlarmCondition.id())
            .monitoringTemplateId(testMonitoringTemplate.id())
            .build());

    }
}
Copy
variables:
  testMonitoringTemplateAlarmCondition:
    fn::invoke:
      function: oci:StackMonitoring:getMonitoringTemplateAlarmCondition
      arguments:
        alarmConditionId: ${testAlarmCondition.id}
        monitoringTemplateId: ${testMonitoringTemplate.id}
Copy

Using getMonitoringTemplateAlarmCondition

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 getMonitoringTemplateAlarmCondition(args: GetMonitoringTemplateAlarmConditionArgs, opts?: InvokeOptions): Promise<GetMonitoringTemplateAlarmConditionResult>
function getMonitoringTemplateAlarmConditionOutput(args: GetMonitoringTemplateAlarmConditionOutputArgs, opts?: InvokeOptions): Output<GetMonitoringTemplateAlarmConditionResult>
Copy
def get_monitoring_template_alarm_condition(alarm_condition_id: Optional[str] = None,
                                            monitoring_template_id: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetMonitoringTemplateAlarmConditionResult
def get_monitoring_template_alarm_condition_output(alarm_condition_id: Optional[pulumi.Input[str]] = None,
                                            monitoring_template_id: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetMonitoringTemplateAlarmConditionResult]
Copy
func GetMonitoringTemplateAlarmCondition(ctx *Context, args *GetMonitoringTemplateAlarmConditionArgs, opts ...InvokeOption) (*GetMonitoringTemplateAlarmConditionResult, error)
func GetMonitoringTemplateAlarmConditionOutput(ctx *Context, args *GetMonitoringTemplateAlarmConditionOutputArgs, opts ...InvokeOption) GetMonitoringTemplateAlarmConditionResultOutput
Copy

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

public static class GetMonitoringTemplateAlarmCondition 
{
    public static Task<GetMonitoringTemplateAlarmConditionResult> InvokeAsync(GetMonitoringTemplateAlarmConditionArgs args, InvokeOptions? opts = null)
    public static Output<GetMonitoringTemplateAlarmConditionResult> Invoke(GetMonitoringTemplateAlarmConditionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMonitoringTemplateAlarmConditionResult> getMonitoringTemplateAlarmCondition(GetMonitoringTemplateAlarmConditionArgs args, InvokeOptions options)
public static Output<GetMonitoringTemplateAlarmConditionResult> getMonitoringTemplateAlarmCondition(GetMonitoringTemplateAlarmConditionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:StackMonitoring/getMonitoringTemplateAlarmCondition:getMonitoringTemplateAlarmCondition
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AlarmConditionId This property is required. string
The OCID of the alarm condition.
MonitoringTemplateId This property is required. string
The OCID of the monitoring template.
AlarmConditionId This property is required. string
The OCID of the alarm condition.
MonitoringTemplateId This property is required. string
The OCID of the monitoring template.
alarmConditionId This property is required. String
The OCID of the alarm condition.
monitoringTemplateId This property is required. String
The OCID of the monitoring template.
alarmConditionId This property is required. string
The OCID of the alarm condition.
monitoringTemplateId This property is required. string
The OCID of the monitoring template.
alarm_condition_id This property is required. str
The OCID of the alarm condition.
monitoring_template_id This property is required. str
The OCID of the monitoring template.
alarmConditionId This property is required. String
The OCID of the alarm condition.
monitoringTemplateId This property is required. String
The OCID of the monitoring template.

getMonitoringTemplateAlarmCondition Result

The following output properties are available:

AlarmConditionId string
CompositeType string
The OCID of the composite resource type like EBS/PEOPLE_SOFT.
ConditionType string
Type of defined monitoring template.
Conditions List<GetMonitoringTemplateAlarmConditionCondition>
Monitoring template conditions
DefinedTags Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
FreeformTags Dictionary<string, string>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
Id string
The OCID of the Alarm Condition.
MetricName string
The metric name.
MonitoringTemplateId string
The OCID of the monitoring template.
Namespace string
The stack monitoring service or application emitting the metric that is evaluated by the alarm.
ResourceType string
The resource type OCID.
State string
The current lifecycle state of the monitoring template
Status string
The current status of the monitoring template i.e. whether it is Published or Unpublished
SystemTags Dictionary<string, string>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated string
The date and time the alarm condition was created. Format defined by RFC3339.
TimeUpdated string
The date and time the alarm condition was updated. Format defined by RFC3339.
AlarmConditionId string
CompositeType string
The OCID of the composite resource type like EBS/PEOPLE_SOFT.
ConditionType string
Type of defined monitoring template.
Conditions []GetMonitoringTemplateAlarmConditionCondition
Monitoring template conditions
DefinedTags map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
FreeformTags map[string]string
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
Id string
The OCID of the Alarm Condition.
MetricName string
The metric name.
MonitoringTemplateId string
The OCID of the monitoring template.
Namespace string
The stack monitoring service or application emitting the metric that is evaluated by the alarm.
ResourceType string
The resource type OCID.
State string
The current lifecycle state of the monitoring template
Status string
The current status of the monitoring template i.e. whether it is Published or Unpublished
SystemTags map[string]string
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated string
The date and time the alarm condition was created. Format defined by RFC3339.
TimeUpdated string
The date and time the alarm condition was updated. Format defined by RFC3339.
alarmConditionId String
compositeType String
The OCID of the composite resource type like EBS/PEOPLE_SOFT.
conditionType String
Type of defined monitoring template.
conditions List<GetMonitoringTemplateAlarmConditionCondition>
Monitoring template conditions
definedTags Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
freeformTags Map<String,String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id String
The OCID of the Alarm Condition.
metricName String
The metric name.
monitoringTemplateId String
The OCID of the monitoring template.
namespace String
The stack monitoring service or application emitting the metric that is evaluated by the alarm.
resourceType String
The resource type OCID.
state String
The current lifecycle state of the monitoring template
status String
The current status of the monitoring template i.e. whether it is Published or Unpublished
systemTags Map<String,String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated String
The date and time the alarm condition was created. Format defined by RFC3339.
timeUpdated String
The date and time the alarm condition was updated. Format defined by RFC3339.
alarmConditionId string
compositeType string
The OCID of the composite resource type like EBS/PEOPLE_SOFT.
conditionType string
Type of defined monitoring template.
conditions GetMonitoringTemplateAlarmConditionCondition[]
Monitoring template conditions
definedTags {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
freeformTags {[key: string]: string}
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id string
The OCID of the Alarm Condition.
metricName string
The metric name.
monitoringTemplateId string
The OCID of the monitoring template.
namespace string
The stack monitoring service or application emitting the metric that is evaluated by the alarm.
resourceType string
The resource type OCID.
state string
The current lifecycle state of the monitoring template
status string
The current status of the monitoring template i.e. whether it is Published or Unpublished
systemTags {[key: string]: string}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated string
The date and time the alarm condition was created. Format defined by RFC3339.
timeUpdated string
The date and time the alarm condition was updated. Format defined by RFC3339.
alarm_condition_id str
composite_type str
The OCID of the composite resource type like EBS/PEOPLE_SOFT.
condition_type str
Type of defined monitoring template.
conditions Sequence[stackmonitoring.GetMonitoringTemplateAlarmConditionCondition]
Monitoring template conditions
defined_tags Mapping[str, str]
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
freeform_tags Mapping[str, str]
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id str
The OCID of the Alarm Condition.
metric_name str
The metric name.
monitoring_template_id str
The OCID of the monitoring template.
namespace str
The stack monitoring service or application emitting the metric that is evaluated by the alarm.
resource_type str
The resource type OCID.
state str
The current lifecycle state of the monitoring template
status str
The current status of the monitoring template i.e. whether it is Published or Unpublished
system_tags Mapping[str, str]
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
time_created str
The date and time the alarm condition was created. Format defined by RFC3339.
time_updated str
The date and time the alarm condition was updated. Format defined by RFC3339.
alarmConditionId String
compositeType String
The OCID of the composite resource type like EBS/PEOPLE_SOFT.
conditionType String
Type of defined monitoring template.
conditions List<Property Map>
Monitoring template conditions
definedTags Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
freeformTags Map<String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id String
The OCID of the Alarm Condition.
metricName String
The metric name.
monitoringTemplateId String
The OCID of the monitoring template.
namespace String
The stack monitoring service or application emitting the metric that is evaluated by the alarm.
resourceType String
The resource type OCID.
state String
The current lifecycle state of the monitoring template
status String
The current status of the monitoring template i.e. whether it is Published or Unpublished
systemTags Map<String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated String
The date and time the alarm condition was created. Format defined by RFC3339.
timeUpdated String
The date and time the alarm condition was updated. Format defined by RFC3339.

Supporting Types

GetMonitoringTemplateAlarmConditionCondition

Body This property is required. string
The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information.
Query This property is required. string
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
Severity This property is required. string
Severity - Critical/Warning
ShouldAppendNote This property is required. bool
Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
ShouldAppendUrl This property is required. bool
Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
TriggerDelay This property is required. string
The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
Body This property is required. string
The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information.
Query This property is required. string
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
Severity This property is required. string
Severity - Critical/Warning
ShouldAppendNote This property is required. bool
Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
ShouldAppendUrl This property is required. bool
Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
TriggerDelay This property is required. string
The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
body This property is required. String
The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information.
query This property is required. String
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
severity This property is required. String
Severity - Critical/Warning
shouldAppendNote This property is required. Boolean
Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
shouldAppendUrl This property is required. Boolean
Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
triggerDelay This property is required. String
The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
body This property is required. string
The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information.
query This property is required. string
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
severity This property is required. string
Severity - Critical/Warning
shouldAppendNote This property is required. boolean
Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
shouldAppendUrl This property is required. boolean
Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
triggerDelay This property is required. string
The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
body This property is required. str
The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information.
query This property is required. str
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
severity This property is required. str
Severity - Critical/Warning
should_append_note This property is required. bool
Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
should_append_url This property is required. bool
Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
trigger_delay This property is required. str
The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
body This property is required. String
The human-readable content of the delivered alarm notification. Oracle recommends providing guidance to operators for resolving the alarm condition. Consider adding links to standard runbook practices. Avoid entering confidential information.
query This property is required. String
The Monitoring Query Language (MQL) expression to evaluate for the alarm.
severity This property is required. String
Severity - Critical/Warning
shouldAppendNote This property is required. Boolean
Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
shouldAppendUrl This property is required. Boolean
Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
triggerDelay This property is required. String
The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.