Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.StackMonitoring.getMonitoringTemplate
Explore with Pulumi AI
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,
});
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"])
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
	})
}
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,
    });
});
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());
    }
}
variables:
  testMonitoringTemplate:
    fn::invoke:
      function: oci:StackMonitoring:getMonitoringTemplate
      arguments:
        monitoringTemplateId: ${testMonitoringTemplateOciStackMonitoringMonitoringTemplate.id}
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>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]func LookupMonitoringTemplate(ctx *Context, args *LookupMonitoringTemplateArgs, opts ...InvokeOption) (*LookupMonitoringTemplateResult, error)
func LookupMonitoringTemplateOutput(ctx *Context, args *LookupMonitoringTemplateOutputArgs, opts ...InvokeOption) LookupMonitoringTemplateResultOutput> Note: This function is named LookupMonitoringTemplate 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)
}public static CompletableFuture<GetMonitoringTemplateResult> getMonitoringTemplate(GetMonitoringTemplateArgs args, InvokeOptions options)
public static Output<GetMonitoringTemplateResult> getMonitoringTemplate(GetMonitoringTemplateArgs args, InvokeOptions options)
fn::invoke:
  function: oci:StackMonitoring/getMonitoringTemplate:getMonitoringTemplate
  arguments:
    # arguments dictionaryThe following arguments are supported:
- MonitoringTemplate stringId 
- The OCID of the monitoring template.
- MonitoringTemplate stringId 
- The OCID of the monitoring template.
- monitoringTemplate StringId 
- The OCID of the monitoring template.
- monitoringTemplate stringId 
- The OCID of the monitoring template.
- monitoring_template_ strid 
- The OCID of the monitoring template.
- monitoringTemplate StringId 
- The OCID of the monitoring template.
getMonitoringTemplate Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment containing the monitoringTemplate.
- 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.
- 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
- IsAlarms boolEnabled 
- Whether the alarm is enabled or disabled. Default value is enabled.
- IsSplit boolNotification Enabled 
- Whether the alarm notification is enabled or disabled, it will be Enabled by default.
- Members
List<GetMonitoring Template Member> 
- List of members of this monitoring template.
- MessageFormat string
- The format to use for alarm notifications.
- MonitoringTemplate stringId 
- RepeatNotification stringDuration 
- 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.
- 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.
- TotalAlarm doubleConditions 
- Total Alarm Conditions
- TotalApplied doubleAlarm Conditions 
- Total Applied Alarm Conditions
- CompartmentId string
- The OCID of the compartment containing the monitoringTemplate.
- 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.
- 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
- IsAlarms boolEnabled 
- Whether the alarm is enabled or disabled. Default value is enabled.
- IsSplit boolNotification Enabled 
- Whether the alarm notification is enabled or disabled, it will be Enabled by default.
- Members
[]GetMonitoring Template Member 
- List of members of this monitoring template.
- MessageFormat string
- The format to use for alarm notifications.
- MonitoringTemplate stringId 
- RepeatNotification stringDuration 
- 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.
- 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.
- TotalAlarm float64Conditions 
- Total Alarm Conditions
- TotalApplied float64Alarm Conditions 
- Total Applied Alarm Conditions
- compartmentId String
- The OCID of the compartment containing the monitoringTemplate.
- 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.
- 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
- isAlarms BooleanEnabled 
- Whether the alarm is enabled or disabled. Default value is enabled.
- isSplit BooleanNotification Enabled 
- Whether the alarm notification is enabled or disabled, it will be Enabled by default.
- members
List<GetMonitoring Template Member> 
- List of members of this monitoring template.
- messageFormat String
- The format to use for alarm notifications.
- monitoringTemplate StringId 
- repeatNotification StringDuration 
- 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.
- 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.
- totalAlarm DoubleConditions 
- Total Alarm Conditions
- totalApplied DoubleAlarm Conditions 
- Total Applied Alarm Conditions
- compartmentId string
- The OCID of the compartment containing the monitoringTemplate.
- {[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.
- {[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
- isAlarms booleanEnabled 
- Whether the alarm is enabled or disabled. Default value is enabled.
- isSplit booleanNotification Enabled 
- Whether the alarm notification is enabled or disabled, it will be Enabled by default.
- members
GetMonitoring Template Member[] 
- List of members of this monitoring template.
- messageFormat string
- The format to use for alarm notifications.
- monitoringTemplate stringId 
- repeatNotification stringDuration 
- 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.
- {[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.
- totalAlarm numberConditions 
- Total Alarm Conditions
- totalApplied numberAlarm Conditions 
- Total Applied Alarm Conditions
- compartment_id str
- The OCID of the compartment containing the monitoringTemplate.
- 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.
- 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_ boolenabled 
- Whether the alarm is enabled or disabled. Default value is enabled.
- is_split_ boolnotification_ enabled 
- Whether the alarm notification is enabled or disabled, it will be Enabled by default.
- members
Sequence[GetMonitoring Template Member] 
- List of members of this monitoring template.
- message_format str
- The format to use for alarm notifications.
- monitoring_template_ strid 
- repeat_notification_ strduration 
- 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.
- 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_ floatconditions 
- Total Alarm Conditions
- total_applied_ floatalarm_ conditions 
- Total Applied Alarm Conditions
- compartmentId String
- The OCID of the compartment containing the monitoringTemplate.
- 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.
- 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
- isAlarms BooleanEnabled 
- Whether the alarm is enabled or disabled. Default value is enabled.
- isSplit BooleanNotification Enabled 
- 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.
- monitoringTemplate StringId 
- repeatNotification StringDuration 
- 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.
- 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.
- totalAlarm NumberConditions 
- Total Alarm Conditions
- totalApplied NumberAlarm Conditions 
- Total Applied Alarm Conditions
Supporting Types
GetMonitoringTemplateMember   
- CompositeType string
- The OCID of the composite resource type like EBS or Peoplesoft.
- Id string
- The OCID of the resourceInstance/resourceType/resourceGroup
- Type string
- Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
- CompositeType string
- The OCID of the composite resource type like EBS or Peoplesoft.
- Id string
- The OCID of the resourceInstance/resourceType/resourceGroup
- Type string
- Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
- compositeType String
- The OCID of the composite resource type like EBS or Peoplesoft.
- id String
- The OCID of the resourceInstance/resourceType/resourceGroup
- type String
- Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
- compositeType string
- The OCID of the composite resource type like EBS or Peoplesoft.
- id string
- The OCID of the resourceInstance/resourceType/resourceGroup
- type string
- Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
- composite_type str
- The OCID of the composite resource type like EBS or Peoplesoft.
- id str
- The OCID of the resourceInstance/resourceType/resourceGroup
- type str
- Type of the member reference RESOURCE_INSTANCE, RESOURCE_TYPE, RESOURCE_GROUP
- compositeType String
- The OCID of the composite resource type like EBS or Peoplesoft.
- id String
- The OCID of the resourceInstance/resourceType/resourceGroup
- type 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 ociTerraform Provider.