newrelic.synthetics.ScriptMonitor
Explore with Pulumi AI
Example Usage
Type: SCRIPT_API
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
status: "ENABLED",
name: "script_monitor",
type: "SCRIPT_API",
locationsPublics: [
"AP_SOUTH_1",
"AP_EAST_1",
],
period: "EVERY_6_HOURS",
script: "console.log('it works!')",
scriptLanguage: "JAVASCRIPT",
runtimeType: "NODE_API",
runtimeTypeVersion: "16.10",
tags: [{
key: "some_key",
values: ["some_value"],
}],
});
import pulumi
import pulumi_newrelic as newrelic
monitor = newrelic.synthetics.ScriptMonitor("monitor",
status="ENABLED",
name="script_monitor",
type="SCRIPT_API",
locations_publics=[
"AP_SOUTH_1",
"AP_EAST_1",
],
period="EVERY_6_HOURS",
script="console.log('it works!')",
script_language="JAVASCRIPT",
runtime_type="NODE_API",
runtime_type_version="16.10",
tags=[{
"key": "some_key",
"values": ["some_value"],
}])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic/synthetics"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := synthetics.NewScriptMonitor(ctx, "monitor", &synthetics.ScriptMonitorArgs{
Status: pulumi.String("ENABLED"),
Name: pulumi.String("script_monitor"),
Type: pulumi.String("SCRIPT_API"),
LocationsPublics: pulumi.StringArray{
pulumi.String("AP_SOUTH_1"),
pulumi.String("AP_EAST_1"),
},
Period: pulumi.String("EVERY_6_HOURS"),
Script: pulumi.String("console.log('it works!')"),
ScriptLanguage: pulumi.String("JAVASCRIPT"),
RuntimeType: pulumi.String("NODE_API"),
RuntimeTypeVersion: pulumi.String("16.10"),
Tags: synthetics.ScriptMonitorTagArray{
&synthetics.ScriptMonitorTagArgs{
Key: pulumi.String("some_key"),
Values: pulumi.StringArray{
pulumi.String("some_value"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var monitor = new NewRelic.Synthetics.ScriptMonitor("monitor", new()
{
Status = "ENABLED",
Name = "script_monitor",
Type = "SCRIPT_API",
LocationsPublics = new[]
{
"AP_SOUTH_1",
"AP_EAST_1",
},
Period = "EVERY_6_HOURS",
Script = "console.log('it works!')",
ScriptLanguage = "JAVASCRIPT",
RuntimeType = "NODE_API",
RuntimeTypeVersion = "16.10",
Tags = new[]
{
new NewRelic.Synthetics.Inputs.ScriptMonitorTagArgs
{
Key = "some_key",
Values = new[]
{
"some_value",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.synthetics.ScriptMonitor;
import com.pulumi.newrelic.synthetics.ScriptMonitorArgs;
import com.pulumi.newrelic.synthetics.inputs.ScriptMonitorTagArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var monitor = new ScriptMonitor("monitor", ScriptMonitorArgs.builder()
.status("ENABLED")
.name("script_monitor")
.type("SCRIPT_API")
.locationsPublics(
"AP_SOUTH_1",
"AP_EAST_1")
.period("EVERY_6_HOURS")
.script("console.log('it works!')")
.scriptLanguage("JAVASCRIPT")
.runtimeType("NODE_API")
.runtimeTypeVersion("16.10")
.tags(ScriptMonitorTagArgs.builder()
.key("some_key")
.values("some_value")
.build())
.build());
}
}
resources:
monitor:
type: newrelic:synthetics:ScriptMonitor
properties:
status: ENABLED
name: script_monitor
type: SCRIPT_API
locationsPublics:
- AP_SOUTH_1
- AP_EAST_1
period: EVERY_6_HOURS
script: console.log('it works!')
scriptLanguage: JAVASCRIPT
runtimeType: NODE_API
runtimeTypeVersion: '16.10'
tags:
- key: some_key
values:
- some_value
Type: SCRIPT_BROWSER
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
status: "ENABLED",
name: "script_monitor",
type: "SCRIPT_BROWSER",
locationsPublics: [
"AP_SOUTH_1",
"AP_EAST_1",
],
period: "EVERY_HOUR",
script: "$browser.get('https://one.newrelic.com')",
runtimeTypeVersion: "100",
runtimeType: "CHROME_BROWSER",
scriptLanguage: "JAVASCRIPT",
devices: [
"DESKTOP",
"MOBILE_PORTRAIT",
"TABLET_LANDSCAPE",
],
browsers: ["CHROME"],
enableScreenshotOnFailureAndScript: false,
tags: [{
key: "some_key",
values: ["some_value"],
}],
});
import pulumi
import pulumi_newrelic as newrelic
monitor = newrelic.synthetics.ScriptMonitor("monitor",
status="ENABLED",
name="script_monitor",
type="SCRIPT_BROWSER",
locations_publics=[
"AP_SOUTH_1",
"AP_EAST_1",
],
period="EVERY_HOUR",
script="$browser.get('https://one.newrelic.com')",
runtime_type_version="100",
runtime_type="CHROME_BROWSER",
script_language="JAVASCRIPT",
devices=[
"DESKTOP",
"MOBILE_PORTRAIT",
"TABLET_LANDSCAPE",
],
browsers=["CHROME"],
enable_screenshot_on_failure_and_script=False,
tags=[{
"key": "some_key",
"values": ["some_value"],
}])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic/synthetics"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := synthetics.NewScriptMonitor(ctx, "monitor", &synthetics.ScriptMonitorArgs{
Status: pulumi.String("ENABLED"),
Name: pulumi.String("script_monitor"),
Type: pulumi.String("SCRIPT_BROWSER"),
LocationsPublics: pulumi.StringArray{
pulumi.String("AP_SOUTH_1"),
pulumi.String("AP_EAST_1"),
},
Period: pulumi.String("EVERY_HOUR"),
Script: pulumi.String("$browser.get('https://one.newrelic.com')"),
RuntimeTypeVersion: pulumi.String("100"),
RuntimeType: pulumi.String("CHROME_BROWSER"),
ScriptLanguage: pulumi.String("JAVASCRIPT"),
Devices: pulumi.StringArray{
pulumi.String("DESKTOP"),
pulumi.String("MOBILE_PORTRAIT"),
pulumi.String("TABLET_LANDSCAPE"),
},
Browsers: pulumi.StringArray{
pulumi.String("CHROME"),
},
EnableScreenshotOnFailureAndScript: pulumi.Bool(false),
Tags: synthetics.ScriptMonitorTagArray{
&synthetics.ScriptMonitorTagArgs{
Key: pulumi.String("some_key"),
Values: pulumi.StringArray{
pulumi.String("some_value"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var monitor = new NewRelic.Synthetics.ScriptMonitor("monitor", new()
{
Status = "ENABLED",
Name = "script_monitor",
Type = "SCRIPT_BROWSER",
LocationsPublics = new[]
{
"AP_SOUTH_1",
"AP_EAST_1",
},
Period = "EVERY_HOUR",
Script = "$browser.get('https://one.newrelic.com')",
RuntimeTypeVersion = "100",
RuntimeType = "CHROME_BROWSER",
ScriptLanguage = "JAVASCRIPT",
Devices = new[]
{
"DESKTOP",
"MOBILE_PORTRAIT",
"TABLET_LANDSCAPE",
},
Browsers = new[]
{
"CHROME",
},
EnableScreenshotOnFailureAndScript = false,
Tags = new[]
{
new NewRelic.Synthetics.Inputs.ScriptMonitorTagArgs
{
Key = "some_key",
Values = new[]
{
"some_value",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.synthetics.ScriptMonitor;
import com.pulumi.newrelic.synthetics.ScriptMonitorArgs;
import com.pulumi.newrelic.synthetics.inputs.ScriptMonitorTagArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var monitor = new ScriptMonitor("monitor", ScriptMonitorArgs.builder()
.status("ENABLED")
.name("script_monitor")
.type("SCRIPT_BROWSER")
.locationsPublics(
"AP_SOUTH_1",
"AP_EAST_1")
.period("EVERY_HOUR")
.script("$browser.get('https://one.newrelic.com')")
.runtimeTypeVersion("100")
.runtimeType("CHROME_BROWSER")
.scriptLanguage("JAVASCRIPT")
.devices(
"DESKTOP",
"MOBILE_PORTRAIT",
"TABLET_LANDSCAPE")
.browsers("CHROME")
.enableScreenshotOnFailureAndScript(false)
.tags(ScriptMonitorTagArgs.builder()
.key("some_key")
.values("some_value")
.build())
.build());
}
}
resources:
monitor:
type: newrelic:synthetics:ScriptMonitor
properties:
status: ENABLED
name: script_monitor
type: SCRIPT_BROWSER
locationsPublics:
- AP_SOUTH_1
- AP_EAST_1
period: EVERY_HOUR
script: $browser.get('https://one.newrelic.com')
runtimeTypeVersion: '100'
runtimeType: CHROME_BROWSER
scriptLanguage: JAVASCRIPT
devices:
- DESKTOP
- MOBILE_PORTRAIT
- TABLET_LANDSCAPE
browsers:
- CHROME
enableScreenshotOnFailureAndScript: false
tags:
- key: some_key
values:
- some_value
See additional examples.
Additional Examples
Create a monitor with a private location
The below example shows how you can define a private location and attach it to a monitor.
NOTE: It can take up to 10 minutes for a private location to become available.
Type: SCRIPT_API
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const location = new newrelic.synthetics.PrivateLocation("location", {
description: "Example private location",
name: "private_location",
verifiedScriptExecution: true,
});
const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
status: "ENABLED",
name: "script_monitor",
type: "SCRIPT_API",
locationPrivates: [{
guid: location.id,
vsePassword: "secret",
}],
period: "EVERY_6_HOURS",
script: "console.log('terraform integration test updated')",
scriptLanguage: "JAVASCRIPT",
runtimeType: "NODE_API",
runtimeTypeVersion: "16.10",
tags: [{
key: "some_key",
values: ["some_value"],
}],
});
import pulumi
import pulumi_newrelic as newrelic
location = newrelic.synthetics.PrivateLocation("location",
description="Example private location",
name="private_location",
verified_script_execution=True)
monitor = newrelic.synthetics.ScriptMonitor("monitor",
status="ENABLED",
name="script_monitor",
type="SCRIPT_API",
location_privates=[{
"guid": location.id,
"vse_password": "secret",
}],
period="EVERY_6_HOURS",
script="console.log('terraform integration test updated')",
script_language="JAVASCRIPT",
runtime_type="NODE_API",
runtime_type_version="16.10",
tags=[{
"key": "some_key",
"values": ["some_value"],
}])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic/synthetics"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
location, err := synthetics.NewPrivateLocation(ctx, "location", &synthetics.PrivateLocationArgs{
Description: pulumi.String("Example private location"),
Name: pulumi.String("private_location"),
VerifiedScriptExecution: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = synthetics.NewScriptMonitor(ctx, "monitor", &synthetics.ScriptMonitorArgs{
Status: pulumi.String("ENABLED"),
Name: pulumi.String("script_monitor"),
Type: pulumi.String("SCRIPT_API"),
LocationPrivates: synthetics.ScriptMonitorLocationPrivateArray{
&synthetics.ScriptMonitorLocationPrivateArgs{
Guid: location.ID(),
VsePassword: pulumi.String("secret"),
},
},
Period: pulumi.String("EVERY_6_HOURS"),
Script: pulumi.String("console.log('terraform integration test updated')"),
ScriptLanguage: pulumi.String("JAVASCRIPT"),
RuntimeType: pulumi.String("NODE_API"),
RuntimeTypeVersion: pulumi.String("16.10"),
Tags: synthetics.ScriptMonitorTagArray{
&synthetics.ScriptMonitorTagArgs{
Key: pulumi.String("some_key"),
Values: pulumi.StringArray{
pulumi.String("some_value"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var location = new NewRelic.Synthetics.PrivateLocation("location", new()
{
Description = "Example private location",
Name = "private_location",
VerifiedScriptExecution = true,
});
var monitor = new NewRelic.Synthetics.ScriptMonitor("monitor", new()
{
Status = "ENABLED",
Name = "script_monitor",
Type = "SCRIPT_API",
LocationPrivates = new[]
{
new NewRelic.Synthetics.Inputs.ScriptMonitorLocationPrivateArgs
{
Guid = location.Id,
VsePassword = "secret",
},
},
Period = "EVERY_6_HOURS",
Script = "console.log('terraform integration test updated')",
ScriptLanguage = "JAVASCRIPT",
RuntimeType = "NODE_API",
RuntimeTypeVersion = "16.10",
Tags = new[]
{
new NewRelic.Synthetics.Inputs.ScriptMonitorTagArgs
{
Key = "some_key",
Values = new[]
{
"some_value",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.synthetics.PrivateLocation;
import com.pulumi.newrelic.synthetics.PrivateLocationArgs;
import com.pulumi.newrelic.synthetics.ScriptMonitor;
import com.pulumi.newrelic.synthetics.ScriptMonitorArgs;
import com.pulumi.newrelic.synthetics.inputs.ScriptMonitorLocationPrivateArgs;
import com.pulumi.newrelic.synthetics.inputs.ScriptMonitorTagArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var location = new PrivateLocation("location", PrivateLocationArgs.builder()
.description("Example private location")
.name("private_location")
.verifiedScriptExecution(true)
.build());
var monitor = new ScriptMonitor("monitor", ScriptMonitorArgs.builder()
.status("ENABLED")
.name("script_monitor")
.type("SCRIPT_API")
.locationPrivates(ScriptMonitorLocationPrivateArgs.builder()
.guid(location.id())
.vsePassword("secret")
.build())
.period("EVERY_6_HOURS")
.script("console.log('terraform integration test updated')")
.scriptLanguage("JAVASCRIPT")
.runtimeType("NODE_API")
.runtimeTypeVersion("16.10")
.tags(ScriptMonitorTagArgs.builder()
.key("some_key")
.values("some_value")
.build())
.build());
}
}
resources:
location:
type: newrelic:synthetics:PrivateLocation
properties:
description: Example private location
name: private_location
verifiedScriptExecution: true
monitor:
type: newrelic:synthetics:ScriptMonitor
properties:
status: ENABLED
name: script_monitor
type: SCRIPT_API
locationPrivates:
- guid: ${location.id}
vsePassword: secret
period: EVERY_6_HOURS
script: console.log('terraform integration test updated')
scriptLanguage: JAVASCRIPT
runtimeType: NODE_API
runtimeTypeVersion: '16.10'
tags:
- key: some_key
values:
- some_value
Type: SCRIPT_BROWSER
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const location = new newrelic.synthetics.PrivateLocation("location", {
description: "Test Description",
name: "private_location",
verifiedScriptExecution: true,
});
const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
status: "ENABLED",
name: "script_monitor",
type: "SCRIPT_BROWSER",
period: "EVERY_HOUR",
script: "$browser.get('https://one.newrelic.com')",
runtimeTypeVersion: "100",
runtimeType: "CHROME_BROWSER",
scriptLanguage: "JAVASCRIPT",
devices: [
"DESKTOP",
"MOBILE_PORTRAIT",
"TABLET_LANDSCAPE",
],
browsers: ["CHROME"],
enableScreenshotOnFailureAndScript: false,
locationPrivates: [{
guid: location.id,
vsePassword: "secret",
}],
tags: [{
key: "some_key",
values: ["some_value"],
}],
});
import pulumi
import pulumi_newrelic as newrelic
location = newrelic.synthetics.PrivateLocation("location",
description="Test Description",
name="private_location",
verified_script_execution=True)
monitor = newrelic.synthetics.ScriptMonitor("monitor",
status="ENABLED",
name="script_monitor",
type="SCRIPT_BROWSER",
period="EVERY_HOUR",
script="$browser.get('https://one.newrelic.com')",
runtime_type_version="100",
runtime_type="CHROME_BROWSER",
script_language="JAVASCRIPT",
devices=[
"DESKTOP",
"MOBILE_PORTRAIT",
"TABLET_LANDSCAPE",
],
browsers=["CHROME"],
enable_screenshot_on_failure_and_script=False,
location_privates=[{
"guid": location.id,
"vse_password": "secret",
}],
tags=[{
"key": "some_key",
"values": ["some_value"],
}])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic/synthetics"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
location, err := synthetics.NewPrivateLocation(ctx, "location", &synthetics.PrivateLocationArgs{
Description: pulumi.String("Test Description"),
Name: pulumi.String("private_location"),
VerifiedScriptExecution: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = synthetics.NewScriptMonitor(ctx, "monitor", &synthetics.ScriptMonitorArgs{
Status: pulumi.String("ENABLED"),
Name: pulumi.String("script_monitor"),
Type: pulumi.String("SCRIPT_BROWSER"),
Period: pulumi.String("EVERY_HOUR"),
Script: pulumi.String("$browser.get('https://one.newrelic.com')"),
RuntimeTypeVersion: pulumi.String("100"),
RuntimeType: pulumi.String("CHROME_BROWSER"),
ScriptLanguage: pulumi.String("JAVASCRIPT"),
Devices: pulumi.StringArray{
pulumi.String("DESKTOP"),
pulumi.String("MOBILE_PORTRAIT"),
pulumi.String("TABLET_LANDSCAPE"),
},
Browsers: pulumi.StringArray{
pulumi.String("CHROME"),
},
EnableScreenshotOnFailureAndScript: pulumi.Bool(false),
LocationPrivates: synthetics.ScriptMonitorLocationPrivateArray{
&synthetics.ScriptMonitorLocationPrivateArgs{
Guid: location.ID(),
VsePassword: pulumi.String("secret"),
},
},
Tags: synthetics.ScriptMonitorTagArray{
&synthetics.ScriptMonitorTagArgs{
Key: pulumi.String("some_key"),
Values: pulumi.StringArray{
pulumi.String("some_value"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var location = new NewRelic.Synthetics.PrivateLocation("location", new()
{
Description = "Test Description",
Name = "private_location",
VerifiedScriptExecution = true,
});
var monitor = new NewRelic.Synthetics.ScriptMonitor("monitor", new()
{
Status = "ENABLED",
Name = "script_monitor",
Type = "SCRIPT_BROWSER",
Period = "EVERY_HOUR",
Script = "$browser.get('https://one.newrelic.com')",
RuntimeTypeVersion = "100",
RuntimeType = "CHROME_BROWSER",
ScriptLanguage = "JAVASCRIPT",
Devices = new[]
{
"DESKTOP",
"MOBILE_PORTRAIT",
"TABLET_LANDSCAPE",
},
Browsers = new[]
{
"CHROME",
},
EnableScreenshotOnFailureAndScript = false,
LocationPrivates = new[]
{
new NewRelic.Synthetics.Inputs.ScriptMonitorLocationPrivateArgs
{
Guid = location.Id,
VsePassword = "secret",
},
},
Tags = new[]
{
new NewRelic.Synthetics.Inputs.ScriptMonitorTagArgs
{
Key = "some_key",
Values = new[]
{
"some_value",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.synthetics.PrivateLocation;
import com.pulumi.newrelic.synthetics.PrivateLocationArgs;
import com.pulumi.newrelic.synthetics.ScriptMonitor;
import com.pulumi.newrelic.synthetics.ScriptMonitorArgs;
import com.pulumi.newrelic.synthetics.inputs.ScriptMonitorLocationPrivateArgs;
import com.pulumi.newrelic.synthetics.inputs.ScriptMonitorTagArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var location = new PrivateLocation("location", PrivateLocationArgs.builder()
.description("Test Description")
.name("private_location")
.verifiedScriptExecution(true)
.build());
var monitor = new ScriptMonitor("monitor", ScriptMonitorArgs.builder()
.status("ENABLED")
.name("script_monitor")
.type("SCRIPT_BROWSER")
.period("EVERY_HOUR")
.script("$browser.get('https://one.newrelic.com')")
.runtimeTypeVersion("100")
.runtimeType("CHROME_BROWSER")
.scriptLanguage("JAVASCRIPT")
.devices(
"DESKTOP",
"MOBILE_PORTRAIT",
"TABLET_LANDSCAPE")
.browsers("CHROME")
.enableScreenshotOnFailureAndScript(false)
.locationPrivates(ScriptMonitorLocationPrivateArgs.builder()
.guid(location.id())
.vsePassword("secret")
.build())
.tags(ScriptMonitorTagArgs.builder()
.key("some_key")
.values("some_value")
.build())
.build());
}
}
resources:
location:
type: newrelic:synthetics:PrivateLocation
properties:
description: Test Description
name: private_location
verifiedScriptExecution: true
monitor:
type: newrelic:synthetics:ScriptMonitor
properties:
status: ENABLED
name: script_monitor
type: SCRIPT_BROWSER
period: EVERY_HOUR
script: $browser.get('https://one.newrelic.com')
runtimeTypeVersion: '100'
runtimeType: CHROME_BROWSER
scriptLanguage: JAVASCRIPT
devices:
- DESKTOP
- MOBILE_PORTRAIT
- TABLET_LANDSCAPE
browsers:
- CHROME
enableScreenshotOnFailureAndScript: false
locationPrivates:
- guid: ${location.id}
vsePassword: secret
tags:
- key: some_key
values:
- some_value
Create ScriptMonitor Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScriptMonitor(name: string, args: ScriptMonitorArgs, opts?: CustomResourceOptions);
@overload
def ScriptMonitor(resource_name: str,
args: ScriptMonitorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScriptMonitor(resource_name: str,
opts: Optional[ResourceOptions] = None,
period: Optional[str] = None,
type: Optional[str] = None,
status: Optional[str] = None,
name: Optional[str] = None,
runtime_type: Optional[str] = None,
enable_screenshot_on_failure_and_script: Optional[bool] = None,
location_privates: Optional[Sequence[ScriptMonitorLocationPrivateArgs]] = None,
locations_publics: Optional[Sequence[str]] = None,
account_id: Optional[str] = None,
device_type: Optional[str] = None,
devices: Optional[Sequence[str]] = None,
runtime_type_version: Optional[str] = None,
script: Optional[str] = None,
script_language: Optional[str] = None,
device_orientation: Optional[str] = None,
tags: Optional[Sequence[ScriptMonitorTagArgs]] = None,
browsers: Optional[Sequence[str]] = None,
use_unsupported_legacy_runtime: Optional[bool] = None)
func NewScriptMonitor(ctx *Context, name string, args ScriptMonitorArgs, opts ...ResourceOption) (*ScriptMonitor, error)
public ScriptMonitor(string name, ScriptMonitorArgs args, CustomResourceOptions? opts = null)
public ScriptMonitor(String name, ScriptMonitorArgs args)
public ScriptMonitor(String name, ScriptMonitorArgs args, CustomResourceOptions options)
type: newrelic:synthetics:ScriptMonitor
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ScriptMonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ScriptMonitorArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ScriptMonitorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScriptMonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScriptMonitorArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var scriptMonitorResource = new NewRelic.Synthetics.ScriptMonitor("scriptMonitorResource", new()
{
Period = "string",
Type = "string",
Status = "string",
Name = "string",
RuntimeType = "string",
EnableScreenshotOnFailureAndScript = false,
LocationPrivates = new[]
{
new NewRelic.Synthetics.Inputs.ScriptMonitorLocationPrivateArgs
{
Guid = "string",
VsePassword = "string",
},
},
LocationsPublics = new[]
{
"string",
},
AccountId = "string",
DeviceType = "string",
Devices = new[]
{
"string",
},
RuntimeTypeVersion = "string",
Script = "string",
ScriptLanguage = "string",
DeviceOrientation = "string",
Tags = new[]
{
new NewRelic.Synthetics.Inputs.ScriptMonitorTagArgs
{
Key = "string",
Values = new[]
{
"string",
},
},
},
Browsers = new[]
{
"string",
},
UseUnsupportedLegacyRuntime = false,
});
example, err := synthetics.NewScriptMonitor(ctx, "scriptMonitorResource", &synthetics.ScriptMonitorArgs{
Period: pulumi.String("string"),
Type: pulumi.String("string"),
Status: pulumi.String("string"),
Name: pulumi.String("string"),
RuntimeType: pulumi.String("string"),
EnableScreenshotOnFailureAndScript: pulumi.Bool(false),
LocationPrivates: synthetics.ScriptMonitorLocationPrivateArray{
&synthetics.ScriptMonitorLocationPrivateArgs{
Guid: pulumi.String("string"),
VsePassword: pulumi.String("string"),
},
},
LocationsPublics: pulumi.StringArray{
pulumi.String("string"),
},
AccountId: pulumi.String("string"),
DeviceType: pulumi.String("string"),
Devices: pulumi.StringArray{
pulumi.String("string"),
},
RuntimeTypeVersion: pulumi.String("string"),
Script: pulumi.String("string"),
ScriptLanguage: pulumi.String("string"),
DeviceOrientation: pulumi.String("string"),
Tags: synthetics.ScriptMonitorTagArray{
&synthetics.ScriptMonitorTagArgs{
Key: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Browsers: pulumi.StringArray{
pulumi.String("string"),
},
UseUnsupportedLegacyRuntime: pulumi.Bool(false),
})
var scriptMonitorResource = new ScriptMonitor("scriptMonitorResource", ScriptMonitorArgs.builder()
.period("string")
.type("string")
.status("string")
.name("string")
.runtimeType("string")
.enableScreenshotOnFailureAndScript(false)
.locationPrivates(ScriptMonitorLocationPrivateArgs.builder()
.guid("string")
.vsePassword("string")
.build())
.locationsPublics("string")
.accountId("string")
.deviceType("string")
.devices("string")
.runtimeTypeVersion("string")
.script("string")
.scriptLanguage("string")
.deviceOrientation("string")
.tags(ScriptMonitorTagArgs.builder()
.key("string")
.values("string")
.build())
.browsers("string")
.useUnsupportedLegacyRuntime(false)
.build());
script_monitor_resource = newrelic.synthetics.ScriptMonitor("scriptMonitorResource",
period="string",
type="string",
status="string",
name="string",
runtime_type="string",
enable_screenshot_on_failure_and_script=False,
location_privates=[{
"guid": "string",
"vse_password": "string",
}],
locations_publics=["string"],
account_id="string",
device_type="string",
devices=["string"],
runtime_type_version="string",
script="string",
script_language="string",
device_orientation="string",
tags=[{
"key": "string",
"values": ["string"],
}],
browsers=["string"],
use_unsupported_legacy_runtime=False)
const scriptMonitorResource = new newrelic.synthetics.ScriptMonitor("scriptMonitorResource", {
period: "string",
type: "string",
status: "string",
name: "string",
runtimeType: "string",
enableScreenshotOnFailureAndScript: false,
locationPrivates: [{
guid: "string",
vsePassword: "string",
}],
locationsPublics: ["string"],
accountId: "string",
deviceType: "string",
devices: ["string"],
runtimeTypeVersion: "string",
script: "string",
scriptLanguage: "string",
deviceOrientation: "string",
tags: [{
key: "string",
values: ["string"],
}],
browsers: ["string"],
useUnsupportedLegacyRuntime: false,
});
type: newrelic:synthetics:ScriptMonitor
properties:
accountId: string
browsers:
- string
deviceOrientation: string
deviceType: string
devices:
- string
enableScreenshotOnFailureAndScript: false
locationPrivates:
- guid: string
vsePassword: string
locationsPublics:
- string
name: string
period: string
runtimeType: string
runtimeTypeVersion: string
script: string
scriptLanguage: string
status: string
tags:
- key: string
values:
- string
type: string
useUnsupportedLegacyRuntime: false
ScriptMonitor Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ScriptMonitor resource accepts the following input properties:
- Period string
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - Status string
- The run state of the monitor. (
ENABLED
orDISABLED
). - Type string
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- Account
Id string - The account in which the Synthetics monitor will be created.
- Browsers List<string>
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - Device
Orientation string - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - Device
Type string - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - Devices List<string>
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - Enable
Screenshot boolOn Failure And Script - Capture a screenshot during job execution.
- Location
Privates List<Pulumi.New Relic. Synthetics. Inputs. Script Monitor Location Private> - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - Locations
Publics List<string> - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - Name string
- The name for the monitor.
- Runtime
Type string - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - Runtime
Type stringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - Script string
- The script that the monitor runs.
- Script
Language string - The programing language that should execute the script.
- List<Pulumi.
New Relic. Synthetics. Inputs. Script Monitor Tag> The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- Use
Unsupported boolLegacy Runtime
- Period string
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - Status string
- The run state of the monitor. (
ENABLED
orDISABLED
). - Type string
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- Account
Id string - The account in which the Synthetics monitor will be created.
- Browsers []string
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - Device
Orientation string - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - Device
Type string - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - Devices []string
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - Enable
Screenshot boolOn Failure And Script - Capture a screenshot during job execution.
- Location
Privates []ScriptMonitor Location Private Args - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - Locations
Publics []string - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - Name string
- The name for the monitor.
- Runtime
Type string - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - Runtime
Type stringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - Script string
- The script that the monitor runs.
- Script
Language string - The programing language that should execute the script.
- []Script
Monitor Tag Args The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- Use
Unsupported boolLegacy Runtime
- period String
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - status String
- The run state of the monitor. (
ENABLED
orDISABLED
). - type String
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- account
Id String - The account in which the Synthetics monitor will be created.
- browsers List<String>
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - device
Orientation String - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - device
Type String - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - devices List<String>
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - enable
Screenshot BooleanOn Failure And Script - Capture a screenshot during job execution.
- location
Privates List<ScriptMonitor Location Private> - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - locations
Publics List<String> - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - name String
- The name for the monitor.
- runtime
Type String - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - runtime
Type StringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - script String
- The script that the monitor runs.
- script
Language String - The programing language that should execute the script.
- List<Script
Monitor Tag> The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- use
Unsupported BooleanLegacy Runtime
- period string
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - status string
- The run state of the monitor. (
ENABLED
orDISABLED
). - type string
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- account
Id string - The account in which the Synthetics monitor will be created.
- browsers string[]
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - device
Orientation string - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - device
Type string - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - devices string[]
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - enable
Screenshot booleanOn Failure And Script - Capture a screenshot during job execution.
- location
Privates ScriptMonitor Location Private[] - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - locations
Publics string[] - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - name string
- The name for the monitor.
- runtime
Type string - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - runtime
Type stringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - script string
- The script that the monitor runs.
- script
Language string - The programing language that should execute the script.
- Script
Monitor Tag[] The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- use
Unsupported booleanLegacy Runtime
- period str
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - status str
- The run state of the monitor. (
ENABLED
orDISABLED
). - type str
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- account_
id str - The account in which the Synthetics monitor will be created.
- browsers Sequence[str]
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - device_
orientation str - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - device_
type str - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - devices Sequence[str]
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - enable_
screenshot_ boolon_ failure_ and_ script - Capture a screenshot during job execution.
- location_
privates Sequence[ScriptMonitor Location Private Args] - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - locations_
publics Sequence[str] - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - name str
- The name for the monitor.
- runtime_
type str - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - runtime_
type_ strversion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - script str
- The script that the monitor runs.
- script_
language str - The programing language that should execute the script.
- Sequence[Script
Monitor Tag Args] The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- use_
unsupported_ boollegacy_ runtime
- period String
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - status String
- The run state of the monitor. (
ENABLED
orDISABLED
). - type String
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- account
Id String - The account in which the Synthetics monitor will be created.
- browsers List<String>
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - device
Orientation String - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - device
Type String - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - devices List<String>
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - enable
Screenshot BooleanOn Failure And Script - Capture a screenshot during job execution.
- location
Privates List<Property Map> - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - locations
Publics List<String> - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - name String
- The name for the monitor.
- runtime
Type String - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - runtime
Type StringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - script String
- The script that the monitor runs.
- script
Language String - The programing language that should execute the script.
- List<Property Map>
The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- use
Unsupported BooleanLegacy Runtime
Outputs
All input properties are implicitly available as output properties. Additionally, the ScriptMonitor resource produces the following output properties:
- Guid string
- The unique entity identifier of the monitor in New Relic.
- Id string
- The provider-assigned unique ID for this managed resource.
- Period
In intMinutes - The interval in minutes at which Synthetic monitor should run.
- Guid string
- The unique entity identifier of the monitor in New Relic.
- Id string
- The provider-assigned unique ID for this managed resource.
- Period
In intMinutes - The interval in minutes at which Synthetic monitor should run.
- guid String
- The unique entity identifier of the monitor in New Relic.
- id String
- The provider-assigned unique ID for this managed resource.
- period
In IntegerMinutes - The interval in minutes at which Synthetic monitor should run.
- guid string
- The unique entity identifier of the monitor in New Relic.
- id string
- The provider-assigned unique ID for this managed resource.
- period
In numberMinutes - The interval in minutes at which Synthetic monitor should run.
- guid str
- The unique entity identifier of the monitor in New Relic.
- id str
- The provider-assigned unique ID for this managed resource.
- period_
in_ intminutes - The interval in minutes at which Synthetic monitor should run.
- guid String
- The unique entity identifier of the monitor in New Relic.
- id String
- The provider-assigned unique ID for this managed resource.
- period
In NumberMinutes - The interval in minutes at which Synthetic monitor should run.
Look up Existing ScriptMonitor Resource
Get an existing ScriptMonitor resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ScriptMonitorState, opts?: CustomResourceOptions): ScriptMonitor
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
browsers: Optional[Sequence[str]] = None,
device_orientation: Optional[str] = None,
device_type: Optional[str] = None,
devices: Optional[Sequence[str]] = None,
enable_screenshot_on_failure_and_script: Optional[bool] = None,
guid: Optional[str] = None,
location_privates: Optional[Sequence[ScriptMonitorLocationPrivateArgs]] = None,
locations_publics: Optional[Sequence[str]] = None,
name: Optional[str] = None,
period: Optional[str] = None,
period_in_minutes: Optional[int] = None,
runtime_type: Optional[str] = None,
runtime_type_version: Optional[str] = None,
script: Optional[str] = None,
script_language: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[ScriptMonitorTagArgs]] = None,
type: Optional[str] = None,
use_unsupported_legacy_runtime: Optional[bool] = None) -> ScriptMonitor
func GetScriptMonitor(ctx *Context, name string, id IDInput, state *ScriptMonitorState, opts ...ResourceOption) (*ScriptMonitor, error)
public static ScriptMonitor Get(string name, Input<string> id, ScriptMonitorState? state, CustomResourceOptions? opts = null)
public static ScriptMonitor get(String name, Output<String> id, ScriptMonitorState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - The account in which the Synthetics monitor will be created.
- Browsers List<string>
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - Device
Orientation string - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - Device
Type string - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - Devices List<string>
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - Enable
Screenshot boolOn Failure And Script - Capture a screenshot during job execution.
- Guid string
- The unique entity identifier of the monitor in New Relic.
- Location
Privates List<Pulumi.New Relic. Synthetics. Inputs. Script Monitor Location Private> - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - Locations
Publics List<string> - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - Name string
- The name for the monitor.
- Period string
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - Period
In intMinutes - The interval in minutes at which Synthetic monitor should run.
- Runtime
Type string - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - Runtime
Type stringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - Script string
- The script that the monitor runs.
- Script
Language string - The programing language that should execute the script.
- Status string
- The run state of the monitor. (
ENABLED
orDISABLED
). - List<Pulumi.
New Relic. Synthetics. Inputs. Script Monitor Tag> The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- Type string
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- Use
Unsupported boolLegacy Runtime
- Account
Id string - The account in which the Synthetics monitor will be created.
- Browsers []string
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - Device
Orientation string - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - Device
Type string - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - Devices []string
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - Enable
Screenshot boolOn Failure And Script - Capture a screenshot during job execution.
- Guid string
- The unique entity identifier of the monitor in New Relic.
- Location
Privates []ScriptMonitor Location Private Args - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - Locations
Publics []string - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - Name string
- The name for the monitor.
- Period string
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - Period
In intMinutes - The interval in minutes at which Synthetic monitor should run.
- Runtime
Type string - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - Runtime
Type stringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - Script string
- The script that the monitor runs.
- Script
Language string - The programing language that should execute the script.
- Status string
- The run state of the monitor. (
ENABLED
orDISABLED
). - []Script
Monitor Tag Args The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- Type string
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- Use
Unsupported boolLegacy Runtime
- account
Id String - The account in which the Synthetics monitor will be created.
- browsers List<String>
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - device
Orientation String - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - device
Type String - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - devices List<String>
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - enable
Screenshot BooleanOn Failure And Script - Capture a screenshot during job execution.
- guid String
- The unique entity identifier of the monitor in New Relic.
- location
Privates List<ScriptMonitor Location Private> - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - locations
Publics List<String> - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - name String
- The name for the monitor.
- period String
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - period
In IntegerMinutes - The interval in minutes at which Synthetic monitor should run.
- runtime
Type String - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - runtime
Type StringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - script String
- The script that the monitor runs.
- script
Language String - The programing language that should execute the script.
- status String
- The run state of the monitor. (
ENABLED
orDISABLED
). - List<Script
Monitor Tag> The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- type String
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- use
Unsupported BooleanLegacy Runtime
- account
Id string - The account in which the Synthetics monitor will be created.
- browsers string[]
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - device
Orientation string - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - device
Type string - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - devices string[]
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - enable
Screenshot booleanOn Failure And Script - Capture a screenshot during job execution.
- guid string
- The unique entity identifier of the monitor in New Relic.
- location
Privates ScriptMonitor Location Private[] - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - locations
Publics string[] - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - name string
- The name for the monitor.
- period string
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - period
In numberMinutes - The interval in minutes at which Synthetic monitor should run.
- runtime
Type string - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - runtime
Type stringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - script string
- The script that the monitor runs.
- script
Language string - The programing language that should execute the script.
- status string
- The run state of the monitor. (
ENABLED
orDISABLED
). - Script
Monitor Tag[] The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- type string
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- use
Unsupported booleanLegacy Runtime
- account_
id str - The account in which the Synthetics monitor will be created.
- browsers Sequence[str]
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - device_
orientation str - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - device_
type str - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - devices Sequence[str]
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - enable_
screenshot_ boolon_ failure_ and_ script - Capture a screenshot during job execution.
- guid str
- The unique entity identifier of the monitor in New Relic.
- location_
privates Sequence[ScriptMonitor Location Private Args] - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - locations_
publics Sequence[str] - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - name str
- The name for the monitor.
- period str
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - period_
in_ intminutes - The interval in minutes at which Synthetic monitor should run.
- runtime_
type str - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - runtime_
type_ strversion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - script str
- The script that the monitor runs.
- script_
language str - The programing language that should execute the script.
- status str
- The run state of the monitor. (
ENABLED
orDISABLED
). - Sequence[Script
Monitor Tag Args] The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- type str
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- use_
unsupported_ boollegacy_ runtime
- account
Id String - The account in which the Synthetics monitor will be created.
- browsers List<String>
- The multiple browsers list on which synthetic monitors will run. Valid values are
CHROME
andFIREFOX
. - device
Orientation String - Device emulation orientation field. Valid values are
LANDSCAPE
andPORTRAIT
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - device
Type String - Device emulation type field. Valid values are
MOBILE
andTABLET
. We recommend you to usedevices
field instead ofdevice_type
,device_orientation
fields, as it allows you to select multiple combinations of device types and orientations. - devices List<String>
- The multiple devices list on which synthetic monitors will run. Valid values are
DESKTOP
,MOBILE_LANDSCAPE
,MOBILE_PORTRAIT
,TABLET_LANDSCAPE
andTABLET_PORTRAIT
. - enable
Screenshot BooleanOn Failure And Script - Capture a screenshot during job execution.
- guid String
- The unique entity identifier of the monitor in New Relic.
- location
Privates List<Property Map> - The location the monitor will run from. See Nested location_private blocks below for details. At least one of either
locations_public
orlocation_private
is required. - locations
Publics List<String> - The location the monitor will run from. Check out this page for a list of valid public locations. The
AWS_
prefix is not needed, as the provider uses NerdGraph. At least one of eitherlocations_public
orlocation_private
is required. - name String
- The name for the monitor.
- period String
- The interval at which this monitor should run. Valid values are
EVERY_MINUTE
,EVERY_5_MINUTES
,EVERY_10_MINUTES
,EVERY_15_MINUTES
,EVERY_30_MINUTES
,EVERY_HOUR
,EVERY_6_HOURS
,EVERY_12_HOURS
, orEVERY_DAY
. - period
In NumberMinutes - The interval in minutes at which Synthetic monitor should run.
- runtime
Type String - The runtime that the monitor will use to run jobs. For the
SCRIPT_API
monitor type, a valid value isNODE_API
. For theSCRIPT_BROWSER
monitor type, a valid value isCHROME_BROWSER
. - runtime
Type StringVersion - The specific version of the runtime type selected. For the
SCRIPT_API
monitor type, a valid value is16.10
, which corresponds to the version of Node.js. For theSCRIPT_BROWSER
monitor type, a valid value is100
, which corresponds to the version of the Chrome browser. - script String
- The script that the monitor runs.
- script
Language String - The programing language that should execute the script.
- status String
- The run state of the monitor. (
ENABLED
orDISABLED
). - List<Property Map>
The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSER
monitor type supports the following additional arguments:- type String
- The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
- use
Unsupported BooleanLegacy Runtime
Supporting Types
ScriptMonitorLocationPrivate, ScriptMonitorLocationPrivateArgs
- Guid string
- The unique identifier for the Synthetics private location in New Relic.
- Vse
Password string - The location's Verified Script Execution password, Only necessary if Verified Script Execution is enabled for the location.
- Guid string
- The unique identifier for the Synthetics private location in New Relic.
- Vse
Password string - The location's Verified Script Execution password, Only necessary if Verified Script Execution is enabled for the location.
- guid String
- The unique identifier for the Synthetics private location in New Relic.
- vse
Password String - The location's Verified Script Execution password, Only necessary if Verified Script Execution is enabled for the location.
- guid string
- The unique identifier for the Synthetics private location in New Relic.
- vse
Password string - The location's Verified Script Execution password, Only necessary if Verified Script Execution is enabled for the location.
- guid str
- The unique identifier for the Synthetics private location in New Relic.
- vse_
password str - The location's Verified Script Execution password, Only necessary if Verified Script Execution is enabled for the location.
- guid String
- The unique identifier for the Synthetics private location in New Relic.
- vse
Password String - The location's Verified Script Execution password, Only necessary if Verified Script Execution is enabled for the location.
ScriptMonitorTag, ScriptMonitorTagArgs
Import
Synthetics monitor scripts can be imported using the guid
, e.g.
bash
$ pulumi import newrelic:synthetics/scriptMonitor:ScriptMonitor monitor <guid>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelic
Terraform Provider.