This page documents the language specification for the newrelic package. If you're looking for help working with the inputs, outputs, or functions of newrelic resources in a Pulumi program, please see the resource documentation for examples and API reference.

plugins

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-newrelic repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-newrelic repo.

class pulumi_newrelic.plugins.AlertCondition(resource_name, opts=None, enabled=None, entities=None, metric=None, metric_description=None, name=None, plugin_guid=None, plugin_id=None, policy_id=None, runbook_url=None, terms=None, value_function=None, __props__=None, __name__=None, __opts__=None)

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

import pulumi
import pulumi_newrelic as newrelic

foo_plugin = newrelic.plugins.get_plugin(guid="com.example.my-plugin")
foo_plugin_component = newrelic.plugins.get_plugin_component(plugin_id=foo_plugin.id,
    name="MyPlugin")
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
foo_alert_condition = newrelic.plugins.AlertCondition("fooAlertCondition",
    policy_id=foo_alert_policy.id,
    entities=[foo_plugin_component.id],
    metric="Component/Summary/Consumers[consumers]",
    plugin_id=foo_plugin.id,
    plugin_guid=foo_plugin.guid,
    value_function="average",
    metric_description="Queue consumers",
    term=[{
        "duration": 5,
        "operator": "below",
        "priority": "critical",
        "threshold": "0.75",
        "timeFunction": "all",
    }])

The term mapping supports the following arguments:

  • duration - (Required) In minutes, must be in the range of 5 to 120, inclusive.

  • operator - (Optional) above, below, or equal. Defaults to equal.

  • priority - (Optional) critical or warning. Defaults to critical.

  • threshold - (Required) Must be 0 or greater.

  • time_function - (Required) all or any.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • enabled (pulumi.Input[bool]) – Whether or not this condition is enabled.

  • entities (pulumi.Input[list]) – The plugin component IDs to target.

  • metric (pulumi.Input[str]) – The plugin metric to evaluate.

  • metric_description (pulumi.Input[str]) – The metric description.

  • name (pulumi.Input[str]) – The title of the condition. Must be between 1 and 64 characters, inclusive.

  • plugin_guid (pulumi.Input[str]) – The GUID of the plugin which produces the metric.

  • plugin_id (pulumi.Input[str]) – The ID of the installed plugin instance which produces the metric.

  • policy_id (pulumi.Input[float]) – The ID of the policy where this condition should be used.

  • runbook_url (pulumi.Input[str]) – Runbook URL to display in notifications.

  • terms (pulumi.Input[list]) – A list of terms for this condition. See Terms below for details.

  • value_function (pulumi.Input[str]) – The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

The terms object supports the following:

  • duration (pulumi.Input[float])

  • operator (pulumi.Input[str])

  • priority (pulumi.Input[str])

  • threshold (pulumi.Input[float])

  • timeFunction (pulumi.Input[str])

enabled: pulumi.Output[bool] = None

Whether or not this condition is enabled.

entities: pulumi.Output[list] = None

The plugin component IDs to target.

metric: pulumi.Output[str] = None

The plugin metric to evaluate.

metric_description: pulumi.Output[str] = None

The metric description.

name: pulumi.Output[str] = None

The title of the condition. Must be between 1 and 64 characters, inclusive.

plugin_guid: pulumi.Output[str] = None

The GUID of the plugin which produces the metric.

plugin_id: pulumi.Output[str] = None

The ID of the installed plugin instance which produces the metric.

policy_id: pulumi.Output[float] = None

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

runbook_url: pulumi.Output[str] = None

Runbook URL to display in notifications.

terms: pulumi.Output[list] = None

A list of terms for this condition. See Terms below for details.

  • duration (float)

  • operator (str)

  • priority (str)

  • threshold (float)

  • timeFunction (str)

value_function: pulumi.Output[str] = None

The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

