Package @pulumi/newrelic

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.

var newrelic = require("@pulumi/newrelic");
import * as newrelic from "@pulumi/newrelic";

Modules

Resources

Data Sources

Others

Resources

Resource AlertChannel

class AlertChannel extends CustomResource

Use this resource to create and manage New Relic alert policies.

Example Usage

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

const foo = new newrelic.AlertChannel("foo", {
    config: {
        includeJsonAttachment: "1",
        recipients: "foo@example.com",
    },
    type: "email",
});

See additional examples.

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/r/alert_channel.html.markdown.

constructor

new AlertChannel(name: string, args: AlertChannelArgs, opts?: pulumi.CustomResourceOptions)

Create a AlertChannel 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?: AlertChannelState, opts?: pulumi.CustomResourceOptions): AlertChannel

Get an existing AlertChannel 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 AlertChannel

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

property config

public config: pulumi.Output<AlertChannelConfig | undefined>;

A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.

property configuration

public configuration: pulumi.Output<{[key: string]: any} | undefined>;

Deprecated (Optional) A map of key/value pairs with channel type specific values. This argument is deprecated. Use the config argument instead.

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 channel.

property type

public type: pulumi.Output<string>;

The type of channel. One of: email, slack, opsgenie, pagerduty, victorops, or webhook.

property urn

urn: Output<URN>;

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

Resource AlertCondition

class AlertCondition extends CustomResource

Use this resource to create and manage alert conditions for APM, Browser, and Mobile in New Relic.

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. Terms must include at least one critical priority term
  • threshold - (Required) Must be 0 or greater.
  • timeFunction - (Required) all or any.

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/r/alert_condition.html.markdown.

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 conditionScope

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

application or instance. Choose application for most scenarios. If you are using the JVM plugin in New Relic, the instance setting allows your condition to trigger for specific app instances.

property enabled

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

Whether the condition is enabled or not. Defaults to true.

property entities

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

The instance IDs associated with this condition.

property gcMetric

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

A valid Garbage Collection metric e.g. GC/G1 Young Generation.

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 metric field accepts parameters based on the type set. One of these metrics based on type: * apmAppMetric * apdex * errorPercentage * responseTimeBackground * responseTimeWeb * throughputBackground * throughputWeb * userDefined * apmKtMetric * apdex * errorCount * errorPercentage * responseTime * throughput * browserMetric * ajaxResponseTime * ajaxThroughput * domProcessing * endUserApdex * network * pageRendering * pageViewThroughput * pageViewsWithJsErrors * requestQueuing * totalPageLoad * userDefined * webApplication * mobileMetric * database * images * json * mobileCrashRate * networkErrorPercentage * network * statusErrorPercentage * userDefined * viewLoading

property name

public name: pulumi.Output<string>;

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

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 type

public type: pulumi.Output<string>;

The type of condition. One of: apmAppMetric, apmKtMetric, browserMetric, mobileMetric

property urn

urn: Output<URN>;

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

property userDefinedMetric

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

A custom metric to be evaluated.

property userDefinedValueFunction

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

One of: average, min, max, total, or sampleSize.

property violationCloseTimer

public violationCloseTimer: pulumi.Output<number | undefined>;

Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be: 1, 2, 4, 8, 12 or 24.

Resource AlertPolicy

class AlertPolicy extends CustomResource

Use this resource to create and manage New Relic alert policies.

Example Usage

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

const foo = new newrelic.AlertPolicy("foo", {
    incidentPreference: "PER_POLICY", // PER_POLICY is default
});

See additional examples.

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/r/alert_policy.html.markdown.

constructor

new AlertPolicy(name: string, args?: AlertPolicyArgs, opts?: pulumi.CustomResourceOptions)

Create a AlertPolicy 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?: AlertPolicyState, opts?: pulumi.CustomResourceOptions): AlertPolicy

Get an existing AlertPolicy 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 AlertPolicy

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

property channelIds

public channelIds: pulumi.Output<number[] | undefined>;

An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be imported via terraform import.

property createdAt

public createdAt: pulumi.Output<string>;

The time the policy was created.

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 incidentPreference

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

The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.

property name

public name: pulumi.Output<string>;

The name of the policy.

property updatedAt

public updatedAt: pulumi.Output<string>;

The time the policy was last updated.

property urn

urn: Output<URN>;

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

Resource AlertPolicyChannel

class AlertPolicyChannel extends CustomResource

Use this resource to map alert policies to alert channels in New Relic.

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/r/alert_policy_channel.html.markdown.

constructor

