newrelic.synthetics.ScriptMonitor
Explore with Pulumi AI
WARNING Support for legacy Synthetics runtimes will reach its end-of-life (EOL) on October 22, 2024. In addition, creating new monitors using the legacy runtime will no longer be supported after August 26, 2024. In light of the above, kindly upgrade your Synthetic Monitors to the new runtime at the earliest, if they are still using the legacy runtime. Please check out this page for more details on the EOL, action needed (specific to monitors using public and private locations), relevant resources, and more.
Use this resource to create update, and delete a Script API or Script Browser Synthetics Monitor in New Relic.
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=[newrelic.synthetics.ScriptMonitorTagArgs(
        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",
    enableScreenshotOnFailureAndScript: false,
    script: "$browser.get('https://one.newrelic.com')",
    runtimeTypeVersion: "100",
    runtimeType: "CHROME_BROWSER",
    scriptLanguage: "JAVASCRIPT",
    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",
    enable_screenshot_on_failure_and_script=False,
    script="$browser.get('https://one.newrelic.com')",
    runtime_type_version="100",
    runtime_type="CHROME_BROWSER",
    script_language="JAVASCRIPT",
    tags=[newrelic.synthetics.ScriptMonitorTagArgs(
        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"),
			EnableScreenshotOnFailureAndScript: pulumi.Bool(false),
			Script:                             pulumi.String("$browser.get('https://one.newrelic.com')"),
			RuntimeTypeVersion:                 pulumi.String("100"),
			RuntimeType:                        pulumi.String("CHROME_BROWSER"),
			ScriptLanguage:                     pulumi.String("JAVASCRIPT"),
			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",
        EnableScreenshotOnFailureAndScript = false,
        Script = "$browser.get('https://one.newrelic.com')",
        RuntimeTypeVersion = "100",
        RuntimeType = "CHROME_BROWSER",
        ScriptLanguage = "JAVASCRIPT",
        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")
            .enableScreenshotOnFailureAndScript(false)
            .script("$browser.get('https://one.newrelic.com')")
            .runtimeTypeVersion("100")
            .runtimeType("CHROME_BROWSER")
            .scriptLanguage("JAVASCRIPT")
            .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
      enableScreenshotOnFailureAndScript: false
      script: $browser.get('https://one.newrelic.com')
      runtimeTypeVersion: '100'
      runtimeType: CHROME_BROWSER
      scriptLanguage: JAVASCRIPT
      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=[newrelic.synthetics.ScriptMonitorLocationPrivateArgs(
        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=[newrelic.synthetics.ScriptMonitorTagArgs(
        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')",
    enableScreenshotOnFailureAndScript: false,
    locationPrivates: [{
        guid: location.id,
        vsePassword: "secret",
    }],
    runtimeTypeVersion: "100",
    runtimeType: "CHROME_BROWSER",
    scriptLanguage: "JAVASCRIPT",
    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')",
    enable_screenshot_on_failure_and_script=False,
    location_privates=[newrelic.synthetics.ScriptMonitorLocationPrivateArgs(
        guid=location.id,
        vse_password="secret",
    )],
    runtime_type_version="100",
    runtime_type="CHROME_BROWSER",
    script_language="JAVASCRIPT",
    tags=[newrelic.synthetics.ScriptMonitorTagArgs(
        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')"),
			EnableScreenshotOnFailureAndScript: pulumi.Bool(false),
			LocationPrivates: synthetics.ScriptMonitorLocationPrivateArray{
				&synthetics.ScriptMonitorLocationPrivateArgs{
					Guid:        location.ID(),
					VsePassword: pulumi.String("secret"),
				},
			},
			RuntimeTypeVersion: pulumi.String("100"),
			RuntimeType:        pulumi.String("CHROME_BROWSER"),
			ScriptLanguage:     pulumi.String("JAVASCRIPT"),
			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')",
        EnableScreenshotOnFailureAndScript = false,
        LocationPrivates = new[]
        {
            new NewRelic.Synthetics.Inputs.ScriptMonitorLocationPrivateArgs
            {
                Guid = location.Id,
                VsePassword = "secret",
            },
        },
        RuntimeTypeVersion = "100",
        RuntimeType = "CHROME_BROWSER",
        ScriptLanguage = "JAVASCRIPT",
        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')")
            .enableScreenshotOnFailureAndScript(false)
            .locationPrivates(ScriptMonitorLocationPrivateArgs.builder()
                .guid(location.id())
                .vsePassword("secret")
                .build())
            .runtimeTypeVersion("100")
            .runtimeType("CHROME_BROWSER")
            .scriptLanguage("JAVASCRIPT")
            .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')
      enableScreenshotOnFailureAndScript: false
      locationPrivates:
        - guid: ${location.id}
          vsePassword: secret
      runtimeTypeVersion: '100'
      runtimeType: CHROME_BROWSER
      scriptLanguage: JAVASCRIPT
      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,
                  location_privates: Optional[Sequence[ScriptMonitorLocationPrivateArgs]] = None,
                  locations_publics: Optional[Sequence[str]] = None,
                  account_id: Optional[str] = None,
                  enable_screenshot_on_failure_and_script: Optional[bool] = None,
                  runtime_type: Optional[str] = None,
                  runtime_type_version: Optional[str] = None,
                  script: Optional[str] = None,
                  script_language: Optional[str] = None,
                  device_type: Optional[str] = None,
                  tags: Optional[Sequence[ScriptMonitorTagArgs]] = None,
                  device_orientation: Optional[str] = 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",
    LocationPrivates = new[]
    {
        new NewRelic.Synthetics.Inputs.ScriptMonitorLocationPrivateArgs
        {
            Guid = "string",
            VsePassword = "string",
        },
    },
    LocationsPublics = new[]
    {
        "string",
    },
    AccountId = "string",
    EnableScreenshotOnFailureAndScript = false,
    RuntimeType = "string",
    RuntimeTypeVersion = "string",
    Script = "string",
    ScriptLanguage = "string",
    DeviceType = "string",
    Tags = new[]
    {
        new NewRelic.Synthetics.Inputs.ScriptMonitorTagArgs
        {
            Key = "string",
            Values = new[]
            {
                "string",
            },
        },
    },
    DeviceOrientation = "string",
});
example, err := synthetics.NewScriptMonitor(ctx, "scriptMonitorResource", &synthetics.ScriptMonitorArgs{
	Period: pulumi.String("string"),
	Type:   pulumi.String("string"),
	Status: pulumi.String("string"),
	Name:   pulumi.String("string"),
	LocationPrivates: synthetics.ScriptMonitorLocationPrivateArray{
		&synthetics.ScriptMonitorLocationPrivateArgs{
			Guid:        pulumi.String("string"),
			VsePassword: pulumi.String("string"),
		},
	},
	LocationsPublics: pulumi.StringArray{
		pulumi.String("string"),
	},
	AccountId:                          pulumi.String("string"),
	EnableScreenshotOnFailureAndScript: pulumi.Bool(false),
	RuntimeType:                        pulumi.String("string"),
	RuntimeTypeVersion:                 pulumi.String("string"),
	Script:                             pulumi.String("string"),
	ScriptLanguage:                     pulumi.String("string"),
	DeviceType:                         pulumi.String("string"),
	Tags: synthetics.ScriptMonitorTagArray{
		&synthetics.ScriptMonitorTagArgs{
			Key: pulumi.String("string"),
			Values: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
	DeviceOrientation: pulumi.String("string"),
})
var scriptMonitorResource = new ScriptMonitor("scriptMonitorResource", ScriptMonitorArgs.builder()
    .period("string")
    .type("string")
    .status("string")
    .name("string")
    .locationPrivates(ScriptMonitorLocationPrivateArgs.builder()
        .guid("string")
        .vsePassword("string")
        .build())
    .locationsPublics("string")
    .accountId("string")
    .enableScreenshotOnFailureAndScript(false)
    .runtimeType("string")
    .runtimeTypeVersion("string")
    .script("string")
    .scriptLanguage("string")
    .deviceType("string")
    .tags(ScriptMonitorTagArgs.builder()
        .key("string")
        .values("string")
        .build())
    .deviceOrientation("string")
    .build());
script_monitor_resource = newrelic.synthetics.ScriptMonitor("scriptMonitorResource",
    period="string",
    type="string",
    status="string",
    name="string",
    location_privates=[newrelic.synthetics.ScriptMonitorLocationPrivateArgs(
        guid="string",
        vse_password="string",
    )],
    locations_publics=["string"],
    account_id="string",
    enable_screenshot_on_failure_and_script=False,
    runtime_type="string",
    runtime_type_version="string",
    script="string",
    script_language="string",
    device_type="string",
    tags=[newrelic.synthetics.ScriptMonitorTagArgs(
        key="string",
        values=["string"],
    )],
    device_orientation="string")
const scriptMonitorResource = new newrelic.synthetics.ScriptMonitor("scriptMonitorResource", {
    period: "string",
    type: "string",
    status: "string",
    name: "string",
    locationPrivates: [{
        guid: "string",
        vsePassword: "string",
    }],
    locationsPublics: ["string"],
    accountId: "string",
    enableScreenshotOnFailureAndScript: false,
    runtimeType: "string",
    runtimeTypeVersion: "string",
    script: "string",
    scriptLanguage: "string",
    deviceType: "string",
    tags: [{
        key: "string",
        values: ["string"],
    }],
    deviceOrientation: "string",
});
type: newrelic:synthetics:ScriptMonitor
properties:
    accountId: string
    deviceOrientation: string
    deviceType: 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
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
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, or EVERY_DAY.
 - Status string
 - The monitor status (ENABLED or DISABLED).
 - 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.
 - Device
Orientation string - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - Device
Type string - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis required. - Name string
 - The name for the monitor.
 - Runtime
Type string - The runtime that the monitor will use to run jobs.
 - Runtime
Type stringVersion  - The specific version of the runtime type selected.
 - 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_BROWSERmonitor type supports the following additional argument:
- 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, or EVERY_DAY.
 - Status string
 - The monitor status (ENABLED or DISABLED).
 - 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.
 - Device
Orientation string - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - Device
Type string - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis required. - Name string
 - The name for the monitor.
 - Runtime
Type string - The runtime that the monitor will use to run jobs.
 - Runtime
Type stringVersion  - The specific version of the runtime type selected.
 - 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_BROWSERmonitor type supports the following additional argument:
- 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, or EVERY_DAY.
 - status String
 - The monitor status (ENABLED or DISABLED).
 - 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.
 - device
Orientation String - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - device
Type String - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis required. - name String
 - The name for the monitor.
 - runtime
Type String - The runtime that the monitor will use to run jobs.
 - runtime
Type StringVersion  - The specific version of the runtime type selected.
 - 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_BROWSERmonitor type supports the following additional argument:
- 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, or EVERY_DAY.
 - status string
 - The monitor status (ENABLED or DISABLED).
 - 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.
 - device
Orientation string - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - device
Type string - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis required. - name string
 - The name for the monitor.
 - runtime
Type string - The runtime that the monitor will use to run jobs.
 - runtime
Type stringVersion  - The specific version of the runtime type selected.
 - 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_BROWSERmonitor type supports the following additional argument:
- 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, or EVERY_DAY.
 - status str
 - The monitor status (ENABLED or DISABLED).
 - 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.
 - device_
orientation str - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - device_
type str - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis required. - name str
 - The name for the monitor.
 - runtime_
type str - The runtime that the monitor will use to run jobs.
 - runtime_
type_ strversion  - The specific version of the runtime type selected.
 - 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_BROWSERmonitor type supports the following additional argument:
- 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, or EVERY_DAY.
 - status String
 - The monitor status (ENABLED or DISABLED).
 - 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.
 - device
Orientation String - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - device
Type String - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis required. - name String
 - The name for the monitor.
 - runtime
Type String - The runtime that the monitor will use to run jobs.
 - runtime
Type StringVersion  - The specific version of the runtime type selected.
 - 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_BROWSERmonitor type supports the following additional argument:
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,
        device_orientation: Optional[str] = None,
        device_type: Optional[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) -> ScriptMonitorfunc 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.
 - Device
Orientation string - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - Device
Type string - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis 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, or EVERY_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.
 - Runtime
Type stringVersion  - The specific version of the runtime type selected.
 - Script string
 - The script that the monitor runs.
 - Script
Language string - The programing language that should execute the script.
 - Status string
 - The monitor status (ENABLED or DISABLED).
 - 
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_BROWSERmonitor type supports the following additional argument:- 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.
 - Device
Orientation string - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - Device
Type string - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis 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, or EVERY_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.
 - Runtime
Type stringVersion  - The specific version of the runtime type selected.
 - Script string
 - The script that the monitor runs.
 - Script
Language string - The programing language that should execute the script.
 - Status string
 - The monitor status (ENABLED or DISABLED).
 - 
[]Script
Monitor Tag Args  The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSERmonitor type supports the following additional argument:- 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.
 - device
Orientation String - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - device
Type String - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis 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, or EVERY_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.
 - runtime
Type StringVersion  - The specific version of the runtime type selected.
 - script String
 - The script that the monitor runs.
 - script
Language String - The programing language that should execute the script.
 - status String
 - The monitor status (ENABLED or DISABLED).
 - 
List<Script
Monitor Tag>  The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSERmonitor type supports the following additional argument:- 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.
 - device
Orientation string - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - device
Type string - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis 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, or EVERY_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.
 - runtime
Type stringVersion  - The specific version of the runtime type selected.
 - script string
 - The script that the monitor runs.
 - script
Language string - The programing language that should execute the script.
 - status string
 - The monitor status (ENABLED or DISABLED).
 - 
Script
Monitor Tag[]  The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSERmonitor type supports the following additional argument:- type string
 - 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.
 - device_
orientation str - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - device_
type str - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis 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, or EVERY_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.
 - runtime_
type_ strversion  - The specific version of the runtime type selected.
 - script str
 - The script that the monitor runs.
 - script_
language str - The programing language that should execute the script.
 - status str
 - The monitor status (ENABLED or DISABLED).
 - 
Sequence[Script
Monitor Tag Args]  The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSERmonitor type supports the following additional argument:- type str
 - 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.
 - device
Orientation String - Device emulation orientation field. Valid values are 
LANDSCAPEandPORTRAIT. - device
Type String - Device emulation type field. Valid values are 
MOBILEandTABLET. - 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_publicorlocation_privateis 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_publicorlocation_privateis 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, or EVERY_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.
 - runtime
Type StringVersion  - The specific version of the runtime type selected.
 - script String
 - The script that the monitor runs.
 - script
Language String - The programing language that should execute the script.
 - status String
 - The monitor status (ENABLED or DISABLED).
 - List<Property Map>
 The tags that will be associated with the monitor. See Nested tag blocks below for details.
The
SCRIPTED_BROWSERmonitor type supports the following additional argument:- type String
 - The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
 
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 
newrelicTerraform Provider.