Class GetMonitor
Inheritance
System.Object
GetMonitor
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.NewRelic.Synthetics
Assembly: Pulumi.NewRelic.dll
Syntax
public static class GetMonitor
Methods
View SourceInvokeAsync(GetMonitorArgs, InvokeOptions)
Use this data source to get information about a specific synthetics monitor in New Relic that already exists. This can be used to set up a Synthetics alert condition.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var bar = Output.Create(NewRelic.Synthetics.GetMonitor.InvokeAsync(new NewRelic.Synthetics.GetMonitorArgs
{
Name = "bar",
}));
var baz = new NewRelic.Synthetics.AlertCondition("baz", new NewRelic.Synthetics.AlertConditionArgs
{
PolicyId = newrelic_alert_policy.Foo.Id,
MonitorId = bar.Apply(bar => bar.Id),
RunbookUrl = "https://www.example.com",
});
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetMonitorResult> InvokeAsync(GetMonitorArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetMonitorArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetMonitorResult> |