new AlertPolicyChannel(name: string, args: AlertPolicyChannelArgs, opts?: pulumi.CustomResourceOptions)

Create a AlertPolicyChannel 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?: AlertPolicyChannelState, opts?: pulumi.CustomResourceOptions): AlertPolicyChannel

Get an existing AlertPolicyChannel 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 AlertPolicyChannel

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

property channelId

public channelId: pulumi.Output<number | undefined>;

Deprecated. The ID of the channel. Please use the channel_ids argument instead.

property channelIds

public channelIds: pulumi.Output<number[] | undefined>;

Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift your Terraform state.

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 policyId

public policyId: pulumi.Output<number>;

The ID of the policy.

property urn

urn: Output<URN>;

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

Resource Dashboard

class Dashboard extends CustomResource

Use this resource to create and manage New Relic dashboards.

Attribute Refence

In addition to all arguments above, the following attributes are exported:

  • dashboardUrl - The URL for viewing the dashboard.
Nested widget blocks

All nested widget blocks support the following common arguments:

  • title - (Required) A title for the widget.
  • visualization - (Required) How the widget visualizes data. Valid values are billboard, gauge, billboardComparison, facetBarChart, facetedLineChart, facetPieChart, facetTable, facetedAreaChart, heatmap, attributeSheet, singleEvent, histogram, funnel, rawJson, eventFeed, eventTable, uniquesList, lineChart, comparisonLineChart, markdown, and metricLineChart.
  • row - (Required) Row position of widget from top left, starting at 1.
  • column - (Required) Column position of widget from top left, starting at 1.
  • width - (Optional) Width of the widget. Valid values are 1 to 3 inclusive. Defaults to 1.
  • height - (Optional) Height of the widget. Valid values are 1 to 3 inclusive. Defaults to 1.
  • notes - (Optional) Description of the widget.

Each visualization type supports an additional set of arguments:

  • billboard, billboardComparison:
    • nrql - (Required) Valid NRQL query string. See Writing NRQL Queries for help.
    • thresholdRed - (Optional) Threshold above which the displayed value will be styled with a red color.
    • thresholdYellow - (Optional) Threshold above which the displayed value will be styled with a yellow color.
  • gauge:
    • nrql - (Required) Valid NRQL query string. See Writing NRQL Queries for help.
    • thresholdRed - (Required) Threshold above which the displayed value will be styled with a red color.
    • thresholdYellow - (Optional) Threshold above which the displayed value will be styled with a yellow color.
  • facetBarChart, facetPieChart, facetTable, facetedAreaChart, facetedLineChart, or heatmap:
    • nrql - (Required) Valid NRQL query string. See Writing NRQL Queries for help.
    • drilldownDashboardId - (Optional) The ID of a dashboard to link to from the widget’s facets.
  • attributeSheet, comparisonLineChart, eventFeed, eventTable, funnel, histogram, lineChart, rawJson, singleEvent, or uniquesList:
  • markdown:
    • source - (Required) The markdown source to be rendered in the widget.
  • metricLineChart:
    • entityIds - (Required) A collection of entity ids to display data for. These are typically application IDs.
    • metric - (Required) A nested block that describes a metric. Nested metric blocks support the following arguments:
      • name - (Required) The metric name to display.
      • values - (Required) The metric values to display.
    • duration - (Required) The duration, in ms, of the time window represented in the chart.
    • endTime - (Optional) The end time of the time window represented in the chart in epoch time. When not set, the time window will end at the current time.
    • facet - (Optional) Can be set to “host” to facet the metric data by host.
    • limit - (Optional) The limit of distinct data series to display.
  • applicationBreakdown:
    • entityIds - (Required) A collection of entity IDs to display data. These are typically application IDs.
Nested filter block

The optional filter block supports the following arguments: * eventTypes - (Optional) A list of event types to enable filtering for. * attributes - (Optional) A list of attributes belonging to the specified event types to enable filtering for.

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/r/dashboard.html.markdown.

constructor

new Dashboard(name: string, args: DashboardArgs, opts?: pulumi.CustomResourceOptions)

Create a Dashboard 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?: DashboardState, opts?: pulumi.CustomResourceOptions): Dashboard

Get an existing Dashboard 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 Dashboard

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

property dashboardUrl

public dashboardUrl: pulumi.Output<string>;

The URL for viewing the dashboard.

property editable

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

Determines who can edit the dashboard in an account. Valid values are all, editableByAll, editableByOwner, or readOnly. Defaults to editableByAll.

property filter

public filter: pulumi.Output<DashboardFilter | undefined>;

