1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. StackMonitoring
  5. getMonitoringTemplate
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

oci.StackMonitoring.getMonitoringTemplate

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi

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

Gets a Monitoring Template by identifier

Example Usage

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

const testMonitoringTemplate = oci.StackMonitoring.getMonitoringTemplate({
    monitoringTemplateId: testMonitoringTemplateOciStackMonitoringMonitoringTemplate.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_monitoring_template = oci.StackMonitoring.get_monitoring_template(monitoring_template_id=test_monitoring_template_oci_stack_monitoring_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.GetMonitoringTemplate(ctx, &stackmonitoring.GetMonitoringTemplateArgs{
			MonitoringTemplateId: testMonitoringTemplateOciStackMonitoringMonitoringTemplate.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 testMonitoringTemplate = Oci.StackMonitoring.GetMonitoringTemplate.Invoke(new()
    {
        MonitoringTemplateId = testMonitoringTemplateOciStackMonitoringMonitoringTemplate.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.GetMonitoringTemplateArgs;
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 testMonitoringTemplate = StackMonitoringFunctions.getMonitoringTemplate(GetMonitoringTemplateArgs.builder()
            .monitoringTemplateId(testMonitoringTemplateOciStackMonitoringMonitoringTemplate.id())
            .build());

    }
}
Copy
variables:
  testMonitoringTemplate:
    fn::invoke:
      function: oci:StackMonitoring:getMonitoringTemplate
      arguments:
        monitoringTemplateId: ${testMonitoringTemplateOciStackMonitoringMonitoringTemplate.id}
Copy

Using getMonitoringTemplate

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 getMonitoringTemplate(args: GetMonitoringTemplateArgs, opts?: InvokeOptions): Promise<GetMonitoringTemplateResult>
function getMonitoringTemplateOutput(args: GetMonitoringTemplateOutputArgs, opts?: InvokeOptions): Output<GetMonitoringTemplateResult>
Copy
def get_monitoring_template(monitoring_template_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetMonitoringTemplateResult
def get_monitoring_template_output(monitoring_template_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetMonitoringTemplateResult]
Copy
func GetMonitoringTemplate(ctx *Context, args *GetMonitoringTemplateArgs, opts ...InvokeOption) (*GetMonitoringTemplateResult, error)
func GetMonitoringTemplateOutput(ctx *Context, args *GetMonitoringTemplateOutputArgs, opts ...InvokeOption) GetMonitoringTemplateResultOutput
Copy

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

public static class GetMonitoringTemplate 
{
    public static Task<GetMonitoringTemplateResult> InvokeAsync(GetMonitoringTemplateArgs args, InvokeOptions? opts = null)
    public static Output<GetMonitoringTemplateResult> Invoke(GetMonitoringTemplateInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMonitoringTemplateResult> getMonitoringTemplate(GetMonitoringTemplateArgs args, InvokeOptions options)
public static Output<GetMonitoringTemplateResult> getMonitoringTemplate(GetMonitoringTemplateArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:StackMonitoring/getMonitoringTemplate:getMonitoringTemplate
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

MonitoringTemplateId This property is required. string
The OCID of the monitoring template.
MonitoringTemplateId This property is required. string
The OCID of the monitoring template.
monitoringTemplateId This property is required. String
The OCID of the monitoring template.
monitoringTemplateId This property is required. string
The OCID of the monitoring template.
monitoring_template_id This property is required. str
The OCID of the monitoring template.
monitoringTemplateId This property is required. String
The OCID of the monitoring template.

getMonitoringTemplate Result

The following output properties are available:

CompartmentId string
The OCID of the compartment containing the monitoringTemplate.
DefinedTags Dictionary<string, string>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description string
A user-friendly description for the monitoring template. It does not have to be unique, and it's changeable. Avoid entering confidential information.
Destinations List<string>
A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource.
DisplayName string
A user-friendly name for the monitoring template. It should be unique, and it's mutable in nature. Avoid entering confidential information.
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 resourceInstance/resourceType/resourceGroup
IsAlarmsEnabled bool
Whether the alarm is enabled or disabled. Default value is enabled.
IsSplitNotificationEnabled bool
Whether the alarm notification is enabled or disabled, it will be Enabled by default.
Members List<GetMonitoringTemplateMember>
List of members of this monitoring template.
MessageFormat string
The format to use for alarm notifications.
MonitoringTemplateId string
RepeatNotificationDuration string
The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum- PT1M. Maximum - P30D.
State string
The current lifecycle state of the monitoring template.
Status string
The current status of the monitoring template i.e. whether it is Applied or NotApplied.
SystemTags Dictionary<string, string>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TenantId string
Tenant Identifier OCID
TimeCreated string
The date and time the monitoringTemplate was created. Format defined by RFC3339.
TimeUpdated string
The date and time the monitoringTemplate was last updated. Format defined by RFC3339.
TotalAlarmConditions double
Total Alarm Conditions
TotalAppliedAlarmConditions double
Total Applied Alarm Conditions
CompartmentId string
The OCID of the compartment containing the monitoringTemplate.
DefinedTags map[string]string
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description string
A user-friendly description for the monitoring template. It does not have to be unique, and it's changeable. Avoid entering confidential information.
Destinations []string
A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource.
DisplayName string
A user-friendly name for the monitoring template. It should be unique, and it's mutable in nature. Avoid entering confidential information.
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 resourceInstance/resourceType/resourceGroup
IsAlarmsEnabled bool
Whether the alarm is enabled or disabled. Default value is enabled.
IsSplitNotificationEnabled bool
Whether the alarm notification is enabled or disabled, it will be Enabled by default.
Members []GetMonitoringTemplateMember
List of members of this monitoring template.
MessageFormat string
The format to use for alarm notifications.
MonitoringTemplateId string
RepeatNotificationDuration string
The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum- PT1M. Maximum - P30D.
State string
The current lifecycle state of the monitoring template.
Status string
The current status of the monitoring template i.e. whether it is Applied or NotApplied.
SystemTags map[string]string
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
TenantId string
Tenant Identifier OCID
TimeCreated string
The date and time the monitoringTemplate was created. Format defined by RFC3339.
TimeUpdated string
The date and time the monitoringTemplate was last updated. Format defined by RFC3339.
TotalAlarmConditions float64
Total Alarm Conditions
TotalAppliedAlarmConditions float64
Total Applied Alarm Conditions
compartmentId String
The OCID of the compartment containing the monitoringTemplate.
definedTags Map<String,String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description String
A user-friendly description for the monitoring template. It does not have to be unique, and it's changeable. Avoid entering confidential information.
destinations List<String>
A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource.
displayName String
A user-friendly name for the monitoring template. It should be unique, and it's mutable in nature. Avoid entering confidential information.
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 resourceInstance/resourceType/resourceGroup
isAlarmsEnabled Boolean
Whether the alarm is enabled or disabled. Default value is enabled.
isSplitNotificationEnabled Boolean
Whether the alarm notification is enabled or disabled, it will be Enabled by default.
members List<GetMonitoringTemplateMember>
List of members of this monitoring template.
messageFormat String
The format to use for alarm notifications.
monitoringTemplateId String
repeatNotificationDuration String
The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum- PT1M. Maximum - P30D.
state String
The current lifecycle state of the monitoring template.
status String
The current status of the monitoring template i.e. whether it is Applied or NotApplied.
systemTags Map<String,String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
tenantId String
Tenant Identifier OCID
timeCreated String
The date and time the monitoringTemplate was created. Format defined by RFC3339.
timeUpdated String
The date and time the monitoringTemplate was last updated. Format defined by RFC3339.
totalAlarmConditions Double
Total Alarm Conditions
totalAppliedAlarmConditions Double
Total Applied Alarm Conditions
compartmentId string
The OCID of the compartment containing the monitoringTemplate.
definedTags {[key: string]: string}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description string
A user-friendly description for the monitoring template. It does not have to be unique, and it's changeable. Avoid entering confidential information.
destinations string[]
A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource.
displayName string
A user-friendly name for the monitoring template. It should be unique, and it's mutable in nature. Avoid entering confidential information.
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 resourceInstance/resourceType/resourceGroup
isAlarmsEnabled boolean
Whether the alarm is enabled or disabled. Default value is enabled.
isSplitNotificationEnabled boolean
Whether the alarm notification is enabled or disabled, it will be Enabled by default.
members GetMonitoringTemplateMember[]
List of members of this monitoring template.
messageFormat string
The format to use for alarm notifications.
monitoringTemplateId string
repeatNotificationDuration string
The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum- PT1M. Maximum - P30D.
state string
The current lifecycle state of the monitoring template.
status string
The current status of the monitoring template i.e. whether it is Applied or NotApplied.
systemTags {[key: string]: string}
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
tenantId string
Tenant Identifier OCID
timeCreated string
The date and time the monitoringTemplate was created. Format defined by RFC3339.
timeUpdated string
The date and time the monitoringTemplate was last updated. Format defined by RFC3339.
totalAlarmConditions number
Total Alarm Conditions
totalAppliedAlarmConditions number
Total Applied Alarm Conditions
compartment_id str
The OCID of the compartment containing the monitoringTemplate.
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"}
description str
A user-friendly description for the monitoring template. It does not have to be unique, and it's changeable. Avoid entering confidential information.
destinations Sequence[str]
A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource.
display_name str
A user-friendly name for the monitoring template. It should be unique, and it's mutable in nature. Avoid entering confidential information.
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 resourceInstance/resourceType/resourceGroup
is_alarms_enabled bool
Whether the alarm is enabled or disabled. Default value is enabled.
is_split_notification_enabled bool
Whether the alarm notification is enabled or disabled, it will be Enabled by default.
members Sequence[stackmonitoring.GetMonitoringTemplateMember]
List of members of this monitoring template.
message_format str
The format to use for alarm notifications.
monitoring_template_id str
repeat_notification_duration str
The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum- PT1M. Maximum - P30D.
state str
The current lifecycle state of the monitoring template.
status str
The current status of the monitoring template i.e. whether it is Applied or NotApplied.
system_tags Mapping[str, str]
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
tenant_id str
Tenant Identifier OCID
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 last updated. Format defined by RFC3339.
total_alarm_conditions float
Total Alarm Conditions
total_applied_alarm_conditions float
Total Applied Alarm Conditions
compartmentId String
The OCID of the compartment containing the monitoringTemplate.
definedTags Map<String>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description String
A user-friendly description for the monitoring template. It does not have to be unique, and it's changeable. Avoid entering confidential information.
destinations List<String>
A list of destinations for alarm notifications. Each destination is represented by the OCID of a related resource.
displayName String
A user-friendly name for the monitoring template. It should be unique, and it's mutable in nature. Avoid entering confidential information.
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 resourceInstance/resourceType/resourceGroup
isAlarmsEnabled Boolean
Whether the alarm is enabled or disabled. Default value is enabled.
isSplitNotificationEnabled Boolean
Whether the alarm notification is enabled or disabled, it will be Enabled by default.
members List<Property Map>
List of members of this monitoring template.
messageFormat String
The format to use for alarm notifications.
monitoringTemplateId String
repeatNotificationDuration String
The frequency for re-submitting alarm notifications, if the alarm keeps firing without interruption. Format defined by ISO 8601. For example, PT4H indicates four hours. Minimum- PT1M. Maximum - P30D.
state String
The current lifecycle state of the monitoring template.
status String
The current status of the monitoring template i.e. whether it is Applied or NotApplied.
systemTags Map<String>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
tenantId String
Tenant Identifier OCID
timeCreated String
The date and time the monitoringTemplate was created. Format defined by RFC3339.
timeUpdated String
The date and time the monitoringTemplate was last updated. Format defined by RFC3339.
totalAlarmConditions Number
Total Alarm Conditions
totalAppliedAlarmConditions Number
Total Applied Alarm Conditions

Supporting Types

GetMonitoringTemplateMember

CompositeType This property is required. string
The OCID of the composite resource type like EBS or Peoplesoft.
Id This property is required. string
The OCID of the resourceInstance/resourceType/resourceGroup
Type This property is required. string
Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
CompositeType This property is required. string
The OCID of the composite resource type like EBS or Peoplesoft.
Id This property is required. string
The OCID of the resourceInstance/resourceType/resourceGroup
Type This property is required. string
Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
compositeType This property is required. String
The OCID of the composite resource type like EBS or Peoplesoft.
id This property is required. String
The OCID of the resourceInstance/resourceType/resourceGroup
type This property is required. String
Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
compositeType This property is required. string
The OCID of the composite resource type like EBS or Peoplesoft.
id This property is required. string
The OCID of the resourceInstance/resourceType/resourceGroup
type This property is required. string
Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
composite_type This property is required. str
The OCID of the composite resource type like EBS or Peoplesoft.
id This property is required. str
The OCID of the resourceInstance/resourceType/resourceGroup
type This property is required. str
Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
compositeType This property is required. String
The OCID of the composite resource type like EBS or Peoplesoft.
id This property is required. String
The OCID of the resourceInstance/resourceType/resourceGroup
type This property is required. String
Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.32.0 published on Thursday, Apr 24, 2025 by Pulumi