Class AlertCondition
Use this resource to create and manage synthetics alert conditions in New Relic.
Example Usage
using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var fooMonitor = Output.Create(NewRelic.Synthetics.GetMonitor.InvokeAsync(new NewRelic.Synthetics.GetMonitorArgs
{
Name = "foo",
}));
var fooAlertCondition = new NewRelic.Synthetics.AlertCondition("fooAlertCondition", new NewRelic.Synthetics.AlertConditionArgs
{
PolicyId = newrelic_alert_policy.Foo.Id,
MonitorId = fooMonitor.Apply(fooMonitor => fooMonitor.Id),
RunbookUrl = "https://www.example.com",
});
}
}
Inherited Members
Namespace: Pulumi.NewRelic.Synthetics
Assembly: Pulumi.NewRelic.dll
Syntax
public class AlertCondition : CustomResource
Constructors
View SourceAlertCondition(String, AlertConditionArgs, CustomResourceOptions)
Create a AlertCondition resource with the given unique name, arguments, and options.
Declaration
public AlertCondition(string name, AlertConditionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AlertConditionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEnabled
Set whether to enable the alert condition. Defaults to true.
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
MonitorId
The ID of the Synthetics monitor to be referenced in the alert condition.
Declaration
public Output<string> MonitorId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The title of this condition.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PolicyId
The ID of the policy where this condition should be used.
Declaration
public Output<int> PolicyId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
RunbookUrl
Runbook URL to display in notifications.
Declaration
public Output<string> RunbookUrl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, AlertConditionState, CustomResourceOptions)
Get an existing AlertCondition resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AlertCondition Get(string name, Input<string> id, AlertConditionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AlertConditionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AlertCondition |