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

newrelic.synthetics.Monitor

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 Simple or Browser Synthetics Monitor in New Relic.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const monitor = new newrelic.synthetics.Monitor("monitor", {
        bypassHeadRequest: true,
        customHeaders: [{
            name: "some_name",
            value: "some_value",
        }],
        locationsPublics: ["AP_SOUTH_1"],
        period: "EVERY_MINUTE",
        status: "ENABLED",
        tags: [{
            key: "some_key",
            values: ["some_value"],
        }],
        treatRedirectAsFailure: true,
        type: "SIMPLE",
        uri: "https://www.one.newrelic.com",
        validationString: "success",
        verifySsl: true,
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    monitor = newrelic.synthetics.Monitor("monitor",
        bypass_head_request=True,
        custom_headers=[newrelic.synthetics.MonitorCustomHeaderArgs(
            name="some_name",
            value="some_value",
        )],
        locations_publics=["AP_SOUTH_1"],
        period="EVERY_MINUTE",
        status="ENABLED",
        tags=[newrelic.synthetics.MonitorTagArgs(
            key="some_key",
            values=["some_value"],
        )],
        treat_redirect_as_failure=True,
        type="SIMPLE",
        uri="https://www.one.newrelic.com",
        validation_string="success",
        verify_ssl=True)
    
    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.NewMonitor(ctx, "monitor", &synthetics.MonitorArgs{
    			BypassHeadRequest: pulumi.Bool(true),
    			CustomHeaders: synthetics.MonitorCustomHeaderArray{
    				&synthetics.MonitorCustomHeaderArgs{
    					Name:  pulumi.String("some_name"),
    					Value: pulumi.String("some_value"),
    				},
    			},
    			LocationsPublics: pulumi.StringArray{
    				pulumi.String("AP_SOUTH_1"),
    			},
    			Period: pulumi.String("EVERY_MINUTE"),
    			Status: pulumi.String("ENABLED"),
    			Tags: synthetics.MonitorTagArray{
    				&synthetics.MonitorTagArgs{
    					Key: pulumi.String("some_key"),
    					Values: pulumi.StringArray{
    						pulumi.String("some_value"),
    					},
    				},
    			},
    			TreatRedirectAsFailure: pulumi.Bool(true),
    			Type:                   pulumi.String("SIMPLE"),
    			Uri:                    pulumi.String("https://www.one.newrelic.com"),
    			ValidationString:       pulumi.String("success"),
    			VerifySsl:              pulumi.Bool(true),
    		})
    		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.Monitor("monitor", new()
        {
            BypassHeadRequest = true,
            CustomHeaders = new[]
            {
                new NewRelic.Synthetics.Inputs.MonitorCustomHeaderArgs
                {
                    Name = "some_name",
                    Value = "some_value",
                },
            },
            LocationsPublics = new[]
            {
                "AP_SOUTH_1",
            },
            Period = "EVERY_MINUTE",
            Status = "ENABLED",
            Tags = new[]
            {
                new NewRelic.Synthetics.Inputs.MonitorTagArgs
                {
                    Key = "some_key",
                    Values = new[]
                    {
                        "some_value",
                    },
                },
            },
            TreatRedirectAsFailure = true,
            Type = "SIMPLE",
            Uri = "https://www.one.newrelic.com",
            ValidationString = "success",
            VerifySsl = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.newrelic.synthetics.Monitor;
    import com.pulumi.newrelic.synthetics.MonitorArgs;
    import com.pulumi.newrelic.synthetics.inputs.MonitorCustomHeaderArgs;
    import com.pulumi.newrelic.synthetics.inputs.MonitorTagArgs;
    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 Monitor("monitor", MonitorArgs.builder()        
                .bypassHeadRequest(true)
                .customHeaders(MonitorCustomHeaderArgs.builder()
                    .name("some_name")
                    .value("some_value")
                    .build())
                .locationsPublics("AP_SOUTH_1")
                .period("EVERY_MINUTE")
                .status("ENABLED")
                .tags(MonitorTagArgs.builder()
                    .key("some_key")
                    .values("some_value")
                    .build())
                .treatRedirectAsFailure(true)
                .type("SIMPLE")
                .uri("https://www.one.newrelic.com")
                .validationString("success")
                .verifySsl(true)
                .build());
    
        }
    }
    
    resources:
      monitor:
        type: newrelic:synthetics:Monitor
        properties:
          bypassHeadRequest: true
          customHeaders:
            - name: some_name
              value: some_value
          locationsPublics:
            - AP_SOUTH_1
          period: EVERY_MINUTE
          status: ENABLED
          tags:
            - key: some_key
              values:
                - some_value
          treatRedirectAsFailure: true
          type: SIMPLE
          uri: https://www.one.newrelic.com
          validationString: success
          verifySsl: true
    
    Type: SIMPLE BROWSER
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const monitor = new newrelic.synthetics.Monitor("monitor", {
        customHeaders: [{
            name: "some_name",
            value: "some_value",
        }],
        enableScreenshotOnFailureAndScript: true,
        locationsPublics: ["AP_SOUTH_1"],
        period: "EVERY_MINUTE",
        status: "ENABLED",
        tags: [{
            key: "some_key",
            values: ["some_value"],
        }],
        type: "BROWSER",
        uri: "https://www.one.newrelic.com",
        validationString: "success",
        verifySsl: true,
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    monitor = newrelic.synthetics.Monitor("monitor",
        custom_headers=[newrelic.synthetics.MonitorCustomHeaderArgs(
            name="some_name",
            value="some_value",
        )],
        enable_screenshot_on_failure_and_script=True,
        locations_publics=["AP_SOUTH_1"],
        period="EVERY_MINUTE",
        status="ENABLED",
        tags=[newrelic.synthetics.MonitorTagArgs(
            key="some_key",
            values=["some_value"],
        )],
        type="BROWSER",
        uri="https://www.one.newrelic.com",
        validation_string="success",
        verify_ssl=True)
    
    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.NewMonitor(ctx, "monitor", &synthetics.MonitorArgs{
    			CustomHeaders: synthetics.MonitorCustomHeaderArray{
    				&synthetics.MonitorCustomHeaderArgs{
    					Name:  pulumi.String("some_name"),
    					Value: pulumi.String("some_value"),
    				},
    			},
    			EnableScreenshotOnFailureAndScript: pulumi.Bool(true),
    			LocationsPublics: pulumi.StringArray{
    				pulumi.String("AP_SOUTH_1"),
    			},
    			Period: pulumi.String("EVERY_MINUTE"),
    			Status: pulumi.String("ENABLED"),
    			Tags: synthetics.MonitorTagArray{
    				&synthetics.MonitorTagArgs{
    					Key: pulumi.String("some_key"),
    					Values: pulumi.StringArray{
    						pulumi.String("some_value"),
    					},
    				},
    			},
    			Type:             pulumi.String("BROWSER"),
    			Uri:              pulumi.String("https://www.one.newrelic.com"),
    			ValidationString: pulumi.String("success"),
    			VerifySsl:        pulumi.Bool(true),
    		})
    		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.Monitor("monitor", new()
        {
            CustomHeaders = new[]
            {
                new NewRelic.Synthetics.Inputs.MonitorCustomHeaderArgs
                {
                    Name = "some_name",
                    Value = "some_value",
                },
            },
            EnableScreenshotOnFailureAndScript = true,
            LocationsPublics = new[]
            {
                "AP_SOUTH_1",
            },
            Period = "EVERY_MINUTE",
            Status = "ENABLED",
            Tags = new[]
            {
                new NewRelic.Synthetics.Inputs.MonitorTagArgs
                {
                    Key = "some_key",
                    Values = new[]
                    {
                        "some_value",
                    },
                },
            },
            Type = "BROWSER",
            Uri = "https://www.one.newrelic.com",
            ValidationString = "success",
            VerifySsl = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.newrelic.synthetics.Monitor;
    import com.pulumi.newrelic.synthetics.MonitorArgs;
    import com.pulumi.newrelic.synthetics.inputs.MonitorCustomHeaderArgs;
    import com.pulumi.newrelic.synthetics.inputs.MonitorTagArgs;
    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 Monitor("monitor", MonitorArgs.builder()        
                .customHeaders(MonitorCustomHeaderArgs.builder()
                    .name("some_name")
                    .value("some_value")
                    .build())
                .enableScreenshotOnFailureAndScript(true)
                .locationsPublics("AP_SOUTH_1")
                .period("EVERY_MINUTE")
                .status("ENABLED")
                .tags(MonitorTagArgs.builder()
                    .key("some_key")
                    .values("some_value")
                    .build())
                .type("BROWSER")
                .uri("https://www.one.newrelic.com")
                .validationString("success")
                .verifySsl(true)
                .build());
    
        }
    }
    
    resources:
      monitor:
        type: newrelic:synthetics:Monitor
        properties:
          customHeaders:
            - name: some_name
              value: some_value
          enableScreenshotOnFailureAndScript: true
          locationsPublics:
            - AP_SOUTH_1
          period: EVERY_MINUTE
          status: ENABLED
          tags:
            - key: some_key
              values:
                - some_value
          type: BROWSER
          uri: https://www.one.newrelic.com
          validationString: success
          verifySsl: true
    

    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: SIMPLE
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const location = new newrelic.synthetics.PrivateLocation("location", {
        description: "Example private location",
        verifiedScriptExecution: false,
    });
    const monitor = new newrelic.synthetics.Monitor("monitor", {
        status: "ENABLED",
        period: "EVERY_MINUTE",
        uri: "https://www.one.newrelic.com",
        type: "SIMPLE",
        locationsPrivates: [location.id],
        customHeaders: [{
            name: "some_name",
            value: "some_value",
        }],
        treatRedirectAsFailure: true,
        validationString: "success",
        bypassHeadRequest: true,
        verifySsl: true,
        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=False)
    monitor = newrelic.synthetics.Monitor("monitor",
        status="ENABLED",
        period="EVERY_MINUTE",
        uri="https://www.one.newrelic.com",
        type="SIMPLE",
        locations_privates=[location.id],
        custom_headers=[newrelic.synthetics.MonitorCustomHeaderArgs(
            name="some_name",
            value="some_value",
        )],
        treat_redirect_as_failure=True,
        validation_string="success",
        bypass_head_request=True,
        verify_ssl=True,
        tags=[newrelic.synthetics.MonitorTagArgs(
            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(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = synthetics.NewMonitor(ctx, "monitor", &synthetics.MonitorArgs{
    			Status: pulumi.String("ENABLED"),
    			Period: pulumi.String("EVERY_MINUTE"),
    			Uri:    pulumi.String("https://www.one.newrelic.com"),
    			Type:   pulumi.String("SIMPLE"),
    			LocationsPrivates: pulumi.StringArray{
    				location.ID(),
    			},
    			CustomHeaders: synthetics.MonitorCustomHeaderArray{
    				&synthetics.MonitorCustomHeaderArgs{
    					Name:  pulumi.String("some_name"),
    					Value: pulumi.String("some_value"),
    				},
    			},
    			TreatRedirectAsFailure: pulumi.Bool(true),
    			ValidationString:       pulumi.String("success"),
    			BypassHeadRequest:      pulumi.Bool(true),
    			VerifySsl:              pulumi.Bool(true),
    			Tags: synthetics.MonitorTagArray{
    				&synthetics.MonitorTagArgs{
    					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 = false,
        });
    
        var monitor = new NewRelic.Synthetics.Monitor("monitor", new()
        {
            Status = "ENABLED",
            Period = "EVERY_MINUTE",
            Uri = "https://www.one.newrelic.com",
            Type = "SIMPLE",
            LocationsPrivates = new[]
            {
                location.Id,
            },
            CustomHeaders = new[]
            {
                new NewRelic.Synthetics.Inputs.MonitorCustomHeaderArgs
                {
                    Name = "some_name",
                    Value = "some_value",
                },
            },
            TreatRedirectAsFailure = true,
            ValidationString = "success",
            BypassHeadRequest = true,
            VerifySsl = true,
            Tags = new[]
            {
                new NewRelic.Synthetics.Inputs.MonitorTagArgs
                {
                    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.Monitor;
    import com.pulumi.newrelic.synthetics.MonitorArgs;
    import com.pulumi.newrelic.synthetics.inputs.MonitorCustomHeaderArgs;
    import com.pulumi.newrelic.synthetics.inputs.MonitorTagArgs;
    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(false)
                .build());
    
            var monitor = new Monitor("monitor", MonitorArgs.builder()        
                .status("ENABLED")
                .period("EVERY_MINUTE")
                .uri("https://www.one.newrelic.com")
                .type("SIMPLE")
                .locationsPrivates(location.id())
                .customHeaders(MonitorCustomHeaderArgs.builder()
                    .name("some_name")
                    .value("some_value")
                    .build())
                .treatRedirectAsFailure(true)
                .validationString("success")
                .bypassHeadRequest(true)
                .verifySsl(true)
                .tags(MonitorTagArgs.builder()
                    .key("some_key")
                    .values("some_value")
                    .build())
                .build());
    
        }
    }
    
    resources:
      location:
        type: newrelic:synthetics:PrivateLocation
        properties:
          description: Example private location
          verifiedScriptExecution: false
      monitor:
        type: newrelic:synthetics:Monitor
        properties:
          status: ENABLED
          period: EVERY_MINUTE
          uri: https://www.one.newrelic.com
          type: SIMPLE
          locationsPrivates:
            - ${location.id}
          customHeaders:
            - name: some_name
              value: some_value
          treatRedirectAsFailure: true
          validationString: success
          bypassHeadRequest: true
          verifySsl: true
          tags:
            - key: some_key
              values:
                - some_value
    
    Type: BROWSER
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const location = new newrelic.synthetics.PrivateLocation("location", {
        description: "Example private location",
        verifiedScriptExecution: false,
    });
    const monitor = new newrelic.synthetics.Monitor("monitor", {
        status: "ENABLED",
        type: "BROWSER",
        uri: "https://www.one.newrelic.com",
        period: "EVERY_MINUTE",
        locationsPrivates: [location.id],
        customHeaders: [{
            name: "some_name",
            value: "some_value",
        }],
        enableScreenshotOnFailureAndScript: true,
        validationString: "success",
        verifySsl: true,
        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="Example private location",
        verified_script_execution=False)
    monitor = newrelic.synthetics.Monitor("monitor",
        status="ENABLED",
        type="BROWSER",
        uri="https://www.one.newrelic.com",
        period="EVERY_MINUTE",
        locations_privates=[location.id],
        custom_headers=[newrelic.synthetics.MonitorCustomHeaderArgs(
            name="some_name",
            value="some_value",
        )],
        enable_screenshot_on_failure_and_script=True,
        validation_string="success",
        verify_ssl=True,
        runtime_type_version="100",
        runtime_type="CHROME_BROWSER",
        script_language="JAVASCRIPT",
        tags=[newrelic.synthetics.MonitorTagArgs(
            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(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = synthetics.NewMonitor(ctx, "monitor", &synthetics.MonitorArgs{
    			Status: pulumi.String("ENABLED"),
    			Type:   pulumi.String("BROWSER"),
    			Uri:    pulumi.String("https://www.one.newrelic.com"),
    			Period: pulumi.String("EVERY_MINUTE"),
    			LocationsPrivates: pulumi.StringArray{
    				location.ID(),
    			},
    			CustomHeaders: synthetics.MonitorCustomHeaderArray{
    				&synthetics.MonitorCustomHeaderArgs{
    					Name:  pulumi.String("some_name"),
    					Value: pulumi.String("some_value"),
    				},
    			},
    			EnableScreenshotOnFailureAndScript: pulumi.Bool(true),
    			ValidationString:                   pulumi.String("success"),
    			VerifySsl:                          pulumi.Bool(true),
    			RuntimeTypeVersion:                 pulumi.String("100"),
    			RuntimeType:                        pulumi.String("CHROME_BROWSER"),
    			ScriptLanguage:                     pulumi.String("JAVASCRIPT"),
    			Tags: synthetics.MonitorTagArray{
    				&synthetics.MonitorTagArgs{
    					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 = false,
        });
    
        var monitor = new NewRelic.Synthetics.Monitor("monitor", new()
        {
            Status = "ENABLED",
            Type = "BROWSER",
            Uri = "https://www.one.newrelic.com",
            Period = "EVERY_MINUTE",
            LocationsPrivates = new[]
            {
                location.Id,
            },
            CustomHeaders = new[]
            {
                new NewRelic.Synthetics.Inputs.MonitorCustomHeaderArgs
                {
                    Name = "some_name",
                    Value = "some_value",
                },
            },
            EnableScreenshotOnFailureAndScript = true,
            ValidationString = "success",
            VerifySsl = true,
            RuntimeTypeVersion = "100",
            RuntimeType = "CHROME_BROWSER",
            ScriptLanguage = "JAVASCRIPT",
            Tags = new[]
            {
                new NewRelic.Synthetics.Inputs.MonitorTagArgs
                {
                    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.Monitor;
    import com.pulumi.newrelic.synthetics.MonitorArgs;
    import com.pulumi.newrelic.synthetics.inputs.MonitorCustomHeaderArgs;
    import com.pulumi.newrelic.synthetics.inputs.MonitorTagArgs;
    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(false)
                .build());
    
            var monitor = new Monitor("monitor", MonitorArgs.builder()        
                .status("ENABLED")
                .type("BROWSER")
                .uri("https://www.one.newrelic.com")
                .period("EVERY_MINUTE")
                .locationsPrivates(location.id())
                .customHeaders(MonitorCustomHeaderArgs.builder()
                    .name("some_name")
                    .value("some_value")
                    .build())
                .enableScreenshotOnFailureAndScript(true)
                .validationString("success")
                .verifySsl(true)
                .runtimeTypeVersion("100")
                .runtimeType("CHROME_BROWSER")
                .scriptLanguage("JAVASCRIPT")
                .tags(MonitorTagArgs.builder()
                    .key("some_key")
                    .values("some_value")
                    .build())
                .build());
    
        }
    }
    
    resources:
      location:
        type: newrelic:synthetics:PrivateLocation
        properties:
          description: Example private location
          verifiedScriptExecution: false
      monitor:
        type: newrelic:synthetics:Monitor
        properties:
          status: ENABLED
          type: BROWSER
          uri: https://www.one.newrelic.com
          period: EVERY_MINUTE
          locationsPrivates:
            - ${location.id}
          customHeaders:
            - name: some_name
              value: some_value
          enableScreenshotOnFailureAndScript: true
          validationString: success
          verifySsl: true
          runtimeTypeVersion: '100'
          runtimeType: CHROME_BROWSER
          scriptLanguage: JAVASCRIPT
          tags:
            - key: some_key
              values:
                - some_value
    

    Create Monitor Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);
    @overload
    def Monitor(resource_name: str,
                args: MonitorArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Monitor(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                status: Optional[str] = None,
                type: Optional[str] = None,
                runtime_type: Optional[str] = None,
                runtime_type_version: Optional[str] = None,
                device_type: Optional[str] = None,
                enable_screenshot_on_failure_and_script: Optional[bool] = None,
                locations_privates: Optional[Sequence[str]] = None,
                locations_publics: Optional[Sequence[str]] = None,
                name: Optional[str] = None,
                period: Optional[str] = None,
                account_id: Optional[int] = None,
                device_orientation: Optional[str] = None,
                script_language: Optional[str] = None,
                custom_headers: Optional[Sequence[MonitorCustomHeaderArgs]] = None,
                tags: Optional[Sequence[MonitorTagArgs]] = None,
                treat_redirect_as_failure: Optional[bool] = None,
                bypass_head_request: Optional[bool] = None,
                uri: Optional[str] = None,
                validation_string: Optional[str] = None,
                verify_ssl: Optional[bool] = None)
    func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)
    public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)
    public Monitor(String name, MonitorArgs args)
    public Monitor(String name, MonitorArgs args, CustomResourceOptions options)
    
    type: newrelic:synthetics:Monitor
    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 MonitorArgs
    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 MonitorArgs
    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 MonitorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MonitorArgs
    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 monitorResource = new NewRelic.Synthetics.Monitor("monitorResource", new()
    {
        Status = "string",
        Type = "string",
        RuntimeType = "string",
        RuntimeTypeVersion = "string",
        DeviceType = "string",
        EnableScreenshotOnFailureAndScript = false,
        LocationsPrivates = new[]
        {
            "string",
        },
        LocationsPublics = new[]
        {
            "string",
        },
        Name = "string",
        Period = "string",
        AccountId = 0,
        DeviceOrientation = "string",
        ScriptLanguage = "string",
        CustomHeaders = new[]
        {
            new NewRelic.Synthetics.Inputs.MonitorCustomHeaderArgs
            {
                Name = "string",
                Value = "string",
            },
        },
        Tags = new[]
        {
            new NewRelic.Synthetics.Inputs.MonitorTagArgs
            {
                Key = "string",
                Values = new[]
                {
                    "string",
                },
            },
        },
        TreatRedirectAsFailure = false,
        BypassHeadRequest = false,
        Uri = "string",
        ValidationString = "string",
        VerifySsl = false,
    });
    
    example, err := synthetics.NewMonitor(ctx, "monitorResource", &synthetics.MonitorArgs{
    	Status:                             pulumi.String("string"),
    	Type:                               pulumi.String("string"),
    	RuntimeType:                        pulumi.String("string"),
    	RuntimeTypeVersion:                 pulumi.String("string"),
    	DeviceType:                         pulumi.String("string"),
    	EnableScreenshotOnFailureAndScript: pulumi.Bool(false),
    	LocationsPrivates: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LocationsPublics: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:              pulumi.String("string"),
    	Period:            pulumi.String("string"),
    	AccountId:         pulumi.Int(0),
    	DeviceOrientation: pulumi.String("string"),
    	ScriptLanguage:    pulumi.String("string"),
    	CustomHeaders: synthetics.MonitorCustomHeaderArray{
    		&synthetics.MonitorCustomHeaderArgs{
    			Name:  pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	Tags: synthetics.MonitorTagArray{
    		&synthetics.MonitorTagArgs{
    			Key: pulumi.String("string"),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	TreatRedirectAsFailure: pulumi.Bool(false),
    	BypassHeadRequest:      pulumi.Bool(false),
    	Uri:                    pulumi.String("string"),
    	ValidationString:       pulumi.String("string"),
    	VerifySsl:              pulumi.Bool(false),
    })
    
    var monitorResource = new Monitor("monitorResource", MonitorArgs.builder()        
        .status("string")
        .type("string")
        .runtimeType("string")
        .runtimeTypeVersion("string")
        .deviceType("string")
        .enableScreenshotOnFailureAndScript(false)
        .locationsPrivates("string")
        .locationsPublics("string")
        .name("string")
        .period("string")
        .accountId(0)
        .deviceOrientation("string")
        .scriptLanguage("string")
        .customHeaders(MonitorCustomHeaderArgs.builder()
            .name("string")
            .value("string")
            .build())
        .tags(MonitorTagArgs.builder()
            .key("string")
            .values("string")
            .build())
        .treatRedirectAsFailure(false)
        .bypassHeadRequest(false)
        .uri("string")
        .validationString("string")
        .verifySsl(false)
        .build());
    
    monitor_resource = newrelic.synthetics.Monitor("monitorResource",
        status="string",
        type="string",
        runtime_type="string",
        runtime_type_version="string",
        device_type="string",
        enable_screenshot_on_failure_and_script=False,
        locations_privates=["string"],
        locations_publics=["string"],
        name="string",
        period="string",
        account_id=0,
        device_orientation="string",
        script_language="string",
        custom_headers=[newrelic.synthetics.MonitorCustomHeaderArgs(
            name="string",
            value="string",
        )],
        tags=[newrelic.synthetics.MonitorTagArgs(
            key="string",
            values=["string"],
        )],
        treat_redirect_as_failure=False,
        bypass_head_request=False,
        uri="string",
        validation_string="string",
        verify_ssl=False)
    
    const monitorResource = new newrelic.synthetics.Monitor("monitorResource", {
        status: "string",
        type: "string",
        runtimeType: "string",
        runtimeTypeVersion: "string",
        deviceType: "string",
        enableScreenshotOnFailureAndScript: false,
        locationsPrivates: ["string"],
        locationsPublics: ["string"],
        name: "string",
        period: "string",
        accountId: 0,
        deviceOrientation: "string",
        scriptLanguage: "string",
        customHeaders: [{
            name: "string",
            value: "string",
        }],
        tags: [{
            key: "string",
            values: ["string"],
        }],
        treatRedirectAsFailure: false,
        bypassHeadRequest: false,
        uri: "string",
        validationString: "string",
        verifySsl: false,
    });
    
    type: newrelic:synthetics:Monitor
    properties:
        accountId: 0
        bypassHeadRequest: false
        customHeaders:
            - name: string
              value: string
        deviceOrientation: string
        deviceType: string
        enableScreenshotOnFailureAndScript: false
        locationsPrivates:
            - string
        locationsPublics:
            - string
        name: string
        period: string
        runtimeType: string
        runtimeTypeVersion: string
        scriptLanguage: string
        status: string
        tags:
            - key: string
              values:
                - string
        treatRedirectAsFailure: false
        type: string
        uri: string
        validationString: string
        verifySsl: false
    

    Monitor 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 Monitor resource accepts the following input properties:

    Status string
    The monitor status (ENABLED or DISABLED).
    Type string
    The monitor type. Valid values are SIMPLE and BROWSER.
    AccountId int
    The account in which the Synthetics monitor will be created.
    BypassHeadRequest bool

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    CustomHeaders List<Pulumi.NewRelic.Synthetics.Inputs.MonitorCustomHeader>
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    LocationsPrivates List<string>
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    LocationsPublics List<string>
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    Name string
    The human-readable identifier 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.
    RuntimeType string
    The runtime type that the monitor will run.
    RuntimeTypeVersion string
    The runtime type that the monitor will run.
    ScriptLanguage string
    The programing language that should execute the script.
    Tags List<Pulumi.NewRelic.Synthetics.Inputs.MonitorTag>

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    TreatRedirectAsFailure bool
    Categorize redirects during a monitor job as a failure.
    Uri string
    The URI the monitor runs against.
    ValidationString string
    Validation text for monitor to search for at given URI.
    VerifySsl bool
    Monitor should validate SSL certificate chain.
    Status string
    The monitor status (ENABLED or DISABLED).
    Type string
    The monitor type. Valid values are SIMPLE and BROWSER.
    AccountId int
    The account in which the Synthetics monitor will be created.
    BypassHeadRequest bool

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    CustomHeaders []MonitorCustomHeaderArgs
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    LocationsPrivates []string
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    LocationsPublics []string
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    Name string
    The human-readable identifier 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.
    RuntimeType string
    The runtime type that the monitor will run.
    RuntimeTypeVersion string
    The runtime type that the monitor will run.
    ScriptLanguage string
    The programing language that should execute the script.
    Tags []MonitorTagArgs

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    TreatRedirectAsFailure bool
    Categorize redirects during a monitor job as a failure.
    Uri string
    The URI the monitor runs against.
    ValidationString string
    Validation text for monitor to search for at given URI.
    VerifySsl bool
    Monitor should validate SSL certificate chain.
    status String
    The monitor status (ENABLED or DISABLED).
    type String
    The monitor type. Valid values are SIMPLE and BROWSER.
    accountId Integer
    The account in which the Synthetics monitor will be created.
    bypassHeadRequest Boolean

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    customHeaders List<MonitorCustomHeader>
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    locationsPrivates List<String>
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    locationsPublics List<String>
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    name String
    The human-readable identifier 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.
    runtimeType String
    The runtime type that the monitor will run.
    runtimeTypeVersion String
    The runtime type that the monitor will run.
    scriptLanguage String
    The programing language that should execute the script.
    tags List<MonitorTag>

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    treatRedirectAsFailure Boolean
    Categorize redirects during a monitor job as a failure.
    uri String
    The URI the monitor runs against.
    validationString String
    Validation text for monitor to search for at given URI.
    verifySsl Boolean
    Monitor should validate SSL certificate chain.
    status string
    The monitor status (ENABLED or DISABLED).
    type string
    The monitor type. Valid values are SIMPLE and BROWSER.
    accountId number
    The account in which the Synthetics monitor will be created.
    bypassHeadRequest boolean

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    customHeaders MonitorCustomHeader[]
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    locationsPrivates string[]
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    locationsPublics string[]
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    name string
    The human-readable identifier 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.
    runtimeType string
    The runtime type that the monitor will run.
    runtimeTypeVersion string
    The runtime type that the monitor will run.
    scriptLanguage string
    The programing language that should execute the script.
    tags MonitorTag[]

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    treatRedirectAsFailure boolean
    Categorize redirects during a monitor job as a failure.
    uri string
    The URI the monitor runs against.
    validationString string
    Validation text for monitor to search for at given URI.
    verifySsl boolean
    Monitor should validate SSL certificate chain.
    status str
    The monitor status (ENABLED or DISABLED).
    type str
    The monitor type. Valid values are SIMPLE and BROWSER.
    account_id int
    The account in which the Synthetics monitor will be created.
    bypass_head_request bool

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    custom_headers Sequence[MonitorCustomHeaderArgs]
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    locations_privates Sequence[str]
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    locations_publics Sequence[str]
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    name str
    The human-readable identifier 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.
    runtime_type str
    The runtime type that the monitor will run.
    runtime_type_version str
    The runtime type that the monitor will run.
    script_language str
    The programing language that should execute the script.
    tags Sequence[MonitorTagArgs]

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    treat_redirect_as_failure bool
    Categorize redirects during a monitor job as a failure.
    uri str
    The URI the monitor runs against.
    validation_string str
    Validation text for monitor to search for at given URI.
    verify_ssl bool
    Monitor should validate SSL certificate chain.
    status String
    The monitor status (ENABLED or DISABLED).
    type String
    The monitor type. Valid values are SIMPLE and BROWSER.
    accountId Number
    The account in which the Synthetics monitor will be created.
    bypassHeadRequest Boolean

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    customHeaders List<Property Map>
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    locationsPrivates List<String>
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    locationsPublics List<String>
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    name String
    The human-readable identifier 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.
    runtimeType String
    The runtime type that the monitor will run.
    runtimeTypeVersion String
    The runtime type that the monitor will run.
    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 SIMPLE monitor type supports the following additional arguments:

    treatRedirectAsFailure Boolean
    Categorize redirects during a monitor job as a failure.
    uri String
    The URI the monitor runs against.
    validationString String
    Validation text for monitor to search for at given URI.
    verifySsl Boolean
    Monitor should validate SSL certificate chain.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    PeriodInMinutes int
    The interval in minutes at which Synthetic monitor should run.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeriodInMinutes int
    The interval in minutes at which Synthetic monitor should run.
    id String
    The provider-assigned unique ID for this managed resource.
    periodInMinutes Integer
    The interval in minutes at which Synthetic monitor should run.
    id string
    The provider-assigned unique ID for this managed resource.
    periodInMinutes number
    The interval in minutes at which Synthetic monitor should run.
    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.
    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 Monitor Resource

    Get an existing Monitor 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?: MonitorState, opts?: CustomResourceOptions): Monitor
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[int] = None,
            bypass_head_request: Optional[bool] = None,
            custom_headers: Optional[Sequence[MonitorCustomHeaderArgs]] = None,
            device_orientation: Optional[str] = None,
            device_type: Optional[str] = None,
            enable_screenshot_on_failure_and_script: Optional[bool] = None,
            locations_privates: Optional[Sequence[str]] = 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_language: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[MonitorTagArgs]] = None,
            treat_redirect_as_failure: Optional[bool] = None,
            type: Optional[str] = None,
            uri: Optional[str] = None,
            validation_string: Optional[str] = None,
            verify_ssl: Optional[bool] = None) -> Monitor
    func GetMonitor(ctx *Context, name string, id IDInput, state *MonitorState, opts ...ResourceOption) (*Monitor, error)
    public static Monitor Get(string name, Input<string> id, MonitorState? state, CustomResourceOptions? opts = null)
    public static Monitor get(String name, Output<String> id, MonitorState 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.
    BypassHeadRequest bool

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    CustomHeaders List<Pulumi.NewRelic.Synthetics.Inputs.MonitorCustomHeader>
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    LocationsPrivates List<string>
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    LocationsPublics List<string>
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    Name string
    The human-readable identifier 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 type that the monitor will run.
    RuntimeTypeVersion string
    The runtime type that the monitor will run.
    ScriptLanguage string
    The programing language that should execute the script.
    Status string
    The monitor status (ENABLED or DISABLED).
    Tags List<Pulumi.NewRelic.Synthetics.Inputs.MonitorTag>

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    TreatRedirectAsFailure bool
    Categorize redirects during a monitor job as a failure.
    Type string
    The monitor type. Valid values are SIMPLE and BROWSER.
    Uri string
    The URI the monitor runs against.
    ValidationString string
    Validation text for monitor to search for at given URI.
    VerifySsl bool
    Monitor should validate SSL certificate chain.
    AccountId int
    The account in which the Synthetics monitor will be created.
    BypassHeadRequest bool

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    CustomHeaders []MonitorCustomHeaderArgs
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    LocationsPrivates []string
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    LocationsPublics []string
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    Name string
    The human-readable identifier 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 type that the monitor will run.
    RuntimeTypeVersion string
    The runtime type that the monitor will run.
    ScriptLanguage string
    The programing language that should execute the script.
    Status string
    The monitor status (ENABLED or DISABLED).
    Tags []MonitorTagArgs

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    TreatRedirectAsFailure bool
    Categorize redirects during a monitor job as a failure.
    Type string
    The monitor type. Valid values are SIMPLE and BROWSER.
    Uri string
    The URI the monitor runs against.
    ValidationString string
    Validation text for monitor to search for at given URI.
    VerifySsl bool
    Monitor should validate SSL certificate chain.
    accountId Integer
    The account in which the Synthetics monitor will be created.
    bypassHeadRequest Boolean

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    customHeaders List<MonitorCustomHeader>
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    locationsPrivates List<String>
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    locationsPublics List<String>
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    name String
    The human-readable identifier 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 type that the monitor will run.
    runtimeTypeVersion String
    The runtime type that the monitor will run.
    scriptLanguage String
    The programing language that should execute the script.
    status String
    The monitor status (ENABLED or DISABLED).
    tags List<MonitorTag>

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    treatRedirectAsFailure Boolean
    Categorize redirects during a monitor job as a failure.
    type String
    The monitor type. Valid values are SIMPLE and BROWSER.
    uri String
    The URI the monitor runs against.
    validationString String
    Validation text for monitor to search for at given URI.
    verifySsl Boolean
    Monitor should validate SSL certificate chain.
    accountId number
    The account in which the Synthetics monitor will be created.
    bypassHeadRequest boolean

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    customHeaders MonitorCustomHeader[]
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    locationsPrivates string[]
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    locationsPublics string[]
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    name string
    The human-readable identifier 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 type that the monitor will run.
    runtimeTypeVersion string
    The runtime type that the monitor will run.
    scriptLanguage string
    The programing language that should execute the script.
    status string
    The monitor status (ENABLED or DISABLED).
    tags MonitorTag[]

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    treatRedirectAsFailure boolean
    Categorize redirects during a monitor job as a failure.
    type string
    The monitor type. Valid values are SIMPLE and BROWSER.
    uri string
    The URI the monitor runs against.
    validationString string
    Validation text for monitor to search for at given URI.
    verifySsl boolean
    Monitor should validate SSL certificate chain.
    account_id int
    The account in which the Synthetics monitor will be created.
    bypass_head_request bool

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    custom_headers Sequence[MonitorCustomHeaderArgs]
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    locations_privates Sequence[str]
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    locations_publics Sequence[str]
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    name str
    The human-readable identifier 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 type that the monitor will run.
    runtime_type_version str
    The runtime type that the monitor will run.
    script_language str
    The programing language that should execute the script.
    status str
    The monitor status (ENABLED or DISABLED).
    tags Sequence[MonitorTagArgs]

    The tags that will be associated with the monitor. See Nested tag blocks below for details.

    The SIMPLE monitor type supports the following additional arguments:

    treat_redirect_as_failure bool
    Categorize redirects during a monitor job as a failure.
    type str
    The monitor type. Valid values are SIMPLE and BROWSER.
    uri str
    The URI the monitor runs against.
    validation_string str
    Validation text for monitor to search for at given URI.
    verify_ssl bool
    Monitor should validate SSL certificate chain.
    accountId Number
    The account in which the Synthetics monitor will be created.
    bypassHeadRequest Boolean

    Monitor should skip default HEAD request and instead use GET verb in check.

    The BROWSER monitor type supports the following additional arguments:

    customHeaders List<Property Map>
    Custom headers to use in monitor job. See Nested custom_header blocks below for details.
    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.
    locationsPrivates List<String>
    The location the monitor will run from. Accepts a list of private location GUIDs. At least one of either locations_public or locations_private is required.
    locationsPublics List<String>
    The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. You don't need the AWS_ prefix as the provider uses NerdGraph. At least one of either locations_public or location_private is required.
    name String
    The human-readable identifier 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 type that the monitor will run.
    runtimeTypeVersion String
    The runtime type that the monitor will run.
    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 SIMPLE monitor type supports the following additional arguments:

    treatRedirectAsFailure Boolean
    Categorize redirects during a monitor job as a failure.
    type String
    The monitor type. Valid values are SIMPLE and BROWSER.
    uri String
    The URI the monitor runs against.
    validationString String
    Validation text for monitor to search for at given URI.
    verifySsl Boolean
    Monitor should validate SSL certificate chain.

    Supporting Types

    MonitorCustomHeader, MonitorCustomHeaderArgs

    Name string
    Header name.
    Value string
    Header Value.
    Name string
    Header name.
    Value string
    Header Value.
    name String
    Header name.
    value String
    Header Value.
    name string
    Header name.
    value string
    Header Value.
    name str
    Header name.
    value str
    Header Value.
    name String
    Header name.
    value String
    Header Value.

    MonitorTag, MonitorTagArgs

    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 can be imported using the guid, e.g.

    bash

    $ pulumi import newrelic:synthetics/monitor:Monitor 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