Datadog

Pulumi Official
Package maintained by Pulumi
v4.10.0 published on Monday, Jul 25, 2022 by Pulumi

getMonitor

Use this data source to retrieve information about an existing monitor for use in other resources.

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Datadog.GetMonitor.InvokeAsync(new Datadog.GetMonitorArgs
        {
            MonitorTagsFilters = 
            {
                "foo:bar",
            },
            NameFilter = "My awesome monitor",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datadog.LookupMonitor(ctx, &GetMonitorArgs{
			MonitorTagsFilters: []string{
				"foo:bar",
			},
			NameFilter: pulumi.StringRef("My awesome monitor"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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

    public static void stack(Context ctx) {
        final var test = Output.of(DatadogFunctions.getMonitor(GetMonitorArgs.builder()
            .monitorTagsFilters("foo:bar")
            .nameFilter("My awesome monitor")
            .build()));

    }
}
import pulumi
import pulumi_datadog as datadog

test = datadog.get_monitor(monitor_tags_filters=["foo:bar"],
    name_filter="My awesome monitor")
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const test = pulumi.output(datadog.getMonitor({
    monitorTagsFilters: ["foo:bar"],
    nameFilter: "My awesome monitor",
}));
variables:
  test:
    Fn::Invoke:
      Function: datadog:getMonitor
      Arguments:
        monitorTagsFilters:
          - foo:bar
        nameFilter: My awesome monitor

Using getMonitor

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 getMonitor(args: GetMonitorArgs, opts?: InvokeOptions): Promise<GetMonitorResult>
function getMonitorOutput(args: GetMonitorOutputArgs, opts?: InvokeOptions): Output<GetMonitorResult>
def get_monitor(monitor_tags_filters: Optional[Sequence[str]] = None,
                name_filter: Optional[str] = None,
                tags_filters: Optional[Sequence[str]] = None,
                opts: Optional[InvokeOptions] = None) -> GetMonitorResult
def get_monitor_output(monitor_tags_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                name_filter: Optional[pulumi.Input[str]] = None,
                tags_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetMonitorResult]
func LookupMonitor(ctx *Context, args *LookupMonitorArgs, opts ...InvokeOption) (*LookupMonitorResult, error)
func LookupMonitorOutput(ctx *Context, args *LookupMonitorOutputArgs, opts ...InvokeOption) LookupMonitorResultOutput

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

public static class GetMonitor 
{
    public static Task<GetMonitorResult> InvokeAsync(GetMonitorArgs args, InvokeOptions? opts = null)
    public static Output<GetMonitorResult> Invoke(GetMonitorInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMonitorResult> getMonitor(GetMonitorArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: datadog:index/getMonitor:getMonitor
  Arguments:
    # Arguments dictionary

The following arguments are supported:

MonitorTagsFilters List<string>
NameFilter string
TagsFilters List<string>
monitorTagsFilters List<String>
nameFilter String
tagsFilters List<String>
monitor_tags_filters Sequence[str]
name_filter str
tags_filters Sequence[str]
monitorTagsFilters List<String>
nameFilter String
tagsFilters List<String>

getMonitor Result

The following output properties are available:

enableLogsSample Boolean
escalationMessage String
evaluationDelay Integer
groupbySimpleMonitor Boolean
id String

The provider-assigned unique ID for this managed resource.

includeTags Boolean
locked Boolean
message String
monitorThresholdWindows List<GetMonitorMonitorThresholdWindow>
monitorThresholds List<GetMonitorMonitorThreshold>
name String
newGroupDelay Integer
newHostDelay Integer
noDataTimeframe Integer
notifyAudit Boolean
notifyNoData Boolean
query String
renotifyInterval Integer
renotifyOccurrences Integer
renotifyStatuses List<String>
requireFullWindow Boolean
restrictedRoles List<String>
tags List<String>
timeoutH Integer
type String
monitorTagsFilters List<String>
nameFilter String
tagsFilters List<String>
enableLogsSample Boolean
escalationMessage String
evaluationDelay Number
groupbySimpleMonitor Boolean
id String

The provider-assigned unique ID for this managed resource.

includeTags Boolean
locked Boolean
message String
monitorThresholdWindows List<Property Map>
monitorThresholds List<Property Map>
name String
newGroupDelay Number
newHostDelay Number
noDataTimeframe Number
notifyAudit Boolean
notifyNoData Boolean
query String
renotifyInterval Number
renotifyOccurrences Number
renotifyStatuses List<String>
requireFullWindow Boolean
restrictedRoles List<String>
tags List<String>
timeoutH Number
type String
monitorTagsFilters List<String>
nameFilter String
tagsFilters List<String>

Supporting Types

GetMonitorMonitorThreshold

Critical string
CriticalRecovery string
Ok string
Unknown string
Warning string
WarningRecovery string
Critical string
CriticalRecovery string
Ok string
Unknown string
Warning string
WarningRecovery string
critical String
criticalRecovery String
ok String
unknown String
warning String
warningRecovery String
critical string
criticalRecovery string
ok string
unknown string
warning string
warningRecovery string
critical String
criticalRecovery String
ok String
unknown String
warning String
warningRecovery String

GetMonitorMonitorThresholdWindow

Package Details

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

This Pulumi package is based on the datadog Terraform Provider.