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",
        });
    }

}

Coming soon!

import pulumi
import pulumi_newrelic as newrelic

foo_monitor = newrelic.synthetics.get_monitor(name="foo")
foo_alert_condition = newrelic.synthetics.AlertCondition("fooAlertCondition",
    policy_id=newrelic_alert_policy["foo"]["id"],
    monitor_id=foo_monitor.id,
    runbook_url="https://www.example.com")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const fooMonitor = newrelic.synthetics.getMonitor({
    name: "foo",
});
const fooAlertCondition = new newrelic.synthetics.AlertCondition("fooAlertCondition", {
    policyId: newrelic_alert_policy.foo.id,
    monitorId: fooMonitor.then(fooMonitor => fooMonitor.id),
    runbookUrl: "https://www.example.com",
});

Create a AlertCondition Resource

def AlertCondition(resource_name, opts=None, enabled=None, monitor_id=None, name=None, policy_id=None, runbook_url=None, __props__=None);
name string
The unique name of the resource.
args AlertConditionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AlertConditionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AlertConditionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AlertCondition Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AlertCondition resource accepts the following input properties:

MonitorId string

The ID of the Synthetics monitor to be referenced in the alert condition.

PolicyId int

The ID of the policy where this condition should be used.

Enabled bool

Set whether to enable the alert condition. Defaults to true.

Name string

The title of this condition.

RunbookUrl string

Runbook URL to display in notifications.

MonitorId string

The ID of the Synthetics monitor to be referenced in the alert condition.

PolicyId int

The ID of the policy where this condition should be used.

Enabled bool

Set whether to enable the alert condition. Defaults to true.

Name string

The title of this condition.

RunbookUrl string

Runbook URL to display in notifications.

monitorId string

The ID of the Synthetics monitor to be referenced in the alert condition.

policyId number

The ID of the policy where this condition should be used.

enabled boolean

Set whether to enable the alert condition. Defaults to true.

name string

The title of this condition.

runbookUrl string

Runbook URL to display in notifications.

monitor_id str

The ID of the Synthetics monitor to be referenced in the alert condition.

policy_id float

The ID of the policy where this condition should be used.

enabled bool

Set whether to enable the alert condition. Defaults to true.

name str

The title of this condition.

runbook_url str

Runbook URL to display in notifications.

Outputs

All input properties are implicitly available as output properties. Additionally, the AlertCondition resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AlertCondition Resource

Get an existing AlertCondition resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AlertConditionState, opts?: CustomResourceOptions): AlertCondition
static get(resource_name, id, opts=None, enabled=None, monitor_id=None, name=None, policy_id=None, runbook_url=None, __props__=None);
func GetAlertCondition(ctx *Context, name string, id IDInput, state *AlertConditionState, opts ...ResourceOption) (*AlertCondition, error)
public static AlertCondition Get(string name, Input<string> id, AlertConditionState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Enabled bool

Set whether to enable the alert condition. Defaults to true.

MonitorId string

The ID of the Synthetics monitor to be referenced in the alert condition.

Name string

The title of this condition.

PolicyId int

The ID of the policy where this condition should be used.

RunbookUrl string

Runbook URL to display in notifications.

Enabled bool

Set whether to enable the alert condition. Defaults to true.

MonitorId string

The ID of the Synthetics monitor to be referenced in the alert condition.

Name string

The title of this condition.

PolicyId int

The ID of the policy where this condition should be used.

RunbookUrl string

Runbook URL to display in notifications.

enabled boolean

Set whether to enable the alert condition. Defaults to true.

monitorId string

The ID of the Synthetics monitor to be referenced in the alert condition.

name string

The title of this condition.

policyId number

The ID of the policy where this condition should be used.

runbookUrl string

Runbook URL to display in notifications.

enabled bool

Set whether to enable the alert condition. Defaults to true.

monitor_id str

The ID of the Synthetics monitor to be referenced in the alert condition.

name str

The title of this condition.

policy_id float

The ID of the policy where this condition should be used.

runbook_url str

Runbook URL to display in notifications.

Package Details

Repository
https://github.com/pulumi/pulumi-newrelic
License
Apache-2.0
Notes
This Pulumi package is based on the newrelic Terraform Provider.