published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
New Relic Plugins reached end of life Wednesday June 16, 2021.
This resource has been removed.
For more information, click here
Create AlertCondition Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AlertCondition(name: string, args: AlertConditionArgs, opts?: CustomResourceOptions);@overload
def AlertCondition(resource_name: str,
args: AlertConditionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AlertCondition(resource_name: str,
opts: Optional[ResourceOptions] = None,
entities: Optional[Sequence[int]] = None,
metric: Optional[str] = None,
metric_description: Optional[str] = None,
plugin_guid: Optional[str] = None,
plugin_id: Optional[str] = None,
policy_id: Optional[int] = None,
terms: Optional[Sequence[AlertConditionTermArgs]] = None,
value_function: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
runbook_url: Optional[str] = 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:plugins:AlertCondition
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var newrelicAlertConditionResource = new NewRelic.Plugins.AlertCondition("newrelicAlertConditionResource", new()
{
Entities = new[]
{
0,
},
Metric = "string",
MetricDescription = "string",
PluginGuid = "string",
PluginId = "string",
PolicyId = 0,
Terms = new[]
{
new NewRelic.Plugins.Inputs.AlertConditionTermArgs
{
Duration = 0,
Threshold = 0,
TimeFunction = "string",
Operator = "string",
Priority = "string",
},
},
ValueFunction = "string",
Enabled = false,
Name = "string",
RunbookUrl = "string",
});
example, err := plugins.NewAlertCondition(ctx, "newrelicAlertConditionResource", &plugins.AlertConditionArgs{
Entities: pulumi.IntArray{
pulumi.Int(0),
},
Metric: pulumi.String("string"),
MetricDescription: pulumi.String("string"),
PluginGuid: pulumi.String("string"),
PluginId: pulumi.String("string"),
PolicyId: pulumi.Int(0),
Terms: plugins.AlertConditionTermArray{
&plugins.AlertConditionTermArgs{
Duration: pulumi.Int(0),
Threshold: pulumi.Float64(0),
TimeFunction: pulumi.String("string"),
Operator: pulumi.String("string"),
Priority: pulumi.String("string"),
},
},
ValueFunction: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
RunbookUrl: pulumi.String("string"),
})
var newrelicAlertConditionResource = new com.pulumi.newrelic.plugins.AlertCondition("newrelicAlertConditionResource", com.pulumi.newrelic.plugins.AlertConditionArgs.builder()
.entities(0)
.metric("string")
.metricDescription("string")
.pluginGuid("string")
.pluginId("string")
.policyId(0)
.terms(AlertConditionTermArgs.builder()
.duration(0)
.threshold(0.0)
.timeFunction("string")
.operator("string")
.priority("string")
.build())
.valueFunction("string")
.enabled(false)
.name("string")
.runbookUrl("string")
.build());
newrelic_alert_condition_resource = newrelic.plugins.AlertCondition("newrelicAlertConditionResource",
entities=[0],
metric="string",
metric_description="string",
plugin_guid="string",
plugin_id="string",
policy_id=0,
terms=[{
"duration": 0,
"threshold": 0,
"time_function": "string",
"operator": "string",
"priority": "string",
}],
value_function="string",
enabled=False,
name="string",
runbook_url="string")
const newrelicAlertConditionResource = new newrelic.plugins.AlertCondition("newrelicAlertConditionResource", {
entities: [0],
metric: "string",
metricDescription: "string",
pluginGuid: "string",
pluginId: "string",
policyId: 0,
terms: [{
duration: 0,
threshold: 0,
timeFunction: "string",
operator: "string",
priority: "string",
}],
valueFunction: "string",
enabled: false,
name: "string",
runbookUrl: "string",
});
type: newrelic:plugins:AlertCondition
properties:
enabled: false
entities:
- 0
metric: string
metricDescription: string
name: string
pluginGuid: string
pluginId: string
policyId: 0
runbookUrl: string
terms:
- duration: 0
operator: string
priority: string
threshold: 0
timeFunction: string
valueFunction: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AlertCondition resource accepts the following input properties:
- Entities List<int>
- The plugin component IDs to target.
- Metric string
- The plugin metric to evaluate.
- Metric
Description string - The metric description.
- Plugin
Guid string - The GUID of the plugin which produces the metric.
- Plugin
Id string - The ID of the installed plugin instance which produces the metric.
- Policy
Id int - The ID of the policy where this condition should be used.
- Terms
List<Pulumi.
New Relic. Plugins. Inputs. Alert Condition Term> - Value
Function string - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent. - Enabled bool
- Whether or not this condition is enabled.
- Name string
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- Runbook
Url string - Runbook URL to display in notifications.
- Entities []int
- The plugin component IDs to target.
- Metric string
- The plugin metric to evaluate.
- Metric
Description string - The metric description.
- Plugin
Guid string - The GUID of the plugin which produces the metric.
- Plugin
Id string - The ID of the installed plugin instance which produces the metric.
- Policy
Id int - The ID of the policy where this condition should be used.
- Terms
[]Alert
Condition Term Args - Value
Function string - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent. - Enabled bool
- Whether or not this condition is enabled.
- Name string
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- Runbook
Url string - Runbook URL to display in notifications.
- entities List<Integer>
- The plugin component IDs to target.
- metric String
- The plugin metric to evaluate.
- metric
Description String - The metric description.
- plugin
Guid String - The GUID of the plugin which produces the metric.
- plugin
Id String - The ID of the installed plugin instance which produces the metric.
- policy
Id Integer - The ID of the policy where this condition should be used.
- terms
List<Alert
Condition Term> - value
Function String - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent. - enabled Boolean
- Whether or not this condition is enabled.
- name String
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook
Url String - Runbook URL to display in notifications.
- entities number[]
- The plugin component IDs to target.
- metric string
- The plugin metric to evaluate.
- metric
Description string - The metric description.
- plugin
Guid string - The GUID of the plugin which produces the metric.
- plugin
Id string - The ID of the installed plugin instance which produces the metric.
- policy
Id number - The ID of the policy where this condition should be used.
- terms
Alert
Condition Term[] - value
Function string - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent. - enabled boolean
- Whether or not this condition is enabled.
- name string
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook
Url string - Runbook URL to display in notifications.
- entities Sequence[int]
- The plugin component IDs to target.
- metric str
- The plugin metric to evaluate.
- metric_
description str - The metric description.
- plugin_
guid str - The GUID of the plugin which produces the metric.
- plugin_
id str - The ID of the installed plugin instance which produces the metric.
- policy_
id int - The ID of the policy where this condition should be used.
- terms
Sequence[Alert
Condition Term Args] - value_
function str - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent. - enabled bool
- Whether or not this condition is enabled.
- name str
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook_
url str - Runbook URL to display in notifications.
- entities List<Number>
- The plugin component IDs to target.
- metric String
- The plugin metric to evaluate.
- metric
Description String - The metric description.
- plugin
Guid String - The GUID of the plugin which produces the metric.
- plugin
Id String - The ID of the installed plugin instance which produces the metric.
- policy
Id Number - The ID of the policy where this condition should be used.
- terms List<Property Map>
- value
Function String - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent. - enabled Boolean
- Whether or not this condition is enabled.
- name String
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook
Url 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 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,
entities: Optional[Sequence[int]] = None,
metric: Optional[str] = None,
metric_description: Optional[str] = None,
name: Optional[str] = None,
plugin_guid: Optional[str] = None,
plugin_id: Optional[str] = None,
policy_id: Optional[int] = None,
runbook_url: Optional[str] = None,
terms: Optional[Sequence[AlertConditionTermArgs]] = None,
value_function: Optional[str] = None) -> AlertConditionfunc 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)resources: _: type: newrelic:plugins:AlertCondition get: id: ${id}- 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.
- Enabled bool
- Whether or not this condition is enabled.
- Entities List<int>
- The plugin component IDs to target.
- Metric string
- The plugin metric to evaluate.
- Metric
Description string - The metric description.
- Name string
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- Plugin
Guid string - The GUID of the plugin which produces the metric.
- Plugin
Id string - The ID of the installed plugin instance which produces the metric.
- Policy
Id int - The ID of the policy where this condition should be used.
- Runbook
Url string - Runbook URL to display in notifications.
- Terms
List<Pulumi.
New Relic. Plugins. Inputs. Alert Condition Term> - Value
Function string - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
- Enabled bool
- Whether or not this condition is enabled.
- Entities []int
- The plugin component IDs to target.
- Metric string
- The plugin metric to evaluate.
- Metric
Description string - The metric description.
- Name string
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- Plugin
Guid string - The GUID of the plugin which produces the metric.
- Plugin
Id string - The ID of the installed plugin instance which produces the metric.
- Policy
Id int - The ID of the policy where this condition should be used.
- Runbook
Url string - Runbook URL to display in notifications.
- Terms
[]Alert
Condition Term Args - Value
Function string - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
- enabled Boolean
- Whether or not this condition is enabled.
- entities List<Integer>
- The plugin component IDs to target.
- metric String
- The plugin metric to evaluate.
- metric
Description String - The metric description.
- name String
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- plugin
Guid String - The GUID of the plugin which produces the metric.
- plugin
Id String - The ID of the installed plugin instance which produces the metric.
- policy
Id Integer - The ID of the policy where this condition should be used.
- runbook
Url String - Runbook URL to display in notifications.
- terms
List<Alert
Condition Term> - value
Function String - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
- enabled boolean
- Whether or not this condition is enabled.
- entities number[]
- The plugin component IDs to target.
- metric string
- The plugin metric to evaluate.
- metric
Description string - The metric description.
- name string
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- plugin
Guid string - The GUID of the plugin which produces the metric.
- plugin
Id string - The ID of the installed plugin instance which produces the metric.
- policy
Id number - The ID of the policy where this condition should be used.
- runbook
Url string - Runbook URL to display in notifications.
- terms
Alert
Condition Term[] - value
Function string - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
- enabled bool
- Whether or not this condition is enabled.
- entities Sequence[int]
- The plugin component IDs to target.
- metric str
- The plugin metric to evaluate.
- metric_
description str - The metric description.
- name str
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- plugin_
guid str - The GUID of the plugin which produces the metric.
- plugin_
id str - The ID of the installed plugin instance which produces the metric.
- policy_
id int - The ID of the policy where this condition should be used.
- runbook_
url str - Runbook URL to display in notifications.
- terms
Sequence[Alert
Condition Term Args] - value_
function str - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
- enabled Boolean
- Whether or not this condition is enabled.
- entities List<Number>
- The plugin component IDs to target.
- metric String
- The plugin metric to evaluate.
- metric
Description String - The metric description.
- name String
- The title of the condition. Must be between 1 and 64 characters, inclusive.
- plugin
Guid String - The GUID of the plugin which produces the metric.
- plugin
Id String - The ID of the installed plugin instance which produces the metric.
- policy
Id Number - The ID of the policy where this condition should be used.
- runbook
Url String - Runbook URL to display in notifications.
- terms List<Property Map>
- value
Function String - The value function to apply to the metric data. One of
min,max,average,sample_size,total, orpercent.
Supporting Types
AlertConditionTerm, AlertConditionTermArgs
- Duration int
- Threshold double
- Time
Function string - Operator string
- Priority string
- Duration int
- Threshold float64
- Time
Function string - Operator string
- Priority string
- duration Integer
- threshold Double
- time
Function String - operator String
- priority String
- duration number
- threshold number
- time
Function string - operator string
- priority string
- duration int
- threshold float
- time_
function str - operator str
- priority str
- duration Number
- threshold Number
- time
Function String - operator String
- priority String
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
