Module plugins

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.

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.

Resources

Functions

Others

Resources

Resource AlertCondition

class AlertCondition extends CustomResource

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const fooPlugin = newrelic.plugins.getPlugin({
    guid: "com.example.my-plugin",
});
const fooPluginComponent = fooPlugin.then(fooPlugin => newrelic.plugins.getPluginComponent({
    pluginId: fooPlugin.id,
    name: "MyPlugin",
}));
const fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
const fooAlertCondition = new newrelic.plugins.AlertCondition("fooAlertCondition", {
    policyId: fooAlertPolicy.id,
    entities: [fooPluginComponent.then(fooPluginComponent => fooPluginComponent.id)],
    metric: "Component/Summary/Consumers[consumers]",
    pluginId: fooPlugin.then(fooPlugin => fooPlugin.id),
    pluginGuid: fooPlugin.then(fooPlugin => fooPlugin.guid),
    valueFunction: "average",
    metricDescription: "Queue consumers",
    term: [{
        duration: 5,
        operator: "below",
        priority: "critical",
        threshold: "0.75",
        timeFunction: "all",
    }],
});

Terms

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.
  • timeFunction - (Required) all or any.

constructor

new AlertCondition(name: string, args: AlertConditionArgs, opts?: pulumi.CustomResourceOptions)

Create a AlertCondition resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertConditionState, opts?: pulumi.CustomResourceOptions): AlertCondition

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is AlertCondition

Returns true if the given object is an instance of AlertCondition. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property enabled

public enabled: pulumi.Output<boolean | undefined>;

Whether or not this condition is enabled.

property entities

public entities: pulumi.Output<number[]>;

The plugin component IDs to target.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property metric

public metric: pulumi.Output<string>;

The plugin metric to evaluate.

property metricDescription

public metricDescription: pulumi.Output<string>;

The metric description.

property name

public name: pulumi.Output<string>;

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

property pluginGuid

public pluginGuid: pulumi.Output<string>;

The GUID of the plugin which produces the metric.

property pluginId

public pluginId: pulumi.Output<string>;

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

property policyId

public policyId: pulumi.Output<number>;

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

property runbookUrl

public runbookUrl: pulumi.Output<string | undefined>;

Runbook URL to display in notifications.

property terms

public terms: pulumi.Output<AlertConditionTerm[]>;

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

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property valueFunction

public valueFunction: pulumi.Output<string>;

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

Resource ApplicationSettings

class ApplicationSettings extends CustomResource

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.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const app = new newrelic.plugins.ApplicationSettings("app", {
    appApdexThreshold: 0.7,
    enableRealUserMonitoring: false,
    endUserApdexThreshold: 0.8,
});

Notes

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

constructor

new ApplicationSettings(name: string, args: ApplicationSettingsArgs, opts?: pulumi.CustomResourceOptions)

Create a ApplicationSettings resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ApplicationSettingsState, opts?: pulumi.CustomResourceOptions): ApplicationSettings

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is ApplicationSettings

Returns true if the given object is an instance of ApplicationSettings. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property appApdexThreshold

public appApdexThreshold: pulumi.Output<number>;

The appex threshold for the New Relic application.

property enableRealUserMonitoring

public enableRealUserMonitoring: pulumi.Output<boolean>;

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

property endUserApdexThreshold

public endUserApdexThreshold: pulumi.Output<number>;

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

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the application in New Relic APM.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Workload

class Workload extends CustomResource

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 providerApiKey attribute in the provider block or the NEWRELIC_PERSONAL_API_KEY environment variable with your Personal API key,

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = new newrelic.plugins.Workload("foo", {
    accountId: 12345678,
    entityGuids: ["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
    entitySearchQueries: [{
        query: "name like 'Example application'",
    }],
    scopeAccountIds: [12345678],
});

constructor

new Workload(name: string, args: WorkloadArgs, opts?: pulumi.CustomResourceOptions)

Create a Workload resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: WorkloadState, opts?: pulumi.CustomResourceOptions): Workload

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Workload

Returns true if the given object is an instance of Workload. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property accountId

public accountId: pulumi.Output<number>;

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

property compositeEntitySearchQuery

public compositeEntitySearchQuery: pulumi.Output<string>;

The composite query used to compose a dynamic workload.

property entityGuids

public entityGuids: pulumi.Output<string[]>;

A list of entity GUIDs manually assigned to this workload.

property entitySearchQueries

public entitySearchQueries: pulumi.Output<WorkloadEntitySearchQuery[] | undefined>;

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

property guid

public guid: pulumi.Output<string>;

The unique entity identifier of the workload in New Relic.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The workload’s name.

public permalink: pulumi.Output<string>;

The URL of the workload.

property scopeAccountIds

public scopeAccountIds: pulumi.Output<number[]>;

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

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property workloadId

public workloadId: pulumi.Output<number>;

The unique entity identifier of the workload.

Functions

Function getPlugin

getPlugin(args: GetPluginArgs, opts?: pulumi.InvokeOptions): Promise<GetPluginResult>

Function getPluginComponent

getPluginComponent(args: GetPluginComponentArgs, opts?: pulumi.InvokeOptions): Promise<GetPluginComponentResult>

Others

interface AlertConditionArgs

interface AlertConditionArgs

The set of arguments for constructing a AlertCondition resource.

property enabled

enabled?: pulumi.Input<boolean>;

Whether or not this condition is enabled.

property entities

