Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.StackMonitoring.getDefinedMonitoringTemplates
Explore with Pulumi AI
This data source provides the list of Defined Monitoring Templates in Oracle Cloud Infrastructure Stack Monitoring service.
List Defined Monitoring Templates.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDefinedMonitoringTemplates = oci.StackMonitoring.getDefinedMonitoringTemplates({
    compartmentId: compartmentId,
    displayName: definedMonitoringTemplateDisplayName,
    resourceTypes: definedMonitoringTemplateResourceTypes,
});
import pulumi
import pulumi_oci as oci
test_defined_monitoring_templates = oci.StackMonitoring.get_defined_monitoring_templates(compartment_id=compartment_id,
    display_name=defined_monitoring_template_display_name,
    resource_types=defined_monitoring_template_resource_types)
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.GetDefinedMonitoringTemplates(ctx, &stackmonitoring.GetDefinedMonitoringTemplatesArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(definedMonitoringTemplateDisplayName),
			ResourceTypes: definedMonitoringTemplateResourceTypes,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testDefinedMonitoringTemplates = Oci.StackMonitoring.GetDefinedMonitoringTemplates.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = definedMonitoringTemplateDisplayName,
        ResourceTypes = definedMonitoringTemplateResourceTypes,
    });
});
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.GetDefinedMonitoringTemplatesArgs;
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 testDefinedMonitoringTemplates = StackMonitoringFunctions.getDefinedMonitoringTemplates(GetDefinedMonitoringTemplatesArgs.builder()
            .compartmentId(compartmentId)
            .displayName(definedMonitoringTemplateDisplayName)
            .resourceTypes(definedMonitoringTemplateResourceTypes)
            .build());
    }
}
variables:
  testDefinedMonitoringTemplates:
    fn::invoke:
      function: oci:StackMonitoring:getDefinedMonitoringTemplates
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${definedMonitoringTemplateDisplayName}
        resourceTypes: ${definedMonitoringTemplateResourceTypes}
Using getDefinedMonitoringTemplates
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 getDefinedMonitoringTemplates(args: GetDefinedMonitoringTemplatesArgs, opts?: InvokeOptions): Promise<GetDefinedMonitoringTemplatesResult>
function getDefinedMonitoringTemplatesOutput(args: GetDefinedMonitoringTemplatesOutputArgs, opts?: InvokeOptions): Output<GetDefinedMonitoringTemplatesResult>def get_defined_monitoring_templates(compartment_id: Optional[str] = None,
                                     display_name: Optional[str] = None,
                                     filters: Optional[Sequence[GetDefinedMonitoringTemplatesFilter]] = None,
                                     resource_types: Optional[Sequence[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetDefinedMonitoringTemplatesResult
def get_defined_monitoring_templates_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                     display_name: Optional[pulumi.Input[str]] = None,
                                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDefinedMonitoringTemplatesFilterArgs]]]] = None,
                                     resource_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetDefinedMonitoringTemplatesResult]func GetDefinedMonitoringTemplates(ctx *Context, args *GetDefinedMonitoringTemplatesArgs, opts ...InvokeOption) (*GetDefinedMonitoringTemplatesResult, error)