A nested block that describes a dashboard filter. Exactly one nested filter block is allowed. See Nested filter block below for details.

property icon

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

The icon for the dashboard. Valid values are adjust, archive, bar-chart, bell, bolt, bug, bullhorn, bullseye, clock-o, cloud, cog, comments-o, crosshairs, dashboard, envelope, fire, flag, flask, globe, heart, leaf, legal, life-ring, line-chart, magic, mobile, money, none, paper-plane, pie-chart, puzzle-piece, road, rocket, shopping-cart, sitemap, sliders, tablet, thumbs-down, thumbs-up, trophy, usd, user, and users. Defaults to bar-chart.

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 title

public title: pulumi.Output<string>;

The title of the dashboard.

property urn

urn: Output<URN>;

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

property visibility

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

Determines who can see the dashboard in an account. Valid values are all or owner. Defaults to all.

property widgets

public widgets: pulumi.Output<DashboardWidget[] | undefined>;

A nested block that describes a visualization. Up to 300 widget blocks are allowed in a dashboard definition. See Nested widget blocks below for details.

Resource InfraAlertCondition

class InfraAlertCondition extends CustomResource

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

Thresholds

The critical and warning threshold mapping supports the following arguments:

  • duration - (Required) Identifies the number of minutes the threshold must be passed or met for the alert to trigger. Threshold durations must be between 1 and 60 minutes (inclusive).
  • value - (Optional) Threshold value, computed against the comparison operator. Supported by infraMetric and infraProcessRunning alert condition types.
  • timeFunction - (Optional) Indicates if the condition needs to be sustained or to just break the threshold once; all or any. Supported by the infraMetric alert condition type.

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/r/infra_alert_condition.html.markdown.

constructor

new InfraAlertCondition(name: string, args: InfraAlertConditionArgs, opts?: pulumi.CustomResourceOptions)

Create a InfraAlertCondition 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?: InfraAlertConditionState, opts?: pulumi.CustomResourceOptions): InfraAlertCondition

Get an existing InfraAlertCondition 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 InfraAlertCondition

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

property comparison

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

The operator used to evaluate the threshold value. Valid values are above, below, and equal. Supported by the infraMetric and infraProcessRunning condition types.

property createdAt

public createdAt: pulumi.Output<number>;

The timestamp the alert condition was created.

property critical

public critical: pulumi.Output<InfraAlertConditionCritical | undefined>;

Identifies the threshold parameters for opening a critical alert violation. See Thresholds below for details.

property enabled

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

Whether the condition is turned on or off. Valid values are true and false. Defaults to true.

property event

public event: pulumi.Output<string>;

The metric event; for example, SystemSample or StorageSample. Supported by the infraMetric condition type.

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 integrationProvider

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

For alerts on integrations, use this instead of event. Supported by the infraMetric condition type.

property name

public name: pulumi.Output<string>;

The Infrastructure alert condition’s name.

property policyId

public policyId: pulumi.Output<number>;

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

property processWhere

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

Any filters applied to processes; for example: commandName = 'java'. Supported by the infraProcessRunning condition type.

property runbookUrl

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

Runbook URL to display in notifications.

property select

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

The attribute name to identify the metric being targeted; for example, cpuPercent, diskFreePercent, or memoryResidentSizeBytes. The underlying API will automatically populate this value for Infrastructure integrations (for example diskFreePercent), so make sure to explicitly include this value to avoid diff issues. Supported by the infraMetric condition type.

property type

public type: pulumi.Output<string>;

The type of Infrastructure alert condition. Valid values are infraProcessRunning, infraMetric, and infraHostNotReporting.

property updatedAt

public updatedAt: pulumi.Output<number>;

The timestamp the alert condition was last updated.

property urn

urn: Output<URN>;

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

property violationCloseTimer

public violationCloseTimer: pulumi.Output<number | undefined>;

Determines how much time will pass before a violation is automatically closed. Setting the time limit to 0 prevents a violation from being force-closed.

property warning

public warning: pulumi.Output<InfraAlertConditionWarning | undefined>;

Identifies the threshold parameters for opening a warning alert violation. See Thresholds below for details.

property where

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

If applicable, this identifies any Infrastructure host filters used; for example: hostname LIKE '%cassandra%'.

Resource NrqlAlertCondition

class NrqlAlertCondition extends CustomResource

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

Terms

The term mapping supports the following arguments:

  • duration - (Required) In minutes, must be in the range of 1 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.

NRQL

