Module synthetics
This page documents the language specification for the newrelic package. If you're looking for help working with the inputs, outputs, or functions of newrelic resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-newrelicrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-newrelicrepo.
Resources
Functions
Others
- AlertConditionArgs
- AlertConditionState
- GetMonitorArgs
- GetMonitorResult
- GetSecureCredentialArgs
- GetSecureCredentialResult
- LabelArgs
- LabelState
- MonitorArgs
- MonitorScriptArgs
- MonitorScriptState
- MonitorState
- SecureCredentialArgs
- SecureCredentialState
Resources
Resource AlertCondition
class AlertCondition extends CustomResourceUse this resource to create and manage synthetics alert conditions in New Relic.
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("fooAlertCondition", {
policyId: newrelic_alert_policy.foo.id,
monitorId: fooMonitor.then(fooMonitor => fooMonitor.id),
runbookUrl: "https://www.example.com",
});constructor
new AlertCondition(name: string, args: AlertConditionArgs, opts?: pulumi.CustomResourceOptions)Create a AlertCondition resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): AlertConditionGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is AlertConditionReturns 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 Label
class Label extends CustomResourceUse this resource to create, update, and delete a Synthetics label in New Relic.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.synthetics.Label("foo", {
monitorId: newrelic_synthetics_monitor.foo.id,
type: "MyCategory",
value: "MyValue",
});constructor
new Label(name: string, args: LabelArgs, opts?: pulumi.CustomResourceOptions)Create a Label resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LabelState, opts?: pulumi.CustomResourceOptions): LabelGet an existing Label resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is LabelReturns true if the given object is an instance of Label. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property href
public href: pulumi.Output<string>;The URL of the Synthetics label.
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 that will be assigned the label.
property type
public type: pulumi.Output<string>;A string representing the label key/category.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property value
public value: pulumi.Output<string>;A string representing the label value.
Resource Monitor
class Monitor extends CustomResourceUse this resource to create, update, and delete a synthetics monitor in New Relic.
Example Usage
Type: SIMPLE
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",
"AWS_US_EAST_2",
],
status: "ENABLED",
type: "SIMPLE",
uri: "https://example.com", // Required for type "SIMPLE" and "BROWSER"
validationString: "add example validation check here", // Optional for type "SIMPLE" and "BROWSER"
verifySsl: true, // Optional for type "SIMPLE" and "BROWSER"
});Additional Examples
Type: BROWSER
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.synthetics.Monitor("foo", {
bypassHeadRequest: true, // Note: optional for type "BROWSER" only
frequency: 5,
locations: ["AWS_US_EAST_1"],
status: "ENABLED",
treatRedirectAsFailure: true, // Note: optional for type "BROWSER" only
type: "BROWSER",
uri: "https://example.com", // required for type "SIMPLE" and "BROWSER"
validationString: "add example validation check here", // optional for type "SIMPLE" and "BROWSER"
verifySsl: true, // optional for type "SIMPLE" and "BROWSER"
});Type: SCRIPT_BROWSER
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: "SCRIPT_BROWSER",
});Type: SCRIPT_API
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: "SCRIPT_API",
});constructor
new Monitor(name: string, args: MonitorArgs, opts?: pulumi.CustomResourceOptions)Create a Monitor resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): MonitorGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is MonitorReturns 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. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
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 CustomResourceUse this resource to update a synthetics monitor script in New Relic.
constructor
new MonitorScript(name: string, args: MonitorScriptArgs, opts?: pulumi.CustomResourceOptions)Create a MonitorScript resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): MonitorScriptGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is MonitorScriptReturns 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>;The plaintext representing 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.
Resource SecureCredential
class SecureCredential extends CustomResourceUse this resource to create and manage New Relic Synthetic secure credentials.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.synthetics.SecureCredential("foo", {
description: "My description",
key: "MY_KEY",
value: "My value",
});constructor
new SecureCredential(name: string, args: SecureCredentialArgs, opts?: pulumi.CustomResourceOptions)Create a SecureCredential resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SecureCredentialState, opts?: pulumi.CustomResourceOptions): SecureCredentialGet an existing SecureCredential resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SecureCredentialReturns true if the given object is an instance of SecureCredential. 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 secure credential was created.
property description
public description: pulumi.Output<string | undefined>;The secure credential’s description.
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 key
public key: pulumi.Output<string>;The secure credential’s key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
property lastUpdated
public lastUpdated: pulumi.Output<string>;The time the secure credential 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 value
public value: pulumi.Output<string>;The secure credential’s value.
Functions
Function getMonitor
getMonitor(args: GetMonitorArgs, opts?: pulumi.InvokeOptions): Promise<GetMonitorResult>Use this data source to get information about a specific synthetics monitor in New Relic that already exists. This can 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", {
policyId: newrelic_alert_policy.foo.id,
monitorId: bar.then(bar => bar.id),
runbookUrl: "https://www.example.com",
});Function getSecureCredential
getSecureCredential(args: GetSecureCredentialArgs, opts?: pulumi.InvokeOptions): Promise<GetSecureCredentialResult>Use this data source to get information about a specific Synthetics secure credential in New Relic that already exists.
Note that the secure credential’s value is not returned as an attribute for security reasons.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = pulumi.output(newrelic.synthetics.getSecureCredential({
key: "MY_KEY",
}, { async: true }));Others
interface AlertConditionArgs
interface AlertConditionArgsThe 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 AlertConditionStateInput 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 GetMonitorArgsA collection of arguments for invoking getMonitor.
property name
name: string;The name of the synthetics monitor in New Relic.
interface GetMonitorResult
interface GetMonitorResultA collection of values returned by getMonitor.
property id
id: string;The provider-assigned unique ID for this managed resource.
property monitorId
monitorId: string;The ID of the synthetics monitor.
property name
name: string;interface GetSecureCredentialArgs
interface GetSecureCredentialArgsA collection of arguments for invoking getSecureCredential.
property key
key: string;The secure credential’s key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
interface GetSecureCredentialResult
interface GetSecureCredentialResultA collection of values returned by getSecureCredential.
property createdAt
createdAt: string;The time the secure credential was created.
property description
description: string;The secure credential’s description.
property id
id: string;The provider-assigned unique ID for this managed resource.
property key
key: string;property lastUpdated
lastUpdated: string;The time the secure credential was last updated.
interface LabelArgs
interface LabelArgsThe set of arguments for constructing a Label resource.
property monitorId
monitorId: pulumi.Input<string>;The ID of the monitor that will be assigned the label.
property type
type: pulumi.Input<string>;A string representing the label key/category.
property value
value: pulumi.Input<string>;A string representing the label value.
interface LabelState
interface LabelStateInput properties used for looking up and filtering Label resources.
property href
href?: pulumi.Input<string>;The URL of the Synthetics label.
property monitorId
monitorId?: pulumi.Input<string>;The ID of the monitor that will be assigned the label.
property type
type?: pulumi.Input<string>;A string representing the label key/category.
property value
value?: pulumi.Input<string>;A string representing the label value.
interface MonitorArgs
interface MonitorArgsThe 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. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
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 MonitorScriptArgsThe 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>;The plaintext representing the monitor script.
interface MonitorScriptState
interface MonitorScriptStateInput 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>;The plaintext representing the monitor script.
interface MonitorState
interface MonitorStateInput 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. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
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 SecureCredentialArgs
interface SecureCredentialArgsThe set of arguments for constructing a SecureCredential resource.
property createdAt
createdAt?: pulumi.Input<string>;The time the secure credential was created.
property description
description?: pulumi.Input<string>;The secure credential’s description.
property key
key: pulumi.Input<string>;The secure credential’s key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
property lastUpdated
lastUpdated?: pulumi.Input<string>;The time the secure credential was last updated.
property value
value: pulumi.Input<string>;The secure credential’s value.
interface SecureCredentialState
interface SecureCredentialStateInput properties used for looking up and filtering SecureCredential resources.
property createdAt
createdAt?: pulumi.Input<string>;The time the secure credential was created.
property description
description?: pulumi.Input<string>;The secure credential’s description.
property key
key?: pulumi.Input<string>;The secure credential’s key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
property lastUpdated
lastUpdated?: pulumi.Input<string>;The time the secure credential was last updated.
property value
value?: pulumi.Input<string>;The secure credential’s value.