static get(resource_name, id, opts=None, enabled=None, entities=None, metric=None, metric_description=None, name=None, plugin_guid=None, plugin_id=None, policy_id=None, runbook_url=None, terms=None, value_function=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • enabled (pulumi.Input[bool]) – Whether or not this condition is enabled.

  • entities (pulumi.Input[list]) – The plugin component IDs to target.

  • metric (pulumi.Input[str]) – The plugin metric to evaluate.

  • metric_description (pulumi.Input[str]) – The metric description.

  • name (pulumi.Input[str]) – The title of the condition. Must be between 1 and 64 characters, inclusive.

  • plugin_guid (pulumi.Input[str]) – The GUID of the plugin which produces the metric.

  • plugin_id (pulumi.Input[str]) – The ID of the installed plugin instance which produces the metric.

  • policy_id (pulumi.Input[float]) – The ID of the policy where this condition should be used.

  • runbook_url (pulumi.Input[str]) – Runbook URL to display in notifications.

  • terms (pulumi.Input[list]) – A list of terms for this condition. See Terms below for details.

  • value_function (pulumi.Input[str]) – The value function to apply to the metric data. One of min, max, average, sample_size, total, or percent.

The terms object supports the following:

  • duration (pulumi.Input[float])

  • operator (pulumi.Input[str])

  • priority (pulumi.Input[str])

  • threshold (pulumi.Input[float])

  • timeFunction (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_newrelic.plugins.ApplicationSettings(resource_name, opts=None, app_apdex_threshold=None, enable_real_user_monitoring=None, end_user_apdex_threshold=None, name=None, __props__=None, __name__=None, __opts__=None)

NOTE: Applications are not created by this resource, but are created by a reporting agent.

Use this resource to manage configuration for an application that already exists in New Relic.

import pulumi
import pulumi_newrelic as newrelic

app = newrelic.plugins.ApplicationSettings("app",
    app_apdex_threshold="0.7",
    enable_real_user_monitoring=False,
    end_user_apdex_threshold="0.8")

NOTE: Applications that have reported data in the last twelve hours cannot be deleted.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_apdex_threshold (pulumi.Input[float]) – The appex threshold for the New Relic application.

  • enable_real_user_monitoring (pulumi.Input[bool]) – Enable or disable real user monitoring for the New Relic application.

  • end_user_apdex_threshold (pulumi.Input[float]) – The user’s apdex threshold for the New Relic application.

  • name (pulumi.Input[str]) – The name of the application in New Relic APM.

app_apdex_threshold: pulumi.Output[float] = None

The appex threshold for the New Relic application.

enable_real_user_monitoring: pulumi.Output[bool] = None

Enable or disable real user monitoring for the New Relic application.

end_user_apdex_threshold: pulumi.Output[float] = None

The user’s apdex threshold for the New Relic application.

name: pulumi.Output[str] = None

The name of the application in New Relic APM.

static get(resource_name, id, opts=None, app_apdex_threshold=None, enable_real_user_monitoring=None, end_user_apdex_threshold=None, name=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • app_apdex_threshold (pulumi.Input[float]) – The appex threshold for the New Relic application.

  • enable_real_user_monitoring (pulumi.Input[bool]) – Enable or disable real user monitoring for the New Relic application.

  • end_user_apdex_threshold (pulumi.Input[float]) – The user’s apdex threshold for the New Relic application.

  • name (pulumi.Input[str]) – The name of the application in New Relic APM.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_newrelic.plugins.AwaitableGetPluginComponentResult(health_status=None, id=None, name=None, plugin_id=None)
class pulumi_newrelic.plugins.AwaitableGetPluginResult(guid=None, id=None)
class pulumi_newrelic.plugins.GetPluginComponentResult(health_status=None, id=None, name=None, plugin_id=None)

A collection of values returned by getPluginComponent.

health_status = None

The health status of the plugin component.

id = None

The ID of the plugin component.

class pulumi_newrelic.plugins.GetPluginResult(guid=None, id=None)

A collection of values returned by getPlugin.

id = None

The ID of the installed plugin instance.

class pulumi_newrelic.plugins.Workload(resource_name, opts=None, account_id=None, entity_guids=None, entity_search_queries=None, name=None, scope_account_ids=None, __props__=None, __name__=None, __opts__=None)

Use this resource to create, update, and delete a New Relic One workload.

A New Relic Personal API key is required to provision this resource. Set the api_key attribute in the provider block or the NEW_RELIC_API_KEY environment variable with your Personal API key.

import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.plugins.Workload("foo",
    account_id=12345678,
    entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
    entity_search_queries=[{
        "query": "name like 'Example application'",
    }],
    scope_account_ids=[12345678])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_id (pulumi.Input[float]) – The New Relic account ID where you want to create the workload.

  • entity_guids (pulumi.Input[list]) – A list of entity GUIDs manually assigned to this workload.

  • entity_search_queries (pulumi.Input[list]) – A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

  • name (pulumi.Input[str]) – The workload’s name.

  • scope_account_ids (pulumi.Input[list]) – A list of account IDs that will be used to get entities from.

The entity_search_queries object supports the following:

  • query (pulumi.Input[str]) - The query.

account_id: pulumi.Output[float] = None

The New Relic account ID where you want to create the workload.

composite_entity_search_query: pulumi.Output[str] = None

The composite query used to compose a dynamic workload.

entity_guids: pulumi.Output[list] = None

A list of entity GUIDs manually assigned to this workload.

entity_search_queries: pulumi.Output[list] = None

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

  • query (str) - The query.

guid: pulumi.Output[str] = None

The unique entity identifier of the workload in New Relic.

name: pulumi.Output[str] = None

The workload’s name.

The URL of the workload.

scope_account_ids: pulumi.Output[list] = None

A list of account IDs that will be used to get entities from.

workload_id: pulumi.Output[float] = None

The unique entity identifier of the workload.

static get(resource_name, id, opts=None, account_id=None, composite_entity_search_query=None, entity_guids=None, entity_search_queries=None, guid=None, name=None, permalink=None, scope_account_ids=None, workload_id=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • account_id (pulumi.Input[float]) – The New Relic account ID where you want to create the workload.

  • composite_entity_search_query (pulumi.Input[str]) – The composite query used to compose a dynamic workload.

  • entity_guids (pulumi.Input[list]) – A list of entity GUIDs manually assigned to this workload.

  • entity_search_queries (pulumi.Input[list]) – A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

  • guid (pulumi.Input[str]) – The unique entity identifier of the workload in New Relic.

  • name (pulumi.Input[str]) – The workload’s name.

  • permalink (pulumi.Input[str]) – The URL of the workload.

  • scope_account_ids (pulumi.Input[list]) – A list of account IDs that will be used to get entities from.

  • workload_id (pulumi.Input[float]) – The unique entity identifier of the workload.

The entity_search_queries object supports the following:

  • query (pulumi.Input[str]) - The query.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_newrelic.plugins.get_plugin(guid=None, opts=None)

Use this data source to get information about a specific installed plugin in New Relic.

Each plugin published to New Relic’s Plugin Central is assigned a GUID. Once you have installed a plugin into your account it is assigned an ID. This account-specific ID is required when creating Plugins alert conditions.

import pulumi
import pulumi_newrelic as newrelic

foo_plugin = newrelic.plugins.get_plugin(guid="com.example.my-plugin")
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
foo_alert_condition = newrelic.plugins.AlertCondition("fooAlertCondition",
    policy_id=foo_alert_policy.id,
    metric="Component/Summary/Consumers[consumers]",
    plugin_id=foo_plugin.id,
    plugin_guid=foo_plugin.guid,
    value_function="average",
    metric_description="Queue consumers",
    term=[{
        "duration": 5,
        "operator": "below",
        "priority": "critical",
        "threshold": "0.75",
        "timeFunction": "all",
    }])
Parameters

guid (str) – The GUID of the plugin in New Relic.

pulumi_newrelic.plugins.get_plugin_component(name=None, plugin_id=None, opts=None)

Use this data source to get information about a single plugin component in New Relic that already exists.

Each plugin component reporting into to New Relic is assigned a unique ID. Once you have a plugin component reporting data into your account, its component ID can be used to create Plugins alert conditions.

import pulumi
import pulumi_newrelic as newrelic

foo_plugin = newrelic.plugins.get_plugin(guid="com.example.my-plugin")
foo_plugin_component = newrelic.plugins.get_plugin_component(plugin_id=foo_plugin.id,
    name="My Plugin Component")
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
foo_alert_condition = newrelic.plugins.AlertCondition("fooAlertCondition",
    policy_id=foo_alert_policy.id,
    metric="Component/Summary/Consumers[consumers]",
    plugin_id=foo_plugin.id,
    plugin_guid=foo_plugin.guid,
    entities=[foo_plugin_component.id],
    value_function="average",
    metric_description="Queue consumers",
    term=[{
        "duration": 5,
        "operator": "below",
        "priority": "critical",
        "threshold": "0.75",
        "timeFunction": "all",
    }])
Parameters
  • name (str) – The name of the plugin component.

  • plugin_id (float) – The ID of the plugin instance this component belongs to.