The nrql attribute supports the following arguments:

  • query - (Required) The NRQL query to execute for the condition.
  • sinceValue - (Required) The value to be used in the SINCE <X> MINUTES AGO clause for the NRQL query. Must be between 1 and 20.

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/r/nrql_alert_condition.html.markdown.

constructor

new NrqlAlertCondition(name: string, args: NrqlAlertConditionArgs, opts?: pulumi.CustomResourceOptions)

Create a NrqlAlertCondition 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?: NrqlAlertConditionState, opts?: pulumi.CustomResourceOptions): NrqlAlertCondition

Get an existing NrqlAlertCondition 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 NrqlAlertCondition

Returns true if the given object is an instance of NrqlAlertCondition. 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 to enable the alert condition.

property expectedGroups

public expectedGroups: pulumi.Output<number | undefined>;

Number of expected groups when using outlier detection.

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 ignoreOverlap

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

Whether to look for a convergence of groups when using outlier detection.

property name

public name: pulumi.Output<string>;

The title of the condition.

property nrql

public nrql: pulumi.Output<NrqlAlertConditionNrql>;

A NRQL query.

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<NrqlAlertConditionTerm[]>;

A list of terms for this condition.

property type

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

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 | undefined>;

Possible values are single_value, sum.

property violationTimeLimitSeconds

public violationTimeLimitSeconds: pulumi.Output<number | undefined>;

Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. Possible values are 3600, 7200, 14400, 28800, 43200, and 86400.

Resource Provider

class Provider extends ProviderResource

The provider type for the newrelic package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/index.html.markdown.

constructor

new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)

Create a Provider 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 getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

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

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

method register

static register(provider: ProviderResource | undefined): Promise<string | undefined>

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 urn

urn: Output<URN>;

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

Data Sources

Data Source getAlertChannel

getAlertChannel(args: GetAlertChannelArgs, opts?: pulumi.InvokeOptions): Promise<GetAlertChannelResult> & GetAlertChannelResult

Data Source getAlertPolicy

getAlertPolicy(args: GetAlertPolicyArgs, opts?: pulumi.InvokeOptions): Promise<GetAlertPolicyResult> & GetAlertPolicyResult

Data Source getApplication

getApplication(args: GetApplicationArgs, opts?: pulumi.InvokeOptions): Promise<GetApplicationResult> & GetApplicationResult

Data Source getKeyTransaction

getKeyTransaction(args: GetKeyTransactionArgs, opts?: pulumi.InvokeOptions): Promise<GetKeyTransactionResult> & GetKeyTransactionResult

Others

interface AlertChannelArgs

interface AlertChannelArgs

The set of arguments for constructing a AlertChannel resource.

property config

config?: pulumi.Input<AlertChannelConfig>;

A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.

property configuration

DEPRECATED use config block instead
configuration?: pulumi.Input<{[key: string]: any}>;

Deprecated (Optional) A map of key/value pairs with channel type specific values. This argument is deprecated. Use the config argument instead.

property name

name?: pulumi.Input<string>;

The name of the channel.

property type

type: pulumi.Input<string>;

The type of channel. One of: email, slack, opsgenie, pagerduty, victorops, or webhook.

interface AlertChannelState

interface AlertChannelState

Input properties used for looking up and filtering AlertChannel resources.

property config

config?: pulumi.Input<AlertChannelConfig>;

A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.

property configuration

DEPRECATED use config block instead
configuration?: pulumi.Input<{[key: string]: any}>;

Deprecated (Optional) A map of key/value pairs with channel type specific values. This argument is deprecated. Use the config argument instead.

property name

name?: pulumi.Input<string>;

The name of the channel.

property type

type?: pulumi.Input<string>;

The type of channel. One of: email, slack, opsgenie, pagerduty, victorops, or webhook.

interface AlertConditionArgs

interface AlertConditionArgs

The set of arguments for constructing a AlertCondition resource.

property conditionScope

conditionScope?: pulumi.Input<string>;

application or instance. Choose application for most scenarios. If you are using the JVM plugin in New Relic, the instance setting allows your condition to trigger for specific app instances.

property enabled

enabled?: pulumi.Input<boolean>;

Whether the condition is enabled or not. Defaults to true.

property entities

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

The instance IDs associated with this condition.

property gcMetric

gcMetric?: pulumi.Input<string>;

A valid Garbage Collection metric e.g. GC/G1 Young Generation.

property metric

metric: pulumi.Input<string>;