entities: pulumi.Input<pulumi.Input<number>[]>;

The plugin component IDs to target.

property metric

metric: pulumi.Input<string>;

The plugin metric to evaluate.

property metricDescription

metricDescription: pulumi.Input<string>;

The metric description.

property name

name?: pulumi.Input<string>;

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

property pluginGuid

pluginGuid: pulumi.Input<string>;

The GUID of the plugin which produces the metric.

property pluginId

pluginId: pulumi.Input<string>;

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

property policyId

policyId: pulumi.Input<number>;

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

property runbookUrl

runbookUrl?: pulumi.Input<string>;

Runbook URL to display in notifications.

property terms

terms: pulumi.Input<pulumi.Input<AlertConditionTerm>[]>;

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

property valueFunction

valueFunction: pulumi.Input<string>;

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

interface AlertConditionState

interface AlertConditionState

Input properties used for looking up and filtering AlertCondition resources.

property enabled

enabled?: pulumi.Input<boolean>;

Whether or not this condition is enabled.

property entities

entities?: pulumi.Input<pulumi.Input<number>[]>;

The plugin component IDs to target.

property metric

metric?: pulumi.Input<string>;

The plugin metric to evaluate.

property metricDescription

metricDescription?: pulumi.Input<string>;

The metric description.

property name

name?: pulumi.Input<string>;

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

property pluginGuid

pluginGuid?: pulumi.Input<string>;

The GUID of the plugin which produces the metric.

property pluginId

pluginId?: pulumi.Input<string>;

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

property policyId

policyId?: pulumi.Input<number>;

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

property runbookUrl

runbookUrl?: pulumi.Input<string>;

Runbook URL to display in notifications.

property terms

terms?: pulumi.Input<pulumi.Input<AlertConditionTerm>[]>;

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

property valueFunction

valueFunction?: pulumi.Input<string>;

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

interface ApplicationSettingsArgs

interface ApplicationSettingsArgs

The set of arguments for constructing a ApplicationSettings resource.

property appApdexThreshold

appApdexThreshold: pulumi.Input<number>;

The appex threshold for the New Relic application.

property enableRealUserMonitoring

enableRealUserMonitoring: pulumi.Input<boolean>;

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

property endUserApdexThreshold

endUserApdexThreshold: pulumi.Input<number>;

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

property name

name?: pulumi.Input<string>;

The name of the application in New Relic APM.

interface ApplicationSettingsState

interface ApplicationSettingsState

Input properties used for looking up and filtering ApplicationSettings resources.

property appApdexThreshold

appApdexThreshold?: pulumi.Input<number>;

The appex threshold for the New Relic application.

property enableRealUserMonitoring

enableRealUserMonitoring?: pulumi.Input<boolean>;

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

property endUserApdexThreshold

endUserApdexThreshold?: pulumi.Input<number>;

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

property name

name?: pulumi.Input<string>;

The name of the application in New Relic APM.

interface GetPluginArgs

interface GetPluginArgs

A collection of arguments for invoking getPlugin.

property guid

guid: string;

The GUID of the plugin in New Relic.

interface GetPluginComponentArgs

interface GetPluginComponentArgs

A collection of arguments for invoking getPluginComponent.

property name

name: string;

The name of the plugin component.

property pluginId

pluginId: number;

The ID of the plugin instance this component belongs to.

interface GetPluginComponentResult

interface GetPluginComponentResult

A collection of values returned by getPluginComponent.

property healthStatus

healthStatus: string;

The health status of the plugin component.

property id

id: string;

The ID of the plugin component.

property name

name: string;

property pluginId

pluginId: number;

interface GetPluginResult

interface GetPluginResult

A collection of values returned by getPlugin.

property guid

guid: string;

property id

id: string;

The ID of the installed plugin instance.

interface WorkloadArgs

interface WorkloadArgs

The set of arguments for constructing a Workload resource.

property accountId

accountId: pulumi.Input<number>;

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

property entityGuids

entityGuids?: pulumi.Input<pulumi.Input<string>[]>;

A list of entity GUIDs manually assigned to this workload.

property entitySearchQueries

entitySearchQueries?: pulumi.Input<pulumi.Input<WorkloadEntitySearchQuery>[]>;

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

property name

name?: pulumi.Input<string>;

The workload’s name.

property scopeAccountIds

scopeAccountIds?: pulumi.Input<pulumi.Input<number>[]>;

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

interface WorkloadState

interface WorkloadState

Input properties used for looking up and filtering Workload resources.

property accountId

accountId?: pulumi.Input<number>;

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

property compositeEntitySearchQuery

compositeEntitySearchQuery?: pulumi.Input<string>;

The composite query used to compose a dynamic workload.

property entityGuids

entityGuids?: pulumi.Input<pulumi.Input<string>[]>;

A list of entity GUIDs manually assigned to this workload.

property entitySearchQueries

entitySearchQueries?: pulumi.Input<pulumi.Input<WorkloadEntitySearchQuery>[]>;

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

property guid

guid?: pulumi.Input<string>;

The unique entity identifier of the workload in New Relic.

property name

name?: pulumi.Input<string>;

The workload’s name.

permalink?: pulumi.Input<string>;

The URL of the workload.

property scopeAccountIds

scopeAccountIds?: pulumi.Input<pulumi.Input<number>[]>;

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

property workloadId

workloadId?: pulumi.Input<number>;

The unique entity identifier of the workload.