1. Packages
  2. Packages
  3. Newrelic Provider
  4. API Docs
  5. synthetics
  6. Monitor
Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
newrelic logo
Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this resource to create, update, and delete a synthetics monitor in New Relic.

    Additional Examples

    Type: BROWSER

    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.Monitor("foo", {
        bypassHeadRequest: true, // Note: optional for type "BROWSER" only
        frequency: 5,
        locations: ["AWS_US_EAST_1"],
        status: "ENABLED",
        treatRedirectAsFailure: true, // Note: optional for type "BROWSER" only
        type: "BROWSER",
        uri: "https://example.com", // required for type "SIMPLE" and "BROWSER"
        validationString: "add example validation check here", // optional for type "SIMPLE" and "BROWSER"
        verifySsl: true, // optional for type "SIMPLE" and "BROWSER"
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.Monitor("foo",
        bypass_head_request=True,
        frequency=5,
        locations=["AWS_US_EAST_1"],
        status="ENABLED",
        treat_redirect_as_failure=True,
        type="BROWSER",
        uri="https://example.com",
        validation_string="add example validation check here",
        verify_ssl=True)
    # optional for type "SIMPLE" and "BROWSER"
    
    using System.Collections.Generic;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new NewRelic.Synthetics.Monitor("foo", new()
        {
            BypassHeadRequest = true,
            Frequency = 5,
            Locations = new[]
            {
                "AWS_US_EAST_1",
            },
            Status = "ENABLED",
            TreatRedirectAsFailure = true,
            Type = "BROWSER",
            Uri = "https://example.com",
            ValidationString = "add example validation check here",
            VerifySsl = true,
        });
    
        // optional for type "SIMPLE" and "BROWSER"
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic/synthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := synthetics.NewMonitor(ctx, "foo", &synthetics.MonitorArgs{
    			BypassHeadRequest: pulumi.Bool(true),
    			Frequency:         pulumi.Int(5),
    			Locations: pulumi.StringArray{
    				pulumi.String("AWS_US_EAST_1"),
    			},
    			Status:                 pulumi.String("ENABLED"),
    			TreatRedirectAsFailure: pulumi.Bool(true),
    			Type:                   pulumi.String("BROWSER"),
    			Uri:                    pulumi.String("https://example.com"),
    			ValidationString:       pulumi.String("add example validation check here"),
    			VerifySsl:              pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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 foo = new Monitor("foo", MonitorArgs.builder()        
                .bypassHeadRequest(true)
                .frequency(5)
                .locations("AWS_US_EAST_1")
                .status("ENABLED")
                .treatRedirectAsFailure(true)
                .type("BROWSER")
                .uri("https://example.com")
                .validationString("add example validation check here")
                .verifySsl(true)
                .build());
    
        }
    }
    
    resources:
      foo:
        type: newrelic:synthetics:Monitor
        properties:
          bypassHeadRequest: true
          # Note: optional for type "BROWSER" only
          frequency: 5
          locations:
            - AWS_US_EAST_1
          status: ENABLED
          treatRedirectAsFailure: true
          # Note: optional for type "BROWSER" only
          type: BROWSER
          uri: https://example.com
          # required for type "SIMPLE" and "BROWSER"
          validationString: add example validation check here
          # optional for type "SIMPLE" and "BROWSER"
          verifySsl: true
    
    Type: SCRIPT_BROWSER
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.Monitor("foo", {
        frequency: 5,
        locations: ["AWS_US_EAST_1"],
        status: "ENABLED",
        type: "SCRIPT_BROWSER",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.Monitor("foo",
        frequency=5,
        locations=["AWS_US_EAST_1"],
        status="ENABLED",
        type="SCRIPT_BROWSER")
    
    using System.Collections.Generic;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new NewRelic.Synthetics.Monitor("foo", new()
        {
            Frequency = 5,
            Locations = new[]
            {
                "AWS_US_EAST_1",
            },
            Status = "ENABLED",
            Type = "SCRIPT_BROWSER",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic/synthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := synthetics.NewMonitor(ctx, "foo", &synthetics.MonitorArgs{
    			Frequency: pulumi.Int(5),
    			Locations: pulumi.StringArray{
    				pulumi.String("AWS_US_EAST_1"),
    			},
    			Status: pulumi.String("ENABLED"),
    			Type:   pulumi.String("SCRIPT_BROWSER"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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 foo = new Monitor("foo", MonitorArgs.builder()        
                .frequency(5)
                .locations("AWS_US_EAST_1")
                .status("ENABLED")
                .type("SCRIPT_BROWSER")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: newrelic:synthetics:Monitor
        properties:
          frequency: 5
          locations:
            - AWS_US_EAST_1
          status: ENABLED
          type: SCRIPT_BROWSER
    
    Type: SCRIPT_API
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.Monitor("foo", {
        frequency: 5,
        locations: ["AWS_US_EAST_1"],
        status: "ENABLED",
        type: "SCRIPT_API",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.Monitor("foo",
        frequency=5,
        locations=["AWS_US_EAST_1"],
        status="ENABLED",
        type="SCRIPT_API")
    
    using System.Collections.Generic;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new NewRelic.Synthetics.Monitor("foo", new()
        {
            Frequency = 5,
            Locations = new[]
            {
                "AWS_US_EAST_1",
            },
            Status = "ENABLED",
            Type = "SCRIPT_API",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic/synthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := synthetics.NewMonitor(ctx, "foo", &synthetics.MonitorArgs{
    			Frequency: pulumi.Int(5),
    			Locations: pulumi.StringArray{
    				pulumi.String("AWS_US_EAST_1"),
    			},
    			Status: pulumi.String("ENABLED"),
    			Type:   pulumi.String("SCRIPT_API"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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 foo = new Monitor("foo", MonitorArgs.builder()        
                .frequency(5)
                .locations("AWS_US_EAST_1")
                .status("ENABLED")
                .type("SCRIPT_API")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: newrelic:synthetics:Monitor
        properties:
          frequency: 5
          locations:
            - AWS_US_EAST_1
          status: ENABLED
          type: SCRIPT_API
    

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new NewRelic.Synthetics.Monitor("foo", new()
        {
            Frequency = 5,
            Locations = new[]
            {
                "AWS_US_EAST_1",
                "AWS_US_EAST_2",
            },
            Status = "ENABLED",
            Type = "SIMPLE",
            Uri = "https://example.com",
            ValidationString = "add example validation check here",
            VerifySsl = true,
        });
    
        // Optional for type "SIMPLE" and "BROWSER"
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic/synthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := synthetics.NewMonitor(ctx, "foo", &synthetics.MonitorArgs{
    			Frequency: pulumi.Int(5),
    			Locations: pulumi.StringArray{
    				pulumi.String("AWS_US_EAST_1"),
    				pulumi.String("AWS_US_EAST_2"),
    			},
    			Status:           pulumi.String("ENABLED"),
    			Type:             pulumi.String("SIMPLE"),
    			Uri:              pulumi.String("https://example.com"),
    			ValidationString: pulumi.String("add example validation check here"),
    			VerifySsl:        pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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 foo = new Monitor("foo", MonitorArgs.builder()        
                .frequency(5)
                .locations(            
                    "AWS_US_EAST_1",
                    "AWS_US_EAST_2")
                .status("ENABLED")
                .type("SIMPLE")
                .uri("https://example.com")
                .validationString("add example validation check here")
                .verifySsl(true)
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.Monitor("foo", {
        frequency: 5,
        locations: [
            "AWS_US_EAST_1",
            "AWS_US_EAST_2",
        ],
        status: "ENABLED",
        type: "SIMPLE",
        uri: "https://example.com", // Required for type "SIMPLE" and "BROWSER"
        validationString: "add example validation check here", // Optional for type "SIMPLE" and "BROWSER"
        verifySsl: true, // Optional for type "SIMPLE" and "BROWSER"
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.Monitor("foo",
        frequency=5,
        locations=[
            "AWS_US_EAST_1",
            "AWS_US_EAST_2",
        ],
        status="ENABLED",
        type="SIMPLE",
        uri="https://example.com",
        validation_string="add example validation check here",
        verify_ssl=True)
    # Optional for type "SIMPLE" and "BROWSER"
    
    resources:
      foo:
        type: newrelic:synthetics:Monitor
        properties:
          frequency: 5
          locations:
            - AWS_US_EAST_1
            - AWS_US_EAST_2
          status: ENABLED
          type: SIMPLE
          uri: https://example.com
          # Required for type "SIMPLE" and "BROWSER"
          validationString: add example validation check here
          # Optional for type "SIMPLE" and "BROWSER"
          verifySsl: true
    

    BROWSER

    using System.Collections.Generic;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new NewRelic.Synthetics.Monitor("foo", new()
        {
            BypassHeadRequest = true,
            Frequency = 5,
            Locations = new[]
            {
                "AWS_US_EAST_1",
            },
            Status = "ENABLED",
            TreatRedirectAsFailure = true,
            Type = "BROWSER",
            Uri = "https://example.com",
            ValidationString = "add example validation check here",
            VerifySsl = true,
        });
    
        // optional for type "SIMPLE" and "BROWSER"
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic/synthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := synthetics.NewMonitor(ctx, "foo", &synthetics.MonitorArgs{
    			BypassHeadRequest: pulumi.Bool(true),
    			Frequency:         pulumi.Int(5),
    			Locations: pulumi.StringArray{
    				pulumi.String("AWS_US_EAST_1"),
    			},
    			Status:                 pulumi.String("ENABLED"),
    			TreatRedirectAsFailure: pulumi.Bool(true),
    			Type:                   pulumi.String("BROWSER"),
    			Uri:                    pulumi.String("https://example.com"),
    			ValidationString:       pulumi.String("add example validation check here"),
    			VerifySsl:              pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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 foo = new Monitor("foo", MonitorArgs.builder()        
                .bypassHeadRequest(true)
                .frequency(5)
                .locations("AWS_US_EAST_1")
                .status("ENABLED")
                .treatRedirectAsFailure(true)
                .type("BROWSER")
                .uri("https://example.com")
                .validationString("add example validation check here")
                .verifySsl(true)
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.Monitor("foo", {
        bypassHeadRequest: true, // Note: optional for type "BROWSER" only
        frequency: 5,
        locations: ["AWS_US_EAST_1"],
        status: "ENABLED",
        treatRedirectAsFailure: true, // Note: optional for type "BROWSER" only
        type: "BROWSER",
        uri: "https://example.com", // required for type "SIMPLE" and "BROWSER"
        validationString: "add example validation check here", // optional for type "SIMPLE" and "BROWSER"
        verifySsl: true, // optional for type "SIMPLE" and "BROWSER"
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.Monitor("foo",
        bypass_head_request=True,
        frequency=5,
        locations=["AWS_US_EAST_1"],
        status="ENABLED",
        treat_redirect_as_failure=True,
        type="BROWSER",
        uri="https://example.com",
        validation_string="add example validation check here",
        verify_ssl=True)
    # optional for type "SIMPLE" and "BROWSER"
    
    resources:
      foo:
        type: newrelic:synthetics:Monitor
        properties:
          bypassHeadRequest: true
          # Note: optional for type "BROWSER" only
          frequency: 5
          locations:
            - AWS_US_EAST_1
          status: ENABLED
          treatRedirectAsFailure: true
          # Note: optional for type "BROWSER" only
          type: BROWSER
          uri: https://example.com
          # required for type "SIMPLE" and "BROWSER"
          validationString: add example validation check here
          # optional for type "SIMPLE" and "BROWSER"
          verifySsl: true
    
    using System.Collections.Generic;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new NewRelic.Synthetics.Monitor("foo", new()
        {
            Frequency = 5,
            Locations = new[]
            {
                "AWS_US_EAST_1",
            },
            Status = "ENABLED",
            Type = "SCRIPT_BROWSER",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic/synthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := synthetics.NewMonitor(ctx, "foo", &synthetics.MonitorArgs{
    			Frequency: pulumi.Int(5),
    			Locations: pulumi.StringArray{
    				pulumi.String("AWS_US_EAST_1"),
    			},
    			Status: pulumi.String("ENABLED"),
    			Type:   pulumi.String("SCRIPT_BROWSER"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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 foo = new Monitor("foo", MonitorArgs.builder()        
                .frequency(5)
                .locations("AWS_US_EAST_1")
                .status("ENABLED")
                .type("SCRIPT_BROWSER")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.Monitor("foo", {
        frequency: 5,
        locations: ["AWS_US_EAST_1"],
        status: "ENABLED",
        type: "SCRIPT_BROWSER",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.Monitor("foo",
        frequency=5,
        locations=["AWS_US_EAST_1"],
        status="ENABLED",
        type="SCRIPT_BROWSER")
    
    resources:
      foo:
        type: newrelic:synthetics:Monitor
        properties:
          frequency: 5
          locations:
            - AWS_US_EAST_1
          status: ENABLED
          type: SCRIPT_BROWSER
    
    using System.Collections.Generic;
    using Pulumi;
    using NewRelic = Pulumi.NewRelic;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new NewRelic.Synthetics.Monitor("foo", new()
        {
            Frequency = 5,
            Locations = new[]
            {
                "AWS_US_EAST_1",
            },
            Status = "ENABLED",
            Type = "SCRIPT_API",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic/synthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := synthetics.NewMonitor(ctx, "foo", &synthetics.MonitorArgs{
    			Frequency: pulumi.Int(5),
    			Locations: pulumi.StringArray{
    				pulumi.String("AWS_US_EAST_1"),
    			},
    			Status: pulumi.String("ENABLED"),
    			Type:   pulumi.String("SCRIPT_API"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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 foo = new Monitor("foo", MonitorArgs.builder()        
                .frequency(5)
                .locations("AWS_US_EAST_1")
                .status("ENABLED")
                .type("SCRIPT_API")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.Monitor("foo", {
        frequency: 5,
        locations: ["AWS_US_EAST_1"],
        status: "ENABLED",
        type: "SCRIPT_API",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.Monitor("foo",
        frequency=5,
        locations=["AWS_US_EAST_1"],
        status="ENABLED",
        type="SCRIPT_API")
    
    resources:
      foo:
        type: newrelic:synthetics:Monitor
        properties:
          frequency: 5
          locations:
            - AWS_US_EAST_1
          status: ENABLED
          type: SCRIPT_API
    

    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,
                frequency: Optional[int] = None,
                locations: Optional[Sequence[str]] = None,
                status: Optional[str] = None,
                type: Optional[str] = None,
                bypass_head_request: Optional[bool] = None,
                name: Optional[str] = None,
                sla_threshold: Optional[float] = None,
                treat_redirect_as_failure: 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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var monitorResource = new NewRelic.Synthetics.Monitor("monitorResource", new()
    {
        Frequency = 0,
        Locations = new[]
        {
            "string",
        },
        Status = "string",
        Type = "string",
        BypassHeadRequest = false,
        Name = "string",
        SlaThreshold = 0,
        TreatRedirectAsFailure = false,
        Uri = "string",
        ValidationString = "string",
        VerifySsl = false,
    });
    
    example, err := synthetics.NewMonitor(ctx, "monitorResource", &synthetics.MonitorArgs{
    	Frequency: pulumi.Int(0),
    	Locations: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Status:                 pulumi.String("string"),
    	Type:                   pulumi.String("string"),
    	BypassHeadRequest:      pulumi.Bool(false),
    	Name:                   pulumi.String("string"),
    	SlaThreshold:           pulumi.Float64(0),
    	TreatRedirectAsFailure: pulumi.Bool(false),
    	Uri:                    pulumi.String("string"),
    	ValidationString:       pulumi.String("string"),
    	VerifySsl:              pulumi.Bool(false),
    })
    
    var monitorResource = new Monitor("monitorResource", MonitorArgs.builder()
        .frequency(0)
        .locations("string")
        .status("string")
        .type("string")
        .bypassHeadRequest(false)
        .name("string")
        .slaThreshold(0.0)
        .treatRedirectAsFailure(false)
        .uri("string")
        .validationString("string")
        .verifySsl(false)
        .build());
    
    monitor_resource = newrelic.synthetics.Monitor("monitorResource",
        frequency=0,
        locations=["string"],
        status="string",
        type="string",
        bypass_head_request=False,
        name="string",
        sla_threshold=0,
        treat_redirect_as_failure=False,
        uri="string",
        validation_string="string",
        verify_ssl=False)
    
    const monitorResource = new newrelic.synthetics.Monitor("monitorResource", {
        frequency: 0,
        locations: ["string"],
        status: "string",
        type: "string",
        bypassHeadRequest: false,
        name: "string",
        slaThreshold: 0,
        treatRedirectAsFailure: false,
        uri: "string",
        validationString: "string",
        verifySsl: false,
    });
    
    type: newrelic:synthetics:Monitor
    properties:
        bypassHeadRequest: false
        frequency: 0
        locations:
            - string
        name: string
        slaThreshold: 0
        status: 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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Monitor resource accepts the following input properties:

    Frequency int
    The interval (in minutes) at which this monitor should run.
    Locations List<string>
    The locations in which this monitor should be run.
    Status string
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    Type string
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    BypassHeadRequest bool
    Bypass HEAD request.
    Name string
    The title of this monitor.
    SlaThreshold double
    The base threshold for the SLA report.
    TreatRedirectAsFailure bool
    Fail the monitor check if redirected.
    Uri string
    The URI for the monitor to hit.
    ValidationString string
    The string to validate against in the response.
    VerifySsl bool
    Verify SSL.
    Frequency int
    The interval (in minutes) at which this monitor should run.
    Locations []string
    The locations in which this monitor should be run.
    Status string
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    Type string
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    BypassHeadRequest bool
    Bypass HEAD request.
    Name string
    The title of this monitor.
    SlaThreshold float64
    The base threshold for the SLA report.
    TreatRedirectAsFailure bool
    Fail the monitor check if redirected.
    Uri string
    The URI for the monitor to hit.
    ValidationString string
    The string to validate against in the response.
    VerifySsl bool
    Verify SSL.
    frequency Integer
    The interval (in minutes) at which this monitor should run.
    locations List<String>
    The locations in which this monitor should be run.
    status String
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    type String
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    bypassHeadRequest Boolean
    Bypass HEAD request.
    name String
    The title of this monitor.
    slaThreshold Double
    The base threshold for the SLA report.
    treatRedirectAsFailure Boolean
    Fail the monitor check if redirected.
    uri String
    The URI for the monitor to hit.
    validationString String
    The string to validate against in the response.
    verifySsl Boolean
    Verify SSL.
    frequency number
    The interval (in minutes) at which this monitor should run.
    locations string[]
    The locations in which this monitor should be run.
    status string
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    type string
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    bypassHeadRequest boolean
    Bypass HEAD request.
    name string
    The title of this monitor.
    slaThreshold number
    The base threshold for the SLA report.
    treatRedirectAsFailure boolean
    Fail the monitor check if redirected.
    uri string
    The URI for the monitor to hit.
    validationString string
    The string to validate against in the response.
    verifySsl boolean
    Verify SSL.
    frequency int
    The interval (in minutes) at which this monitor should run.
    locations Sequence[str]
    The locations in which this monitor should be run.
    status str
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    type str
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    bypass_head_request bool
    Bypass HEAD request.
    name str
    The title of this monitor.
    sla_threshold float
    The base threshold for the SLA report.
    treat_redirect_as_failure bool
    Fail the monitor check if redirected.
    uri str
    The URI for the monitor to hit.
    validation_string str
    The string to validate against in the response.
    verify_ssl bool
    Verify SSL.
    frequency Number
    The interval (in minutes) at which this monitor should run.
    locations List<String>
    The locations in which this monitor should be run.
    status String
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    type String
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    bypassHeadRequest Boolean
    Bypass HEAD request.
    name String
    The title of this monitor.
    slaThreshold Number
    The base threshold for the SLA report.
    treatRedirectAsFailure Boolean
    Fail the monitor check if redirected.
    uri String
    The URI for the monitor to hit.
    validationString String
    The string to validate against in the response.
    verifySsl Boolean
    Verify SSL.

    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    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,
            bypass_head_request: Optional[bool] = None,
            frequency: Optional[int] = None,
            locations: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            sla_threshold: Optional[float] = None,
            status: Optional[str] = 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)
    resources:  _:    type: newrelic:synthetics:Monitor    get:      id: ${id}
    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:
    BypassHeadRequest bool
    Bypass HEAD request.
    Frequency int
    The interval (in minutes) at which this monitor should run.
    Locations List<string>
    The locations in which this monitor should be run.
    Name string
    The title of this monitor.
    SlaThreshold double
    The base threshold for the SLA report.
    Status string
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    TreatRedirectAsFailure bool
    Fail the monitor check if redirected.
    Type string
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    Uri string
    The URI for the monitor to hit.
    ValidationString string
    The string to validate against in the response.
    VerifySsl bool
    Verify SSL.
    BypassHeadRequest bool
    Bypass HEAD request.
    Frequency int
    The interval (in minutes) at which this monitor should run.
    Locations []string
    The locations in which this monitor should be run.
    Name string
    The title of this monitor.
    SlaThreshold float64
    The base threshold for the SLA report.
    Status string
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    TreatRedirectAsFailure bool
    Fail the monitor check if redirected.
    Type string
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    Uri string
    The URI for the monitor to hit.
    ValidationString string
    The string to validate against in the response.
    VerifySsl bool
    Verify SSL.
    bypassHeadRequest Boolean
    Bypass HEAD request.
    frequency Integer
    The interval (in minutes) at which this monitor should run.
    locations List<String>
    The locations in which this monitor should be run.
    name String
    The title of this monitor.
    slaThreshold Double
    The base threshold for the SLA report.
    status String
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    treatRedirectAsFailure Boolean
    Fail the monitor check if redirected.
    type String
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    uri String
    The URI for the monitor to hit.
    validationString String
    The string to validate against in the response.
    verifySsl Boolean
    Verify SSL.
    bypassHeadRequest boolean
    Bypass HEAD request.
    frequency number
    The interval (in minutes) at which this monitor should run.
    locations string[]
    The locations in which this monitor should be run.
    name string
    The title of this monitor.
    slaThreshold number
    The base threshold for the SLA report.
    status string
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    treatRedirectAsFailure boolean
    Fail the monitor check if redirected.
    type string
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    uri string
    The URI for the monitor to hit.
    validationString string
    The string to validate against in the response.
    verifySsl boolean
    Verify SSL.
    bypass_head_request bool
    Bypass HEAD request.
    frequency int
    The interval (in minutes) at which this monitor should run.
    locations Sequence[str]
    The locations in which this monitor should be run.
    name str
    The title of this monitor.
    sla_threshold float
    The base threshold for the SLA report.
    status str
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    treat_redirect_as_failure bool
    Fail the monitor check if redirected.
    type str
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    uri str
    The URI for the monitor to hit.
    validation_string str
    The string to validate against in the response.
    verify_ssl bool
    Verify SSL.
    bypassHeadRequest Boolean
    Bypass HEAD request.
    frequency Number
    The interval (in minutes) at which this monitor should run.
    locations List<String>
    The locations in which this monitor should be run.
    name String
    The title of this monitor.
    slaThreshold Number
    The base threshold for the SLA report.
    status String
    The monitor status (i.e. ENABLED, MUTED, DISABLED).
    treatRedirectAsFailure Boolean
    Fail the monitor check if redirected.
    type String
    The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
    uri String
    The URI for the monitor to hit.
    validationString String
    The string to validate against in the response.
    verifySsl Boolean
    Verify SSL.

    Import

    Synthetics monitors can be imported using the id, e.g. bash

     $ pulumi import newrelic:synthetics/monitor:Monitor main <id>
    

    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
    Viewing docs for New Relic v4.20.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.