The metric field accepts parameters based on the type set. One of these metrics based on type: * apmAppMetric * apdex * errorPercentage * responseTimeBackground * responseTimeWeb * throughputBackground * throughputWeb * userDefined * apmKtMetric * apdex * errorCount * errorPercentage * responseTime * throughput * browserMetric * ajaxResponseTime * ajaxThroughput * domProcessing * endUserApdex * network * pageRendering * pageViewThroughput * pageViewsWithJsErrors * requestQueuing * totalPageLoad * userDefined * webApplication * mobileMetric * database * images * json * mobileCrashRate * networkErrorPercentage * network * statusErrorPercentage * userDefined * viewLoading

property name

name?: pulumi.Input<string>;

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

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 type

type: pulumi.Input<string>;

The type of condition. One of: apmAppMetric, apmKtMetric, browserMetric, mobileMetric

property userDefinedMetric

userDefinedMetric?: pulumi.Input<string>;

A custom metric to be evaluated.

property userDefinedValueFunction

userDefinedValueFunction?: pulumi.Input<string>;

One of: average, min, max, total, or sampleSize.

property violationCloseTimer

violationCloseTimer?: pulumi.Input<number>;

Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be: 1, 2, 4, 8, 12 or 24.

interface AlertConditionState

interface AlertConditionState

Input properties used for looking up and filtering AlertCondition resources.

property conditionScope

conditionScope?: pulumi.Input<string>;

application or instance. Choose application for most scenarios. If you are using the JVM plugin in New Relic, the instance setting allows your condition to trigger for specific app instances.

property enabled

enabled?: pulumi.Input<boolean>;

Whether the condition is enabled or not. Defaults to true.

property entities

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

The instance IDs associated with this condition.

property gcMetric

gcMetric?: pulumi.Input<string>;

A valid Garbage Collection metric e.g. GC/G1 Young Generation.

property metric

metric?: pulumi.Input<string>;

The metric field accepts parameters based on the type set. One of these metrics based on type: * apmAppMetric * apdex * errorPercentage * responseTimeBackground * responseTimeWeb * throughputBackground * throughputWeb * userDefined * apmKtMetric * apdex * errorCount * errorPercentage * responseTime * throughput * browserMetric * ajaxResponseTime * ajaxThroughput * domProcessing * endUserApdex * network * pageRendering * pageViewThroughput * pageViewsWithJsErrors * requestQueuing * totalPageLoad * userDefined * webApplication * mobileMetric * database * images * json * mobileCrashRate * networkErrorPercentage * network * statusErrorPercentage * userDefined * viewLoading

property name

name?: pulumi.Input<string>;

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

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 type

type?: pulumi.Input<string>;

The type of condition. One of: apmAppMetric, apmKtMetric, browserMetric, mobileMetric

property userDefinedMetric

userDefinedMetric?: pulumi.Input<string>;

A custom metric to be evaluated.

property userDefinedValueFunction

userDefinedValueFunction?: pulumi.Input<string>;

One of: average, min, max, total, or sampleSize.

property violationCloseTimer

violationCloseTimer?: pulumi.Input<number>;

Automatically close instance-based violations, including JVM health metric violations, after the number of hours specified. Must be: 1, 2, 4, 8, 12 or 24.

interface AlertPolicyArgs

interface AlertPolicyArgs

The set of arguments for constructing a AlertPolicy resource.

property channelIds

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

An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be imported via terraform import.

property incidentPreference

incidentPreference?: pulumi.Input<string>;

The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.

property name

name?: pulumi.Input<string>;

The name of the policy.

interface AlertPolicyChannelArgs

interface AlertPolicyChannelArgs

The set of arguments for constructing a AlertPolicyChannel resource.

property channelId

DEPRECATED use channel_ids argument instead
channelId?: pulumi.Input<number>;

Deprecated. The ID of the channel. Please use the channel_ids argument instead.

property channelIds

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

Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift your Terraform state.

property policyId

policyId: pulumi.Input<number>;

The ID of the policy.

interface AlertPolicyChannelState

interface AlertPolicyChannelState

Input properties used for looking up and filtering AlertPolicyChannel resources.

property channelId

DEPRECATED use channel_ids argument instead
channelId?: pulumi.Input<number>;

Deprecated. The ID of the channel. Please use the channel_ids argument instead.

property channelIds

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

Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift your Terraform state.

property policyId

policyId?: pulumi.Input<number>;

The ID of the policy.

interface AlertPolicyState

interface AlertPolicyState

Input properties used for looking up and filtering AlertPolicy resources.

property channelIds

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

An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be imported via terraform import.

property createdAt

createdAt?: pulumi.Input<string>;

The time the policy was created.

property incidentPreference