func GetDefinedMonitoringTemplatesOutput(ctx *Context, args *GetDefinedMonitoringTemplatesOutputArgs, opts ...InvokeOption) GetDefinedMonitoringTemplatesResultOutput> Note: This function is named GetDefinedMonitoringTemplates in the Go SDK.
public static class GetDefinedMonitoringTemplates 
{
    public static Task<GetDefinedMonitoringTemplatesResult> InvokeAsync(GetDefinedMonitoringTemplatesArgs args, InvokeOptions? opts = null)
    public static Output<GetDefinedMonitoringTemplatesResult> Invoke(GetDefinedMonitoringTemplatesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDefinedMonitoringTemplatesResult> getDefinedMonitoringTemplates(GetDefinedMonitoringTemplatesArgs args, InvokeOptions options)
public static Output<GetDefinedMonitoringTemplatesResult> getDefinedMonitoringTemplates(GetDefinedMonitoringTemplatesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:StackMonitoring/getDefinedMonitoringTemplates:getDefinedMonitoringTemplates
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the tenancy(root) for which defined monitored templates should be listed.
- DisplayName string
- A filter to return monitoring template based on name.
- Filters
List<GetDefined Monitoring Templates Filter> 
- ResourceTypes List<string>
- Multiple resource types filter.
- CompartmentId string
- The OCID of the tenancy(root) for which defined monitored templates should be listed.
- DisplayName string
- A filter to return monitoring template based on name.
- Filters
[]GetDefined Monitoring Templates Filter 
- ResourceTypes []string
- Multiple resource types filter.
- compartmentId String
- The OCID of the tenancy(root) for which defined monitored templates should be listed.
- displayName String
- A filter to return monitoring template based on name.
- filters
List<GetDefined Monitoring Templates Filter> 
- resourceTypes List<String>
- Multiple resource types filter.
- compartmentId string
- The OCID of the tenancy(root) for which defined monitored templates should be listed.
- displayName string
- A filter to return monitoring template based on name.
- filters
GetDefined Monitoring Templates Filter[] 
- resourceTypes string[]
- Multiple resource types filter.
- compartment_id str
- The OCID of the tenancy(root) for which defined monitored templates should be listed.
- display_name str
- A filter to return monitoring template based on name.
- filters
Sequence[GetDefined Monitoring Templates Filter] 
- resource_types Sequence[str]
- Multiple resource types filter.
- compartmentId String
- The OCID of the tenancy(root) for which defined monitored templates should be listed.
- displayName String
- A filter to return monitoring template based on name.
- filters List<Property Map>
- resourceTypes List<String>
- Multiple resource types filter.
getDefinedMonitoringTemplates Result
The following output properties are available:
- CompartmentId string
- DefinedMonitoring List<GetTemplate Collections Defined Monitoring Templates Defined Monitoring Template Collection> 
- The list of defined_monitoring_template_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- DisplayName string
- The name of the definedMonitoringTemplate.
- Filters
List<GetDefined Monitoring Templates Filter> 
- ResourceTypes List<string>
- CompartmentId string
- DefinedMonitoring []GetTemplate Collections Defined Monitoring Templates Defined Monitoring Template Collection 
- The list of defined_monitoring_template_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- DisplayName string
- The name of the definedMonitoringTemplate.
- Filters
[]GetDefined Monitoring Templates Filter 
- ResourceTypes []string
- compartmentId String
- definedMonitoring List<GetTemplate Collections Defined Monitoring Templates Defined Monitoring Template Collection> 
- The list of defined_monitoring_template_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- displayName String
- The name of the definedMonitoringTemplate.
- filters
List<GetDefined Monitoring Templates Filter> 
- resourceTypes List<String>
- compartmentId string
- definedMonitoring GetTemplate Collections Defined Monitoring Templates Defined Monitoring Template Collection[] 
- The list of defined_monitoring_template_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- displayName string
- The name of the definedMonitoringTemplate.
- filters
GetDefined Monitoring Templates Filter[] 
- resourceTypes string[]
- compartment_id str
- defined_monitoring_ Sequence[Gettemplate_ collections Defined Monitoring Templates Defined Monitoring Template Collection] 
- The list of defined_monitoring_template_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- display_name str
- The name of the definedMonitoringTemplate.
- filters
Sequence[GetDefined Monitoring Templates Filter] 
- resource_types Sequence[str]
- compartmentId String
- definedMonitoring List<Property Map>Template Collections 
- The list of defined_monitoring_template_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- displayName String
- The name of the definedMonitoringTemplate.
- filters List<Property Map>
- resourceTypes List<String>
Supporting Types
GetDefinedMonitoringTemplatesDefinedMonitoringTemplateCollection       
- Items
List<GetDefined Monitoring Templates Defined Monitoring Template Collection Item> 
- List of defined Monitoring Template.
- Items
[]GetDefined Monitoring Templates Defined Monitoring Template Collection Item 
- List of defined Monitoring Template.
- items
List<GetDefined Monitoring Templates Defined Monitoring Template Collection Item> 
- List of defined Monitoring Template.
- items
GetDefined Monitoring Templates Defined Monitoring Template Collection Item[] 
- List of defined Monitoring Template.
- items
Sequence[GetDefined Monitoring Templates Defined Monitoring Template Collection Item] 
- List of defined Monitoring Template.
- items List<Property Map>
- List of defined Monitoring Template.
GetDefinedMonitoringTemplatesDefinedMonitoringTemplateCollectionItem        
- CompositeType string
- Type of composite resource type OCID like EBS/PEOPLE_SOFT.
- DefinedAlarm List<GetConditions Defined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition> 
- Defined Monitoring template alarm conditions
- DisplayName string
- A filter to return monitoring template based on name.
- Id string
- The OCID of the definedMonitoringTemplate.
- Namespace string
- The stack monitoring service or application emitting the metric that is evaluated by the alarm.
- ResourceType string
- The resource types OCID.
- 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 monitoringTemplate was created. Format defined by RFC3339.
- TimeUpdated string
- The date and time the monitoringTemplate was updated. Format defined by RFC3339.
- CompositeType string
- Type of composite resource type OCID like EBS/PEOPLE_SOFT.
- DefinedAlarm []GetConditions Defined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition 
- Defined Monitoring template alarm conditions
- DisplayName string
- A filter to return monitoring template based on name.
- Id string
- The OCID of the definedMonitoringTemplate.
- Namespace string
- The stack monitoring service or application emitting the metric that is evaluated by the alarm.
- ResourceType string
- The resource types OCID.
- 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 monitoringTemplate was created. Format defined by RFC3339.
- TimeUpdated string
- The date and time the monitoringTemplate was updated. Format defined by RFC3339.
- compositeType String
- Type of composite resource type OCID like EBS/PEOPLE_SOFT.
- definedAlarm List<GetConditions Defined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition> 
- Defined Monitoring template alarm conditions
- displayName String
- A filter to return monitoring template based on name.
- id String
- The OCID of the definedMonitoringTemplate.
- namespace String
- The stack monitoring service or application emitting the metric that is evaluated by the alarm.
- resourceType String
- The resource types OCID.
- 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 monitoringTemplate was created. Format defined by RFC3339.
- timeUpdated String
- The date and time the monitoringTemplate was updated. Format defined by RFC3339.
- compositeType string
- Type of composite resource type OCID like EBS/PEOPLE_SOFT.
- definedAlarm GetConditions Defined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition[] 
- Defined Monitoring template alarm conditions
- displayName string
- A filter to return monitoring template based on name.
- id string
- The OCID of the definedMonitoringTemplate.
- namespace string
- The stack monitoring service or application emitting the metric that is evaluated by the alarm.
- resourceType string
- The resource types OCID.
- {[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 monitoringTemplate was created. Format defined by RFC3339.
- timeUpdated string
- The date and time the monitoringTemplate was updated. Format defined by RFC3339.
- composite_type str
- Type of composite resource type OCID like EBS/PEOPLE_SOFT.
- defined_alarm_ Sequence[Getconditions Defined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition] 
- Defined Monitoring template alarm conditions
- display_name str
- A filter to return monitoring template based on name.
- id str
- The OCID of the definedMonitoringTemplate.
- namespace str
- The stack monitoring service or application emitting the metric that is evaluated by the alarm.
- resource_type str
- The resource types OCID.
- 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 monitoringTemplate was created. Format defined by RFC3339.
- time_updated str
- The date and time the monitoringTemplate was updated. Format defined by RFC3339.
- compositeType String
- Type of composite resource type OCID like EBS/PEOPLE_SOFT.
- definedAlarm List<Property Map>Conditions 
- Defined Monitoring template alarm conditions
- displayName String
- A filter to return monitoring template based on name.
- id String
- The OCID of the definedMonitoringTemplate.
- namespace String
- The stack monitoring service or application emitting the metric that is evaluated by the alarm.
- resourceType String
- The resource types OCID.
- 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 monitoringTemplate was created. Format defined by RFC3339.
- timeUpdated String
- The date and time the monitoringTemplate was updated. Format defined by RFC3339.
GetDefinedMonitoringTemplatesDefinedMonitoringTemplateCollectionItemDefinedAlarmCondition           
- ConditionType string
- Type of defined monitoring template.
- Conditions
List<GetDefined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition Condition> 
- Monitoring template conditions.
- MetricName string
- The metric name.
- ConditionType string
- Type of defined monitoring template.
- Conditions
[]GetDefined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition Condition 
- Monitoring template conditions.
- MetricName string
- The metric name.
- conditionType String
- Type of defined monitoring template.
- conditions
List<GetDefined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition Condition> 
- Monitoring template conditions.
- metricName String
- The metric name.
- conditionType string
- Type of defined monitoring template.
- conditions
GetDefined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition Condition[] 
- Monitoring template conditions.
- metricName string
- The metric name.
- condition_type str
- Type of defined monitoring template.
- conditions
Sequence[GetDefined Monitoring Templates Defined Monitoring Template Collection Item Defined Alarm Condition Condition] 
- Monitoring template conditions.
- metric_name str
- The metric name.
- conditionType String
- Type of defined monitoring template.
- conditions List<Property Map>
- Monitoring template conditions.
- metricName String
- The metric name.
GetDefinedMonitoringTemplatesDefinedMonitoringTemplateCollectionItemDefinedAlarmConditionCondition            
- Body 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 string
- The Monitoring Query Language (MQL) expression to evaluate for the alarm.
- Severity string
- Severity - Critical/Warning
- ShouldAppend boolNote 
- Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
- ShouldAppend boolUrl 
- Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
- TriggerDelay string
- The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
- Body 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 string
- The Monitoring Query Language (MQL) expression to evaluate for the alarm.
- Severity string
- Severity - Critical/Warning
- ShouldAppend boolNote 
- Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
- ShouldAppend boolUrl 
- Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
- TriggerDelay string
- The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
- body 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 String
- The Monitoring Query Language (MQL) expression to evaluate for the alarm.
- severity String
- Severity - Critical/Warning
- shouldAppend BooleanNote 
- Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
- shouldAppend BooleanUrl 
- Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
- triggerDelay String
- The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
- body 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 string
- The Monitoring Query Language (MQL) expression to evaluate for the alarm.
- severity string
- Severity - Critical/Warning
- shouldAppend booleanNote 
- Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
- shouldAppend booleanUrl 
- Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
- triggerDelay string
- The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
- body 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 str
- The Monitoring Query Language (MQL) expression to evaluate for the alarm.
- severity str
- Severity - Critical/Warning
- should_append_ boolnote 
- Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
- should_append_ boolurl 
- Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
- trigger_delay str
- The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
- body 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 String
- The Monitoring Query Language (MQL) expression to evaluate for the alarm.
- severity String
- Severity - Critical/Warning
- shouldAppend BooleanNote 
- Whether the note need to add into bottom of the body for mapping the alarms information with template or not.
- shouldAppend BooleanUrl 
- Whether the URL need to add into bottom of the body for mapping the alarms information with template or not.
- triggerDelay String
- The period of time that the condition defined in the alarm must persist before the alarm state changes from "OK" to "FIRING".
GetDefinedMonitoringTemplatesFilter    
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.