New Relic

v5.0.0 published on Monday, Sep 12, 2022 by Pulumi

AlertCondition

Use this resource to create and manage synthetics alert conditions in New Relic.

NOTE: The newrelic.NrqlAlertCondition resource is preferred for configuring alerts conditions. In most cases feature parity can be achieved with a NRQL query. Other condition types may be deprecated in the future and receive fewer product updates.

Create a AlertCondition Resource

new AlertCondition(name: string, args: AlertConditionArgs, opts?: CustomResourceOptions);
@overload
def AlertCondition(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   enabled: Optional[bool] = None,
                   monitor_id: Optional[str] = None,
                   name: Optional[str] = None,
                   policy_id: Optional[int] = None,
                   runbook_url: Optional[str] = None)
@overload
def AlertCondition(resource_name: str,
                   args: AlertConditionArgs,
                   opts: Optional[ResourceOptions] = None)
func NewAlertCondition(ctx *Context, name string, args AlertConditionArgs, opts ...ResourceOption) (*AlertCondition, error)
public AlertCondition(string name, AlertConditionArgs args, CustomResourceOptions? opts = null)
public AlertCondition(String name, AlertConditionArgs args)
public AlertCondition(String name, AlertConditionArgs args, CustomResourceOptions options)
type: newrelic:synthetics:AlertCondition
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args AlertConditionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control 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.
name String
The unique name of the resource.
args AlertConditionArgs
The arguments to resource properties.
options 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 Architecture and Concepts docs.

Inputs

The AlertCondition resource accepts the following input properties:

MonitorId string

The GUID 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 GUID 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 GUID of the Synthetics monitor to be referenced in the alert condition.

policyId Integer

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.

monitorId string

The GUID 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 GUID 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 str

The title of this condition.

runbook_url str

Runbook URL to display in notifications.

monitorId String

The GUID 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.

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 string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

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
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        monitor_id: Optional[str] = None,
        name: Optional[str] = None,
        policy_id: Optional[int] = None,
        runbook_url: Optional[str] = None) -> AlertCondition
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)
public static AlertCondition get(String name, Output<String> id, AlertConditionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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 GUID 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 GUID 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 GUID of the Synthetics monitor to be referenced in the alert condition.

name String

The title of this condition.

policyId Integer

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 GUID 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 GUID of the Synthetics monitor to be referenced in the alert condition.

name str

The title of this condition.

policy_id int

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

runbook_url str

Runbook URL to display in notifications.

enabled Boolean

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

monitorId String

The GUID 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.

Import

Synthetics alert conditions can be imported using a composite ID of <policy_id>:<condition_id>, e.g.

 $ pulumi import newrelic:synthetics/alertCondition:AlertCondition main 12345:67890

Package Details

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

This Pulumi package is based on the newrelic Terraform Provider.