incidentPreference?: pulumi.Input<string>;

The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.

property name

name?: pulumi.Input<string>;

The name of the policy.

property updatedAt

updatedAt?: pulumi.Input<string>;

The time the policy was last updated.

interface DashboardArgs

interface DashboardArgs

The set of arguments for constructing a Dashboard resource.

property editable

editable?: pulumi.Input<string>;

Determines who can edit the dashboard in an account. Valid values are all, editableByAll, editableByOwner, or readOnly. Defaults to editableByAll.

property filter

filter?: pulumi.Input<DashboardFilter>;

A nested block that describes a dashboard filter. Exactly one nested filter block is allowed. See Nested filter block below for details.

property icon

icon?: pulumi.Input<string>;

The icon for the dashboard. Valid values are adjust, archive, bar-chart, bell, bolt, bug, bullhorn, bullseye, clock-o, cloud, cog, comments-o, crosshairs, dashboard, envelope, fire, flag, flask, globe, heart, leaf, legal, life-ring, line-chart, magic, mobile, money, none, paper-plane, pie-chart, puzzle-piece, road, rocket, shopping-cart, sitemap, sliders, tablet, thumbs-down, thumbs-up, trophy, usd, user, and users. Defaults to bar-chart.

property title

title: pulumi.Input<string>;

The title of the dashboard.

property visibility

visibility?: pulumi.Input<string>;

Determines who can see the dashboard in an account. Valid values are all or owner. Defaults to all.

property widgets

widgets?: pulumi.Input<pulumi.Input<DashboardWidget>[]>;

A nested block that describes a visualization. Up to 300 widget blocks are allowed in a dashboard definition. See Nested widget blocks below for details.

interface DashboardState

interface DashboardState

Input properties used for looking up and filtering Dashboard resources.

property dashboardUrl

dashboardUrl?: pulumi.Input<string>;

The URL for viewing the dashboard.

property editable

editable?: pulumi.Input<string>;

Determines who can edit the dashboard in an account. Valid values are all, editableByAll, editableByOwner, or readOnly. Defaults to editableByAll.

property filter

filter?: pulumi.Input<DashboardFilter>;

A nested block that describes a dashboard filter. Exactly one nested filter block is allowed. See Nested filter block below for details.

property icon

icon?: pulumi.Input<string>;

The icon for the dashboard. Valid values are adjust, archive, bar-chart, bell, bolt, bug, bullhorn, bullseye, clock-o, cloud, cog, comments-o, crosshairs, dashboard, envelope, fire, flag, flask, globe, heart, leaf, legal, life-ring, line-chart, magic, mobile, money, none, paper-plane, pie-chart, puzzle-piece, road, rocket, shopping-cart, sitemap, sliders, tablet, thumbs-down, thumbs-up, trophy, usd, user, and users. Defaults to bar-chart.

property title

title?: pulumi.Input<string>;

The title of the dashboard.

property visibility

visibility?: pulumi.Input<string>;

Determines who can see the dashboard in an account. Valid values are all or owner. Defaults to all.

property widgets

widgets?: pulumi.Input<pulumi.Input<DashboardWidget>[]>;

A nested block that describes a visualization. Up to 300 widget blocks are allowed in a dashboard definition. See Nested widget blocks below for details.

interface GetAlertChannelArgs

interface GetAlertChannelArgs

A collection of arguments for invoking getAlertChannel.

property name

name: string;

The name of the alert channel in New Relic.

interface GetAlertChannelResult

interface GetAlertChannelResult

A collection of values returned by getAlertChannel.

property config

config: GetAlertChannelConfig;

Alert channel configuration.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property name

name: string;

property policyIds

policyIds: number[];

A list of policy IDs associated with the alert channel.

property type

type: string;

Alert channel type, either: email, opsgenie, pagerduty, slack, victorops, or webhook.

interface GetAlertPolicyArgs

interface GetAlertPolicyArgs

A collection of arguments for invoking getAlertPolicy.

property incidentPreference

incidentPreference?: undefined | string;

property name

name: string;

The name of the alert policy in New Relic.

interface GetAlertPolicyResult

interface GetAlertPolicyResult

A collection of values returned by getAlertPolicy.

property createdAt

createdAt: string;

The time the policy was created.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property incidentPreference

incidentPreference?: undefined | string;

The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.

property name

name: string;

property updatedAt

updatedAt: string;

The time the policy was last updated.

interface GetApplicationArgs

interface GetApplicationArgs

A collection of arguments for invoking getApplication.

property name

name: string;

The name of the application in New Relic.

