1. Packages
  2. New Relic
  3. API Docs
  4. synthetics
  5. ScriptMonitor
New Relic v5.22.1 published on Friday, Mar 29, 2024 by Pulumi

newrelic.synthetics.ScriptMonitor

Explore with Pulumi AI

newrelic logo
New Relic v5.22.1 published on Friday, Mar 29, 2024 by Pulumi

    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", {
        locationsPublics: [
            "AP_SOUTH_1",
            "AP_EAST_1",
        ],
        period: "EVERY_6_HOURS",
        runtimeType: "NODE_API",
        runtimeTypeVersion: "16.10",
        script: "console.log('it works!')",
        scriptLanguage: "JAVASCRIPT",
        status: "ENABLED",
        tags: [{
            key: "some_key",
            values: ["some_value"],
        }],
        type: "SCRIPT_API",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    monitor = newrelic.synthetics.ScriptMonitor("monitor",
        locations_publics=[
            "AP_SOUTH_1",
            "AP_EAST_1",
        ],
        period="EVERY_6_HOURS",
        runtime_type="NODE_API",
        runtime_type_version="16.10",
        script="console.log('it works!')",
        script_language="JAVASCRIPT",
        status="ENABLED",
        tags=[newrelic.synthetics.ScriptMonitorTagArgs(
            key="some_key",
            values=["some_value"],
        )],
        type="SCRIPT_API")
    
    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{
    			LocationsPublics: pulumi.StringArray{
    				pulumi.String("AP_SOUTH_1"),
    				pulumi.String("AP_EAST_1"),
    			},
    			Period:             pulumi.String("EVERY_6_HOURS"),
    			RuntimeType:        pulumi.String("NODE_API"),
    			RuntimeTypeVersion: pulumi.String("16.10"),
    			Script:             pulumi.String("console.log('it works!')"),
    			ScriptLanguage:     pulumi.String("JAVASCRIPT"),
    			Status:             pulumi.String("ENABLED"),
    			Tags: synthetics.ScriptMonitorTagArray{
    				&synthetics.ScriptMonitorTagArgs{
    					Key: pulumi.String("some_key"),
    					Values: pulumi.StringArray{
    						pulumi.String("some_value"),
    					},
    				},
    			},
    			Type: pulumi.String("SCRIPT_API"),
    		})
    		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()
        {
            LocationsPublics = new[]
            {
                "AP_SOUTH_1",
                "AP_EAST_1",
            },
            Period = "EVERY_6_HOURS",
            RuntimeType = "NODE_API",
            RuntimeTypeVersion = "16.10",
            Script = "console.log('it works!')",
            ScriptLanguage = "JAVASCRIPT",
            Status = "ENABLED",
            Tags = new[]
            {
                new NewRelic.Synthetics.Inputs.ScriptMonitorTagArgs
                {
                    Key = "some_key",
                    Values = new[]
                    {
                        "some_value",
                    },
                },
            },
            Type = "SCRIPT_API",
        });
    
    });
    
    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()        
                .locationsPublics(            
                    "AP_SOUTH_1",
                    "AP_EAST_1")
                .period("EVERY_6_HOURS")
                .runtimeType("NODE_API")
                .runtimeTypeVersion("16.10")
                .script("console.log('it works!')")
                .scriptLanguage("JAVASCRIPT")
                .status("ENABLED")
                .tags(ScriptMonitorTagArgs.builder()
                    .key("some_key")
                    .values("some_value")
                    .build())
                .type("SCRIPT_API")
                .build());
    
        }
    }
    
    resources:
      monitor:
        type: newrelic:synthetics:ScriptMonitor
        properties:
          locationsPublics:
            - AP_SOUTH_1
            - AP_EAST_1
          period: EVERY_6_HOURS
          runtimeType: NODE_API
          runtimeTypeVersion: '16.10'
          script: console.log('it works!')
          scriptLanguage: JAVASCRIPT
          status: ENABLED
          tags:
            - key: some_key
              values:
                - some_value
          type: SCRIPT_API
    
    Type: SCRIPT_BROWSER
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
        enableScreenshotOnFailureAndScript: false,
        locationsPublics: [
            "AP_SOUTH_1",
            "AP_EAST_1",
        ],
        period: "EVERY_HOUR",
        runtimeType: "CHROME_BROWSER",
        runtimeTypeVersion: "100",
        script: "$browser.get('https://one.newrelic.com')",
        scriptLanguage: "JAVASCRIPT",
        status: "ENABLED",
        tags: [{
            key: "some_key",
            values: ["some_value"],
        }],
        type: "SCRIPT_BROWSER",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    monitor = newrelic.synthetics.ScriptMonitor("monitor",
        enable_screenshot_on_failure_and_script=False,
        locations_publics=[
            "AP_SOUTH_1",
            "AP_EAST_1",
        ],
        period="EVERY_HOUR",
        runtime_type="CHROME_BROWSER",
        runtime_type_version="100",
        script="$browser.get('https://one.newrelic.com')",
        script_language="JAVASCRIPT",
        status="ENABLED",
        tags=[newrelic.synthetics.ScriptMonitorTagArgs(
            key="some_key",
            values=["some_value"],
        )],
        type="SCRIPT_BROWSER")
    
    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{
    			EnableScreenshotOnFailureAndScript: pulumi.Bool(false),
    			LocationsPublics: pulumi.StringArray{
    				pulumi.String("AP_SOUTH_1"),
    				pulumi.String("AP_EAST_1"),
    			},
    			Period:             pulumi.String("EVERY_HOUR"),
    			RuntimeType:        pulumi.String("CHROME_BROWSER"),
    			RuntimeTypeVersion: pulumi.String("100"),
    			Script:             pulumi.String("$browser.get('https://one.newrelic.com')"),
    			ScriptLanguage:     pulumi.String("JAVASCRIPT"),
    			Status:             pulumi.String("ENABLED"),
    			Tags: synthetics.ScriptMonitorTagArray{
    				&synthetics.ScriptMonitorTagArgs{
    					Key: pulumi.String("some_key"),
    					Values: pulumi.StringArray{
    						pulumi.String("some_value"),
    					},
    				},
    			},
    			Type: pulumi.String("SCRIPT_BROWSER"),
    		})
    		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()
        {
            EnableScreenshotOnFailureAndScript = false,
            LocationsPublics = new[]
            {
                "AP_SOUTH_1",
                "AP_EAST_1",
            },
            Period = "EVERY_HOUR",
            RuntimeType = "CHROME_BROWSER",
            RuntimeTypeVersion = "100",
            Script = "$browser.get('https://one.newrelic.com')",
            ScriptLanguage = "JAVASCRIPT",
            Status = "ENABLED",
            Tags = new[]
            {
                new NewRelic.Synthetics.Inputs.ScriptMonitorTagArgs
                {
                    Key = "some_key",
                    Values = new[]
                    {
                        "some_value",
                    },
                },
            },
            Type = "SCRIPT_BROWSER",
        });
    
    });
    
    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()        
                .enableScreenshotOnFailureAndScript(false)
                .locationsPublics(            
                    "AP_SOUTH_1",
                    "AP_EAST_1")
                .period("EVERY_HOUR")
                .runtimeType("CHROME_BROWSER")
                .runtimeTypeVersion("100")
                .script("$browser.get('https://one.newrelic.com')")
                .scriptLanguage("JAVASCRIPT")
                .status("ENABLED")
                .tags(ScriptMonitorTagArgs.builder()
                    .key("some_key")
                    .values("some_value")
                    .build())
                .type("SCRIPT_BROWSER")
                .build());
    
        }
    }
    
    resources:
      monitor:
        type: newrelic:synthetics:ScriptMonitor
        properties:
          enableScreenshotOnFailureAndScript: false
          locationsPublics:
            - AP_SOUTH_1
            - AP_EAST_1
          period: EVERY_HOUR
          runtimeType: CHROME_BROWSER
          runtimeTypeVersion: '100'
          script: $browser.get('https://one.newrelic.com')
          scriptLanguage: JAVASCRIPT
          status: ENABLED
          tags:
            - key: some_key
              values:
                - some_value
          type: SCRIPT_BROWSER
    

    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",
        verifiedScriptExecution: true,
    });
    const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
        status: "ENABLED",
        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",
        verified_script_execution=True)
    monitor = newrelic.synthetics.ScriptMonitor("monitor",
        status="ENABLED",
        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"),
    			VerifiedScriptExecution: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = synthetics.NewScriptMonitor(ctx, "monitor", &synthetics.ScriptMonitorArgs{
    			Status: pulumi.String("ENABLED"),
    			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",
            VerifiedScriptExecution = true,
        });
    
        var monitor = new NewRelic.Synthetics.ScriptMonitor("monitor", new()
        {
            Status = "ENABLED",
            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")
                .verifiedScriptExecution(true)
                .build());
    
            var monitor = new ScriptMonitor("monitor", ScriptMonitorArgs.builder()        
                .status("ENABLED")
                .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
          verifiedScriptExecution: true
      monitor:
        type: newrelic:synthetics:ScriptMonitor
        properties:
          status: ENABLED
          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",
        verifiedScriptExecution: true,
    });
    const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
        status: "ENABLED",
        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",
        verified_script_execution=True)
    monitor = newrelic.synthetics.ScriptMonitor("monitor",
        status="ENABLED",
        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"),
    			VerifiedScriptExecution: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = synthetics.NewScriptMonitor(ctx, "monitor", &synthetics.ScriptMonitorArgs{
    			Status:                             pulumi.String("ENABLED"),
    			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",
            VerifiedScriptExecution = true,
        });
    
        var monitor = new NewRelic.Synthetics.ScriptMonitor("monitor", new()
        {
            Status = "ENABLED",
            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")
                .verifiedScriptExecution(true)
                .build());
    
            var monitor = new ScriptMonitor("monitor", ScriptMonitorArgs.builder()        
                .status("ENABLED")
                .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
          verifiedScriptExecution: true
      monitor:
        type: newrelic:synthetics:ScriptMonitor
        properties:
          status: ENABLED
          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[int] = 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.

    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 = 0,
        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.Int(0),
    	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(0)
        .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=0,
        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: 0,
        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: 0
        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
    AccountId int
    The account in which the Synthetics monitor will be created.
    DeviceOrientation string
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    DeviceType string
    Device emulation type field. Valid values are MOBILE and TABLET.
    EnableScreenshotOnFailureAndScript bool
    Capture a screenshot during job execution.
    LocationPrivates List<Pulumi.NewRelic.Synthetics.Inputs.ScriptMonitorLocationPrivate>
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_private is required.
    LocationsPublics 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 either locations_public or location_private is required.
    Name string
    The name for the monitor.
    RuntimeType string
    The runtime that the monitor will use to run jobs.
    RuntimeTypeVersion string
    The specific version of the runtime type selected.
    Script string
    The script that the monitor runs.
    ScriptLanguage string
    The programing language that should execute the script.
    Tags List<Pulumi.NewRelic.Synthetics.Inputs.ScriptMonitorTag>

    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 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
    AccountId int
    The account in which the Synthetics monitor will be created.
    DeviceOrientation string
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    DeviceType string
    Device emulation type field. Valid values are MOBILE and TABLET.
    EnableScreenshotOnFailureAndScript bool
    Capture a screenshot during job execution.
    LocationPrivates []ScriptMonitorLocationPrivateArgs
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_private is required.
    LocationsPublics []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 either locations_public or location_private is required.
    Name string
    The name for the monitor.
    RuntimeType string
    The runtime that the monitor will use to run jobs.
    RuntimeTypeVersion string
    The specific version of the runtime type selected.
    Script string
    The script that the monitor runs.
    ScriptLanguage string
    The programing language that should execute the script.
    Tags []ScriptMonitorTagArgs

    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 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
    accountId Integer
    The account in which the Synthetics monitor will be created.
    deviceOrientation String
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    deviceType String
    Device emulation type field. Valid values are MOBILE and TABLET.
    enableScreenshotOnFailureAndScript Boolean
    Capture a screenshot during job execution.
    locationPrivates List<ScriptMonitorLocationPrivate>
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_private is required.
    locationsPublics 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 either locations_public or location_private is required.
    name String
    The name for the monitor.
    runtimeType String
    The runtime that the monitor will use to run jobs.
    runtimeTypeVersion String
    The specific version of the runtime type selected.
    script String
    The script that the monitor runs.
    scriptLanguage String
    The programing language that should execute the script.
    tags List<ScriptMonitorTag>

    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 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
    accountId number
    The account in which the Synthetics monitor will be created.
    deviceOrientation string
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    deviceType string
    Device emulation type field. Valid values are MOBILE and TABLET.
    enableScreenshotOnFailureAndScript boolean
    Capture a screenshot during job execution.
    locationPrivates ScriptMonitorLocationPrivate[]
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_private is required.
    locationsPublics 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 either locations_public or location_private is required.
    name string
    The name for the monitor.
    runtimeType string
    The runtime that the monitor will use to run jobs.
    runtimeTypeVersion string
    The specific version of the runtime type selected.
    script string
    The script that the monitor runs.
    scriptLanguage string
    The programing language that should execute the script.
    tags ScriptMonitorTag[]

    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 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 int
    The account in which the Synthetics monitor will be created.
    device_orientation str
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    device_type str
    Device emulation type field. Valid values are MOBILE and TABLET.
    enable_screenshot_on_failure_and_script bool
    Capture a screenshot during job execution.
    location_privates Sequence[ScriptMonitorLocationPrivateArgs]
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_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 either locations_public or location_private is required.
    name str
    The name for the monitor.
    runtime_type str
    The runtime that the monitor will use to run jobs.
    runtime_type_version str
    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.
    tags Sequence[ScriptMonitorTagArgs]

    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 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
    accountId Number
    The account in which the Synthetics monitor will be created.
    deviceOrientation String
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    deviceType String
    Device emulation type field. Valid values are MOBILE and TABLET.
    enableScreenshotOnFailureAndScript Boolean
    Capture a screenshot during job execution.
    locationPrivates 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 or location_private is required.
    locationsPublics 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 either locations_public or location_private is required.
    name String
    The name for the monitor.
    runtimeType String
    The runtime that the monitor will use to run jobs.
    runtimeTypeVersion String
    The specific version of the runtime type selected.
    script String
    The script that the monitor runs.
    scriptLanguage String
    The programing language that should execute the script.
    tags 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 argument:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ScriptMonitor resource produces the following output properties:

    Guid string
    The unique identifier for the Synthetics private location in New Relic.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeriodInMinutes int
    The interval in minutes at which Synthetic monitor should run.
    Guid string
    The unique identifier for the Synthetics private location in New Relic.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeriodInMinutes int
    The interval in minutes at which Synthetic monitor should run.
    guid String
    The unique identifier for the Synthetics private location in New Relic.
    id String
    The provider-assigned unique ID for this managed resource.
    periodInMinutes Integer
    The interval in minutes at which Synthetic monitor should run.
    guid string
    The unique identifier for the Synthetics private location in New Relic.
    id string
    The provider-assigned unique ID for this managed resource.
    periodInMinutes number
    The interval in minutes at which Synthetic monitor should run.
    guid str
    The unique identifier for the Synthetics private location in New Relic.
    id str
    The provider-assigned unique ID for this managed resource.
    period_in_minutes int
    The interval in minutes at which Synthetic monitor should run.
    guid String
    The unique identifier for the Synthetics private location in New Relic.
    id String
    The provider-assigned unique ID for this managed resource.
    periodInMinutes Number
    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[int] = 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) -> 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.
    The following state arguments are supported:
    AccountId int
    The account in which the Synthetics monitor will be created.
    DeviceOrientation string
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    DeviceType string
    Device emulation type field. Valid values are MOBILE and TABLET.
    EnableScreenshotOnFailureAndScript bool
    Capture a screenshot during job execution.
    Guid string
    The unique identifier for the Synthetics private location in New Relic.
    LocationPrivates List<Pulumi.NewRelic.Synthetics.Inputs.ScriptMonitorLocationPrivate>
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_private is required.
    LocationsPublics 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 either locations_public or location_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, or EVERY_DAY.
    PeriodInMinutes int
    The interval in minutes at which Synthetic monitor should run.
    RuntimeType string
    The runtime that the monitor will use to run jobs.
    RuntimeTypeVersion string
    The specific version of the runtime type selected.
    Script string
    The script that the monitor runs.
    ScriptLanguage string
    The programing language that should execute the script.
    Status string
    The monitor status (ENABLED or DISABLED).
    Tags List<Pulumi.NewRelic.Synthetics.Inputs.ScriptMonitorTag>

    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 argument:

    Type string
    The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
    AccountId int
    The account in which the Synthetics monitor will be created.
    DeviceOrientation string
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    DeviceType string
    Device emulation type field. Valid values are MOBILE and TABLET.
    EnableScreenshotOnFailureAndScript bool
    Capture a screenshot during job execution.
    Guid string
    The unique identifier for the Synthetics private location in New Relic.
    LocationPrivates []ScriptMonitorLocationPrivateArgs
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_private is required.
    LocationsPublics []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 either locations_public or location_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, or EVERY_DAY.
    PeriodInMinutes int
    The interval in minutes at which Synthetic monitor should run.
    RuntimeType string
    The runtime that the monitor will use to run jobs.
    RuntimeTypeVersion string
    The specific version of the runtime type selected.
    Script string
    The script that the monitor runs.
    ScriptLanguage string
    The programing language that should execute the script.
    Status string
    The monitor status (ENABLED or DISABLED).
    Tags []ScriptMonitorTagArgs

    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 argument:

    Type string
    The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
    accountId Integer
    The account in which the Synthetics monitor will be created.
    deviceOrientation String
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    deviceType String
    Device emulation type field. Valid values are MOBILE and TABLET.
    enableScreenshotOnFailureAndScript Boolean
    Capture a screenshot during job execution.
    guid String
    The unique identifier for the Synthetics private location in New Relic.
    locationPrivates List<ScriptMonitorLocationPrivate>
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_private is required.
    locationsPublics 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 either locations_public or location_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, or EVERY_DAY.
    periodInMinutes Integer
    The interval in minutes at which Synthetic monitor should run.
    runtimeType String
    The runtime that the monitor will use to run jobs.
    runtimeTypeVersion String
    The specific version of the runtime type selected.
    script String
    The script that the monitor runs.
    scriptLanguage String
    The programing language that should execute the script.
    status String
    The monitor status (ENABLED or DISABLED).
    tags List<ScriptMonitorTag>

    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 argument:

    type String
    The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
    accountId number
    The account in which the Synthetics monitor will be created.
    deviceOrientation string
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    deviceType string
    Device emulation type field. Valid values are MOBILE and TABLET.
    enableScreenshotOnFailureAndScript boolean
    Capture a screenshot during job execution.
    guid string
    The unique identifier for the Synthetics private location in New Relic.
    locationPrivates ScriptMonitorLocationPrivate[]
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_private is required.
    locationsPublics 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 either locations_public or location_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, or EVERY_DAY.
    periodInMinutes number
    The interval in minutes at which Synthetic monitor should run.
    runtimeType string
    The runtime that the monitor will use to run jobs.
    runtimeTypeVersion string
    The specific version of the runtime type selected.
    script string
    The script that the monitor runs.
    scriptLanguage string
    The programing language that should execute the script.
    status string
    The monitor status (ENABLED or DISABLED).
    tags ScriptMonitorTag[]

    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 argument:

    type string
    The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
    account_id int
    The account in which the Synthetics monitor will be created.
    device_orientation str
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    device_type str
    Device emulation type field. Valid values are MOBILE and TABLET.
    enable_screenshot_on_failure_and_script bool
    Capture a screenshot during job execution.
    guid str
    The unique identifier for the Synthetics private location in New Relic.
    location_privates Sequence[ScriptMonitorLocationPrivateArgs]
    The location the monitor will run from. See Nested location_private blocks below for details. At least one of either locations_public or location_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 either locations_public or location_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, or EVERY_DAY.
    period_in_minutes int
    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_version str
    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).
    tags Sequence[ScriptMonitorTagArgs]

    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 argument:

    type str
    The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
    accountId Number
    The account in which the Synthetics monitor will be created.
    deviceOrientation String
    Device emulation orientation field. Valid values are LANDSCAPE and PORTRAIT.
    deviceType String
    Device emulation type field. Valid values are MOBILE and TABLET.
    enableScreenshotOnFailureAndScript Boolean
    Capture a screenshot during job execution.
    guid String
    The unique identifier for the Synthetics private location in New Relic.
    locationPrivates 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 or location_private is required.
    locationsPublics 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 either locations_public or location_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, or EVERY_DAY.
    periodInMinutes Number
    The interval in minutes at which Synthetic monitor should run.
    runtimeType String
    The runtime that the monitor will use to run jobs.
    runtimeTypeVersion String
    The specific version of the runtime type selected.
    script String
    The script that the monitor runs.
    scriptLanguage String
    The programing language that should execute the script.
    status String
    The monitor status (ENABLED or DISABLED).
    tags 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 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.
    VsePassword 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.
    VsePassword 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.
    vsePassword 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.
    vsePassword 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.
    vsePassword String
    The location's Verified Script Execution password, Only necessary if Verified Script Execution is enabled for the location.

    ScriptMonitorTag, ScriptMonitorTagArgs

    Key string
    Name of the tag key.
    Values List<string>
    Values associated with the tag key.
    Key string
    Name of the tag key.
    Values []string
    Values associated with the tag key.
    key String
    Name of the tag key.
    values List<String>
    Values associated with the tag key.
    key string
    Name of the tag key.
    values string[]
    Values associated with the tag key.
    key str
    Name of the tag key.
    values Sequence[str]
    Values associated with the tag key.
    key String
    Name of the tag key.
    values List<String>
    Values associated with the tag key.

    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.
    newrelic logo
    New Relic v5.22.1 published on Friday, Mar 29, 2024 by Pulumi