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
new AlertCondition(name: string, args: AlertConditionArgs, opts?: CustomResourceOptions);def AlertCondition(resource_name, opts=None, enabled=None, monitor_id=None, name=None, policy_id=None, runbook_url=None, __props__=None);func NewAlertCondition(ctx *Context, name string, args AlertConditionArgs, opts ...ResourceOption) (*AlertCondition, error)public AlertCondition(string name, AlertConditionArgs args, CustomResourceOptions? opts = null)- 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:
- Monitor
Id string The ID of the Synthetics monitor to be referenced in the alert condition.
- Policy
Id 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.
- Runbook
Url string Runbook URL to display in notifications.
- Monitor
Id string The ID of the Synthetics monitor to be referenced in the alert condition.
- Policy
Id 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.
- Runbook
Url string Runbook URL to display in notifications.
- monitor
Id string The ID of the Synthetics monitor to be referenced in the alert condition.
- policy
Id 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.
- runbook
Url 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:
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): AlertConditionstatic 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.- Monitor
Id string The ID of the Synthetics monitor to be referenced in the alert condition.
- Name string
The title of this condition.
- Policy
Id int The ID of the policy where this condition should be used.
- Runbook
Url string Runbook URL to display in notifications.
- Enabled bool
Set whether to enable the alert condition. Defaults to
true.- Monitor
Id string The ID of the Synthetics monitor to be referenced in the alert condition.
- Name string
The title of this condition.
- Policy
Id int The ID of the policy where this condition should be used.
- Runbook
Url string Runbook URL to display in notifications.
- enabled boolean
Set whether to enable the alert condition. Defaults to
true.- monitor
Id string The ID of the Synthetics monitor to be referenced in the alert condition.
- name string
The title of this condition.
- policy
Id number The ID of the policy where this condition should be used.
- runbook
Url 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
newrelicTerraform Provider.