interface GetApplicationResult

interface GetApplicationResult

A collection of values returned by getApplication.

property hostIds

hostIds: number[];

A list of host IDs associated with the application.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property instanceIds

instanceIds: number[];

A list of instance IDs associated with the application.

property name

name: string;

function getEnv

getEnv(vars: string[]): string | undefined

function getEnvBoolean

getEnvBoolean(vars: string[]): boolean | undefined

function getEnvNumber

getEnvNumber(vars: string[]): number | undefined

interface GetKeyTransactionArgs

interface GetKeyTransactionArgs

A collection of arguments for invoking getKeyTransaction.

property name

name: string;

The name of the key transaction in New Relic.

interface GetKeyTransactionResult

interface GetKeyTransactionResult

A collection of values returned by getKeyTransaction.

property id

id: string;

id is the provider-assigned unique ID for this managed resource.

property name

name: string;

function getVersion

getVersion(): string

interface InfraAlertConditionArgs

interface InfraAlertConditionArgs

The set of arguments for constructing a InfraAlertCondition resource.

property comparison

comparison?: pulumi.Input<string>;

The operator used to evaluate the threshold value. Valid values are above, below, and equal. Supported by the infraMetric and infraProcessRunning condition types.

property critical

critical?: pulumi.Input<InfraAlertConditionCritical>;

Identifies the threshold parameters for opening a critical alert violation. See Thresholds below for details.

property enabled

enabled?: pulumi.Input<boolean>;

Whether the condition is turned on or off. Valid values are true and false. Defaults to true.

property event

event?: pulumi.Input<string>;

The metric event; for example, SystemSample or StorageSample. Supported by the infraMetric condition type.

property integrationProvider

integrationProvider?: pulumi.Input<string>;

For alerts on integrations, use this instead of event. Supported by the infraMetric condition type.

property name

name?: pulumi.Input<string>;

The Infrastructure alert condition’s name.

property policyId

policyId: pulumi.Input<number>;

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

property processWhere

processWhere?: pulumi.Input<string>;

Any filters applied to processes; for example: commandName = 'java'. Supported by the infraProcessRunning condition type.

property runbookUrl

runbookUrl?: pulumi.Input<string>;

Runbook URL to display in notifications.

property select

select?: pulumi.Input<string>;

The attribute name to identify the metric being targeted; for example, cpuPercent, diskFreePercent, or memoryResidentSizeBytes. The underlying API will automatically populate this value for Infrastructure integrations (for example diskFreePercent), so make sure to explicitly include this value to avoid diff issues. Supported by the infraMetric condition type.

property type

type: pulumi.Input<string>;

The type of Infrastructure alert condition. Valid values are infraProcessRunning, infraMetric, and infraHostNotReporting.

property violationCloseTimer

violationCloseTimer?: pulumi.Input<number>;

Determines how much time will pass before a violation is automatically closed. Setting the time limit to 0 prevents a violation from being force-closed.

property warning

warning?: pulumi.Input<InfraAlertConditionWarning>;

Identifies the threshold parameters for opening a warning alert violation. See Thresholds below for details.

property where

where?: pulumi.Input<string>;

If applicable, this identifies any Infrastructure host filters used; for example: hostname LIKE '%cassandra%'.

interface InfraAlertConditionState

interface InfraAlertConditionState

Input properties used for looking up and filtering InfraAlertCondition resources.

property comparison

comparison?: pulumi.Input<string>;

The operator used to evaluate the threshold value. Valid values are above, below, and equal. Supported by the infraMetric and infraProcessRunning condition types.

property createdAt

createdAt?: pulumi.Input<number>;

The timestamp the alert condition was created.

property critical

critical?: pulumi.Input<InfraAlertConditionCritical>;

Identifies the threshold parameters for opening a critical alert violation. See Thresholds below for details.

property enabled

enabled?: pulumi.Input<boolean>;

Whether the condition is turned on or off. Valid values are true and false. Defaults to true.

property event

event?: pulumi.Input<string>;

The metric event; for example, SystemSample or StorageSample. Supported by the infraMetric condition type.

property integrationProvider

integrationProvider?: pulumi.Input<string>;

For alerts on integrations, use this instead of event. Supported by the infraMetric condition type.

property name

name?: pulumi.Input<string>;

The Infrastructure alert condition’s name.

property policyId

policyId?: pulumi.Input<number>;

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

property processWhere

processWhere?: pulumi.Input<string>;

Any filters applied to processes; for example: commandName = 'java'. Supported by the infraProcessRunning condition type.

