Module synthetics

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

Resources

Data Sources

Others

Resources

Resource AlertCondition

class AlertCondition extends CustomResource

Example Usage

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

const fooMonitor = newrelic.synthetics.getMonitor({
    name: "foo",
});
const fooAlertCondition = new newrelic.synthetics.AlertCondition("foo", {
    monitorId: fooMonitor.id,
    policyId: newrelic_alert_policy_foo.id,
    runbookUrl: "https://www.example.com",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-newrelic/blob/master/website/docs/r/synthetics_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): boolean

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

property enabled

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

Set whether to enable the alert condition. Defaults to true.

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 monitorId

public monitorId: pulumi.Output<string>;

The ID of the Synthetics monitor to be referenced in the alert condition.

property name

public name: pulumi.Output<string>;

The title of this condition.

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 urn

urn: Output<URN>;

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

Resource Monitor

class Monitor extends CustomResource

Use this resource to create, update, and delete a synthetics monitor in New Relic.

Example Usage

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

const foo = new newrelic.synthetics.Monitor("foo", {
    frequency: 5,
    locations: ["AWS_US_EAST_1"],
    status: "ENABLED",
    type: "SIMPLE",
});

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

constructor

new Monitor(name: string, args: MonitorArgs, opts?: pulumi.CustomResourceOptions)

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

Get an existing Monitor 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): boolean

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

property bypassHeadRequest

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

Bypass HEAD request.

property frequency

public frequency: pulumi.Output<number>;

The interval (in minutes) at which this monitor should run.

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 locations

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

The locations in which this monitor should be run.

property name

public name: pulumi.Output<string>;

The title of this monitor.

property slaThreshold

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

The base threshold for the SLA report.

property status

public status: pulumi.Output<string>;

The monitor status (i.e. ENABLED, MUTED, DISABLED)

property treatRedirectAsFailure

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

Fail the monitor check if redirected.

property type

public type: pulumi.Output<string>;

The monitor type (i.e. SIMPLE, BROWSER, SCRIPT_API, SCRIPT_BROWSER).

property uri

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

The URI for the monitor to hit.

property urn

urn: Output<URN>;

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

property validationString

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

The string to validate against in the response.

property verifySsl

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

Verify SSL.

Resource MonitorScript

class MonitorScript extends CustomResource

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

constructor

new MonitorScript(name: string, args: MonitorScriptArgs, opts?: pulumi.CustomResourceOptions)

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

Get an existing MonitorScript 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): boolean

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

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 monitorId

public monitorId: pulumi.Output<string>;

The ID of the monitor to attach the script to.

property text

public text: pulumi.Output<string>;

plaintext of the monitor script.

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 getMonitor

getMonitor(args: GetMonitorArgs, opts?: pulumi.InvokeOptions): Promise<GetMonitorResult> & GetMonitorResult

Use this data source to get information about a specific synthetics monitor in New Relic. This can then be used to set up a synthetics alert condition.

Example Usage

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

const bar = newrelic.synthetics.getMonitor({
    name: "bar",
});
const baz = new newrelic.synthetics.AlertCondition("baz", {
    monitorId: bar.id,
    policyId: newrelic_alert_policy_foo.id,
    runbookUrl: "https://www.example.com",
});

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

Others

interface AlertConditionArgs

interface AlertConditionArgs

The set of arguments for constructing a AlertCondition resource.

property enabled

enabled?: pulumi.Input<boolean>;

Set whether to enable the alert condition. Defaults to true.

property monitorId

monitorId: pulumi.Input<string>;

The ID of the Synthetics monitor to be referenced in the alert condition.

property name

name?: pulumi.Input<string>;

The title of this condition.

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.

interface AlertConditionState

interface AlertConditionState

Input properties used for looking up and filtering AlertCondition resources.

property enabled

enabled?: pulumi.Input<boolean>;

Set whether to enable the alert condition. Defaults to true.

property monitorId

monitorId?: pulumi.Input<string>;

The ID of the Synthetics monitor to be referenced in the alert condition.

property name

name?: pulumi.Input<string>;

The title of this condition.

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.

interface GetMonitorArgs

interface GetMonitorArgs

A collection of arguments for invoking getMonitor.

property name

name: string;

The name of the synthetics monitor in New Relic.

interface GetMonitorResult

interface GetMonitorResult

A collection of values returned by getMonitor.

property id

id: string;

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

property monitorId

monitorId: string;

property name

name: string;

interface MonitorArgs

interface MonitorArgs

The set of arguments for constructing a Monitor resource.

property bypassHeadRequest

bypassHeadRequest?: pulumi.Input<boolean>;

Bypass HEAD request.

property frequency

frequency: pulumi.Input<number>;

The interval (in minutes) at which this monitor should run.

property locations

locations: pulumi.Input<pulumi.Input<string>[]>;

The locations in which this monitor should be run.

property name

name?: pulumi.Input<string>;

The title of this monitor.

property slaThreshold

slaThreshold?: pulumi.Input<number>;

The base threshold for the SLA report.

property status

status: pulumi.Input<string>;

The monitor status (i.e. ENABLED, MUTED, DISABLED)

property treatRedirectAsFailure

treatRedirectAsFailure?: pulumi.Input<boolean>;

Fail the monitor check if redirected.

property type

type: pulumi.Input<string>;

The monitor type (i.e. SIMPLE, BROWSER, SCRIPT_API, SCRIPT_BROWSER).

property uri

uri?: pulumi.Input<string>;

The URI for the monitor to hit.

property validationString

validationString?: pulumi.Input<string>;

The string to validate against in the response.

property verifySsl

verifySsl?: pulumi.Input<boolean>;

Verify SSL.

interface MonitorScriptArgs

interface MonitorScriptArgs

The set of arguments for constructing a MonitorScript resource.

property monitorId

monitorId: pulumi.Input<string>;

The ID of the monitor to attach the script to.

property text

text: pulumi.Input<string>;

plaintext of the monitor script.

interface MonitorScriptState

interface MonitorScriptState

Input properties used for looking up and filtering MonitorScript resources.

property monitorId

monitorId?: pulumi.Input<string>;

The ID of the monitor to attach the script to.

property text

text?: pulumi.Input<string>;

plaintext of the monitor script.

interface MonitorState

interface MonitorState

Input properties used for looking up and filtering Monitor resources.

property bypassHeadRequest

bypassHeadRequest?: pulumi.Input<boolean>;

Bypass HEAD request.

property frequency

frequency?: pulumi.Input<number>;

The interval (in minutes) at which this monitor should run.

property locations

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

The locations in which this monitor should be run.

property name

name?: pulumi.Input<string>;

The title of this monitor.

property slaThreshold

slaThreshold?: pulumi.Input<number>;

The base threshold for the SLA report.

property status

status?: pulumi.Input<string>;

The monitor status (i.e. ENABLED, MUTED, DISABLED)

property treatRedirectAsFailure

treatRedirectAsFailure?: pulumi.Input<boolean>;

Fail the monitor check if redirected.

property type

type?: pulumi.Input<string>;

The monitor type (i.e. SIMPLE, BROWSER, SCRIPT_API, SCRIPT_BROWSER).

property uri

uri?: pulumi.Input<string>;

The URI for the monitor to hit.

property validationString

validationString?: pulumi.Input<string>;

The string to validate against in the response.

property verifySsl

verifySsl?: pulumi.Input<boolean>;

Verify SSL.