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", {
    configuration: {
        include_json_attachment: "1",
        recipients: "foo@example.com",
    },
    type: "email",
});

See additional examples.

Channel Configurations

Each supported channel supports a particular set of configuration arguments.

  • email
    • recipients - (Required) Comma delimited list of email addresses.
    • includeJsonAttachment - (Optional) 0 or 1. Flag for whether or not to attach a JSON document containing information about the associated alert to the email that is sent to recipients. Default: 0
  • slack
    • url - (Required) Your organization’s Slack URL.
    • channel - (Required) The Slack channel for which to send notifications.
  • opsgenie
    • apiKey - (Required) Your OpsGenie API key.
    • teams - (Optional) Comma delimited list of teams.
    • tags - (Optional) Comma delimited list of tags.
    • recipients - (Optional) Comma delimited list of email addresses.
  • pagerduty
    • serviceKey - (Required) Your PagerDuty service key.
  • victorops
    • key - (Required) Your VictorOps key.
    • routeKey - (Required) The route for which to send notifications.

Additional Examples

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

const foo = new newrelic.AlertChannel("foo", {
    configuration: {
        channel: "example-alerts-channel",
        url: "https://<YourOrganization>.slack.com",
    },
    type: "slack",
});
OpsGenie
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = new newrelic.AlertChannel("foo", {
    configuration: {
        api_key: "abc123",
        recipients: "user1@domain.com, user2@domain.com",
        tags: "tag1, tag2",
        teams: "team1, team2",
    },
    type: "opsgenie",
});
PagerDuty
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = new newrelic.AlertChannel("foo", {
    configuration: {
        service_key: "abc123",
    },
    type: "pagerduty",
});
VictorOps
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = new newrelic.AlertChannel("foo", {
    configuration: {
        key: "abc123",
        route_key: "/example",
    },
    type: "victorops",
});

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 configuration

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

A map of key / value pairs with channel type specific values. See channel configurations for specific configurations for the different channel types.

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.
  • 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>;

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. This is required if you are using apmJvmMetric with gcCpuTime 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 metric

public metric: pulumi.Output<string>;

The metric field accepts parameters based on the type set.

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, apmJvmMetric, apmKtMetric, serversMetric, 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", {});

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

The ID of the channel.

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

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

property critical

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

Identifies the threshold parameters for opening a critial 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>;

property urn

urn: Output<URN>;

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

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

property expectedGroups

public expectedGroups: pulumi.Output<number | 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 ignoreOverlap

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

property name

public name: pulumi.Output<string>;

property nrql

public nrql: pulumi.Output<NrqlAlertConditionNrql>;

property policyId

public policyId: pulumi.Output<number>;

property runbookUrl

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

property terms

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

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

property violationTimeLimitSeconds

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

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

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

Data Source getAlertPolicy

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

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

Data Source getApplication

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

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

Data Source getKeyTransaction

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

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

Others

interface AlertChannelArgs

interface AlertChannelArgs

The set of arguments for constructing a AlertChannel resource.

property configuration

configuration: pulumi.Input<{[key: string]: any}>;

A map of key / value pairs with channel type specific values. See channel configurations for specific configurations for the different channel types.

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 configuration

configuration?: pulumi.Input<{[key: string]: any}>;

A map of key / value pairs with channel type specific values. See channel configurations for specific configurations for the different channel types.

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

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. This is required if you are using apmJvmMetric with gcCpuTime condition type.

property metric

metric: pulumi.Input<string>;

The metric field accepts parameters based on the type set.

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, apmJvmMetric, apmKtMetric, serversMetric, 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>;

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. This is required if you are using apmJvmMetric with gcCpuTime condition type.

property metric

metric?: pulumi.Input<string>;

The metric field accepts parameters based on the type set.

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, apmJvmMetric, apmKtMetric, serversMetric, 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 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

channelId: pulumi.Input<number>;

The ID of the channel.

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

channelId?: pulumi.Input<number>;

The ID of the channel.

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

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 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 application 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 critial 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 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>;

property critical

critical?: pulumi.Input<InfraAlertConditionCritical>;

Identifies the threshold parameters for opening a critial 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>;

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

property expectedGroups

expectedGroups?: pulumi.Input<number>;

property ignoreOverlap

ignoreOverlap?: pulumi.Input<boolean>;

property name

name?: pulumi.Input<string>;

property nrql

nrql: pulumi.Input<NrqlAlertConditionNrql>;

property policyId

policyId: pulumi.Input<number>;

property runbookUrl

runbookUrl?: pulumi.Input<string>;

property terms

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

property type

type?: pulumi.Input<string>;

property valueFunction

valueFunction?: pulumi.Input<string>;

property violationTimeLimitSeconds

violationTimeLimitSeconds?: pulumi.Input<number>;

interface NrqlAlertConditionState

interface NrqlAlertConditionState

Input properties used for looking up and filtering NrqlAlertCondition resources.

property enabled

enabled?: pulumi.Input<boolean>;

property expectedGroups

expectedGroups?: pulumi.Input<number>;

property ignoreOverlap

ignoreOverlap?: pulumi.Input<boolean>;

property name

name?: pulumi.Input<string>;

property nrql

nrql?: pulumi.Input<NrqlAlertConditionNrql>;

property policyId

policyId?: pulumi.Input<number>;

property runbookUrl

runbookUrl?: pulumi.Input<string>;

property terms

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

property type

type?: pulumi.Input<string>;

property valueFunction

valueFunction?: pulumi.Input<string>;

property violationTimeLimitSeconds

violationTimeLimitSeconds?: pulumi.Input<number>;

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