property runbookUrl

runbookUrl?: pulumi.Input<string>;

Runbook URL to display in notifications.

property select

select?: pulumi.Input<string>;

The attribute name to identify the metric being targeted; for example, cpuPercent, diskFreePercent, or memoryResidentSizeBytes. The underlying API will automatically populate this value for Infrastructure integrations (for example diskFreePercent), so make sure to explicitly include this value to avoid diff issues. Supported by the infraMetric condition type.

property type

type?: pulumi.Input<string>;

The type of Infrastructure alert condition. Valid values are infraProcessRunning, infraMetric, and infraHostNotReporting.

property updatedAt

updatedAt?: pulumi.Input<number>;

The timestamp the alert condition was last updated.

property violationCloseTimer

violationCloseTimer?: pulumi.Input<number>;

Determines how much time will pass before a violation is automatically closed. Setting the time limit to 0 prevents a violation from being force-closed.

property warning

warning?: pulumi.Input<InfraAlertConditionWarning>;

Identifies the threshold parameters for opening a warning alert violation. See Thresholds below for details.

property where

where?: pulumi.Input<string>;

If applicable, this identifies any Infrastructure host filters used; for example: hostname LIKE '%cassandra%'.

interface NrqlAlertConditionArgs

interface NrqlAlertConditionArgs

The set of arguments for constructing a NrqlAlertCondition resource.

property enabled

enabled?: pulumi.Input<boolean>;

Whether to enable the alert condition.

property expectedGroups

expectedGroups?: pulumi.Input<number>;

Number of expected groups when using outlier detection.

property ignoreOverlap

ignoreOverlap?: pulumi.Input<boolean>;

Whether to look for a convergence of groups when using outlier detection.

property name

name?: pulumi.Input<string>;

The title of the condition.

property nrql

nrql: pulumi.Input<NrqlAlertConditionNrql>;

A NRQL query.

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<NrqlAlertConditionTerm>[]>;

A list of terms for this condition.

property type

type?: pulumi.Input<string>;

property valueFunction

valueFunction?: pulumi.Input<string>;

Possible values are single_value, sum.

property violationTimeLimitSeconds

violationTimeLimitSeconds?: pulumi.Input<number>;

Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. Possible values are 3600, 7200, 14400, 28800, 43200, and 86400.

interface NrqlAlertConditionState

interface NrqlAlertConditionState

Input properties used for looking up and filtering NrqlAlertCondition resources.

property enabled

enabled?: pulumi.Input<boolean>;

Whether to enable the alert condition.

property expectedGroups

expectedGroups?: pulumi.Input<number>;

Number of expected groups when using outlier detection.

property ignoreOverlap

ignoreOverlap?: pulumi.Input<boolean>;

Whether to look for a convergence of groups when using outlier detection.

property name

name?: pulumi.Input<string>;

The title of the condition.

property nrql

nrql?: pulumi.Input<NrqlAlertConditionNrql>;

A NRQL query.

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<NrqlAlertConditionTerm>[]>;

A list of terms for this condition.

property type

type?: pulumi.Input<string>;

property valueFunction

valueFunction?: pulumi.Input<string>;

Possible values are single_value, sum.

property violationTimeLimitSeconds

violationTimeLimitSeconds?: pulumi.Input<number>;

Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. Possible values are 3600, 7200, 14400, 28800, 43200, and 86400.

interface ProviderArgs

interface ProviderArgs

The set of arguments for constructing a Provider resource.

property apiKey

apiKey?: pulumi.Input<string>;

property apiUrl

apiUrl?: pulumi.Input<string>;

property cacertFile

cacertFile?: pulumi.Input<string>;

property infraApiUrl

infraApiUrl?: pulumi.Input<string>;

property infrastructureApiUrl

infrastructureApiUrl?: pulumi.Input<string>;

property insecureSkipVerify

insecureSkipVerify?: pulumi.Input<boolean>;

property insightsAccountId

insightsAccountId?: pulumi.Input<string>;

property insightsInsertKey

insightsInsertKey?: pulumi.Input<string>;

property insightsInsertUrl

insightsInsertUrl?: pulumi.Input<string>;

property insightsQueryKey

insightsQueryKey?: pulumi.Input<string>;

property insightsQueryUrl

insightsQueryUrl?: pulumi.Input<string>;

property nerdgraphApiUrl

nerdgraphApiUrl?: pulumi.Input<string>;

property personalApiKey

personalApiKey?: pulumi.Input<string>;

property syntheticsApiUrl

syntheticsApiUrl?: pulumi.Input<string>;