Class Monitor
Use this resource to create, update, and delete a synthetics monitor in New Relic.
Example Usage
Type: SIMPLE
using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.Synthetics.Monitor("foo", new NewRelic.Synthetics.MonitorArgs
{
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,
});
// Optional for type "SIMPLE" and "BROWSER"
}
}
Additional Examples
Type: BROWSER
using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.Synthetics.Monitor("foo", new NewRelic.Synthetics.MonitorArgs
{
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,
});
// optional for type "SIMPLE" and "BROWSER"
}
}
Type: SCRIPT_BROWSER
using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.Synthetics.Monitor("foo", new NewRelic.Synthetics.MonitorArgs
{
Frequency = 5,
Locations =
{
"AWS_US_EAST_1",
},
Status = "ENABLED",
Type = "SCRIPT_BROWSER",
});
}
}
Type: SCRIPT_API
using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.Synthetics.Monitor("foo", new NewRelic.Synthetics.MonitorArgs
{
Frequency = 5,
Locations =
{
"AWS_US_EAST_1",
},
Status = "ENABLED",
Type = "SCRIPT_API",
});
}
}
Inherited Members
Namespace: Pulumi.NewRelic.Synthetics
Assembly: Pulumi.NewRelic.dll
Syntax
public class Monitor : CustomResource
Constructors
View SourceMonitor(String, MonitorArgs, CustomResourceOptions)
Create a Monitor resource with the given unique name, arguments, and options.
Declaration
public Monitor(string name, MonitorArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| MonitorArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBypassHeadRequest
Bypass HEAD request.
Declaration
public Output<bool?> BypassHeadRequest { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Frequency
The interval (in minutes) at which this monitor should run.
Declaration
public Output<int> Frequency { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Locations
The locations in which this monitor should be run.
Declaration
public Output<ImmutableArray<string>> Locations { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Name
The title of this monitor.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SlaThreshold
The base threshold for the SLA report.
Declaration
public Output<double?> SlaThreshold { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Double>> |
Status
The monitor status (i.e. ENABLED, MUTED, DISABLED).
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TreatRedirectAsFailure
Fail the monitor check if redirected.
Declaration
public Output<bool?> TreatRedirectAsFailure { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Type
The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Uri
The URI for the monitor to hit.
Declaration
public Output<string> Uri { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ValidationString
The string to validate against in the response.
Declaration
public Output<string> ValidationString { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VerifySsl
Verify SSL.
Declaration
public Output<bool?> VerifySsl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Methods
View SourceGet(String, Input<String>, MonitorState, CustomResourceOptions)
Get an existing Monitor resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Monitor Get(string name, Input<string> id, MonitorState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| MonitorState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Monitor |