newrelic.synthetics.MultiLocationAlertCondition
Explore with Pulumi AI
Use this resource to create, update, and delete a New Relic Synthetics Location Alerts.
NOTE: This is a legacy resource. The newrelic.NrqlAlertCondition resource is preferred for configuring alerts conditions. In most cases feature parity can be achieved with a NRQL query. This condition type may be deprecated in the future.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const policy = new newrelic.AlertPolicy("policy", {name: "my-policy"});
const monitor = new newrelic.synthetics.Monitor("monitor", {
locationsPublics: ["US_WEST_1"],
name: "my-monitor",
period: "EVERY_10_MINUTES",
status: "DISABLED",
type: "SIMPLE",
uri: "https://www.one.newrelic.com",
});
const example = new newrelic.synthetics.MultiLocationAlertCondition("example", {
policyId: policy.id,
name: "Example condition",
runbookUrl: "https://example.com",
enabled: true,
violationTimeLimitSeconds: 3600,
entities: [monitor.id],
critical: {
threshold: 2,
},
warning: {
threshold: 1,
},
});
import pulumi
import pulumi_newrelic as newrelic
policy = newrelic.AlertPolicy("policy", name="my-policy")
monitor = newrelic.synthetics.Monitor("monitor",
locations_publics=["US_WEST_1"],
name="my-monitor",
period="EVERY_10_MINUTES",
status="DISABLED",
type="SIMPLE",
uri="https://www.one.newrelic.com")
example = newrelic.synthetics.MultiLocationAlertCondition("example",
policy_id=policy.id,
name="Example condition",
runbook_url="https://example.com",
enabled=True,
violation_time_limit_seconds=3600,
entities=[monitor.id],
critical=newrelic.synthetics.MultiLocationAlertConditionCriticalArgs(
threshold=2,
),
warning=newrelic.synthetics.MultiLocationAlertConditionWarningArgs(
threshold=1,
))
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"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 {
policy, err := newrelic.NewAlertPolicy(ctx, "policy", &newrelic.AlertPolicyArgs{
Name: pulumi.String("my-policy"),
})
if err != nil {
return err
}
monitor, err := synthetics.NewMonitor(ctx, "monitor", &synthetics.MonitorArgs{
LocationsPublics: pulumi.StringArray{
pulumi.String("US_WEST_1"),
},
Name: pulumi.String("my-monitor"),
Period: pulumi.String("EVERY_10_MINUTES"),
Status: pulumi.String("DISABLED"),
Type: pulumi.String("SIMPLE"),
Uri: pulumi.String("https://www.one.newrelic.com"),
})
if err != nil {
return err
}
_, err = synthetics.NewMultiLocationAlertCondition(ctx, "example", &synthetics.MultiLocationAlertConditionArgs{
PolicyId: policy.ID(),
Name: pulumi.String("Example condition"),
RunbookUrl: pulumi.String("https://example.com"),
Enabled: pulumi.Bool(true),
ViolationTimeLimitSeconds: pulumi.Int(3600),
Entities: pulumi.StringArray{
monitor.ID(),
},
Critical: &synthetics.MultiLocationAlertConditionCriticalArgs{
Threshold: pulumi.Int(2),
},
Warning: &synthetics.MultiLocationAlertConditionWarningArgs{
Threshold: pulumi.Int(1),
},
})
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 policy = new NewRelic.AlertPolicy("policy", new()
{
Name = "my-policy",
});
var monitor = new NewRelic.Synthetics.Monitor("monitor", new()
{
LocationsPublics = new[]
{
"US_WEST_1",
},
Name = "my-monitor",
Period = "EVERY_10_MINUTES",
Status = "DISABLED",
Type = "SIMPLE",
Uri = "https://www.one.newrelic.com",
});
var example = new NewRelic.Synthetics.MultiLocationAlertCondition("example", new()
{
PolicyId = policy.Id,
Name = "Example condition",
RunbookUrl = "https://example.com",
Enabled = true,
ViolationTimeLimitSeconds = 3600,
Entities = new[]
{
monitor.Id,
},
Critical = new NewRelic.Synthetics.Inputs.MultiLocationAlertConditionCriticalArgs
{
Threshold = 2,
},
Warning = new NewRelic.Synthetics.Inputs.MultiLocationAlertConditionWarningArgs
{
Threshold = 1,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.AlertPolicyArgs;
import com.pulumi.newrelic.synthetics.Monitor;
import com.pulumi.newrelic.synthetics.MonitorArgs;
import com.pulumi.newrelic.synthetics.MultiLocationAlertCondition;
import com.pulumi.newrelic.synthetics.MultiLocationAlertConditionArgs;
import com.pulumi.newrelic.synthetics.inputs.MultiLocationAlertConditionCriticalArgs;
import com.pulumi.newrelic.synthetics.inputs.MultiLocationAlertConditionWarningArgs;
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 policy = new AlertPolicy("policy", AlertPolicyArgs.builder()
.name("my-policy")
.build());
var monitor = new Monitor("monitor", MonitorArgs.builder()
.locationsPublics("US_WEST_1")
.name("my-monitor")
.period("EVERY_10_MINUTES")
.status("DISABLED")
.type("SIMPLE")
.uri("https://www.one.newrelic.com")
.build());
var example = new MultiLocationAlertCondition("example", MultiLocationAlertConditionArgs.builder()
.policyId(policy.id())
.name("Example condition")
.runbookUrl("https://example.com")
.enabled(true)
.violationTimeLimitSeconds(3600)
.entities(monitor.id())
.critical(MultiLocationAlertConditionCriticalArgs.builder()
.threshold(2)
.build())
.warning(MultiLocationAlertConditionWarningArgs.builder()
.threshold(1)
.build())
.build());
}
}
resources:
policy:
type: newrelic:AlertPolicy
properties:
name: my-policy
monitor:
type: newrelic:synthetics:Monitor
properties:
locationsPublics:
- US_WEST_1
name: my-monitor
period: EVERY_10_MINUTES
status: DISABLED
type: SIMPLE
uri: https://www.one.newrelic.com
example:
type: newrelic:synthetics:MultiLocationAlertCondition
properties:
policyId: ${policy.id}
name: Example condition
runbookUrl: https://example.com
enabled: true
violationTimeLimitSeconds: 3600
entities:
- ${monitor.id}
critical:
threshold: 2
warning:
threshold: 1
Tags
Manage synthetics multilocation alert condition tags with newrelic.EntityTags
. For up-to-date documentation about the tagging resource, please check newrelic.EntityTags
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.AlertPolicy("foo", {name: "foo policy"});
const fooMonitor = new newrelic.synthetics.Monitor("foo", {
status: "ENABLED",
name: "foo monitor",
period: "EVERY_MINUTE",
uri: "https://www.one.newrelic.com",
type: "SIMPLE",
locationsPublics: ["AP_EAST_1"],
customHeaders: [{
name: "some_name",
value: "some_value",
}],
treatRedirectAsFailure: true,
validationString: "success",
bypassHeadRequest: true,
verifySsl: true,
tags: [{
key: "some_key",
values: ["some_value"],
}],
});
const fooMultiLocationAlertCondition = new newrelic.synthetics.MultiLocationAlertCondition("foo", {
policyId: foo.id,
name: "foo condition",
runbookUrl: "https://example.com",
enabled: true,
violationTimeLimitSeconds: 3600,
entities: [fooMonitor.id],
critical: {
threshold: 2,
},
warning: {
threshold: 1,
},
});
const myConditionEntityTags = new newrelic.EntityTags("my_condition_entity_tags", {
guid: fooMultiLocationAlertCondition.entityGuid,
tags: [
{
key: "my-key",
values: [
"my-value",
"my-other-value",
],
},
{
key: "my-key-2",
values: ["my-value-2"],
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.AlertPolicy("foo", name="foo policy")
foo_monitor = newrelic.synthetics.Monitor("foo",
status="ENABLED",
name="foo monitor",
period="EVERY_MINUTE",
uri="https://www.one.newrelic.com",
type="SIMPLE",
locations_publics=["AP_EAST_1"],
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"],
)])
foo_multi_location_alert_condition = newrelic.synthetics.MultiLocationAlertCondition("foo",
policy_id=foo.id,
name="foo condition",
runbook_url="https://example.com",
enabled=True,
violation_time_limit_seconds=3600,
entities=[foo_monitor.id],
critical=newrelic.synthetics.MultiLocationAlertConditionCriticalArgs(
threshold=2,
),
warning=newrelic.synthetics.MultiLocationAlertConditionWarningArgs(
threshold=1,
))
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
guid=foo_multi_location_alert_condition.entity_guid,
tags=[
newrelic.EntityTagsTagArgs(
key="my-key",
values=[
"my-value",
"my-other-value",
],
),
newrelic.EntityTagsTagArgs(
key="my-key-2",
values=["my-value-2"],
),
])
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"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 {
foo, err := newrelic.NewAlertPolicy(ctx, "foo", &newrelic.AlertPolicyArgs{
Name: pulumi.String("foo policy"),
})
if err != nil {
return err
}
fooMonitor, err := synthetics.NewMonitor(ctx, "foo", &synthetics.MonitorArgs{
Status: pulumi.String("ENABLED"),
Name: pulumi.String("foo monitor"),
Period: pulumi.String("EVERY_MINUTE"),
Uri: pulumi.String("https://www.one.newrelic.com"),
Type: pulumi.String("SIMPLE"),
LocationsPublics: pulumi.StringArray{
pulumi.String("AP_EAST_1"),
},
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
}
fooMultiLocationAlertCondition, err := synthetics.NewMultiLocationAlertCondition(ctx, "foo", &synthetics.MultiLocationAlertConditionArgs{
PolicyId: foo.ID(),
Name: pulumi.String("foo condition"),
RunbookUrl: pulumi.String("https://example.com"),
Enabled: pulumi.Bool(true),
ViolationTimeLimitSeconds: pulumi.Int(3600),
Entities: pulumi.StringArray{
fooMonitor.ID(),
},
Critical: &synthetics.MultiLocationAlertConditionCriticalArgs{
Threshold: pulumi.Int(2),
},
Warning: &synthetics.MultiLocationAlertConditionWarningArgs{
Threshold: pulumi.Int(1),
},
})
if err != nil {
return err
}
_, err = newrelic.NewEntityTags(ctx, "my_condition_entity_tags", &newrelic.EntityTagsArgs{
Guid: fooMultiLocationAlertCondition.EntityGuid,
Tags: newrelic.EntityTagsTagArray{
&newrelic.EntityTagsTagArgs{
Key: pulumi.String("my-key"),
Values: pulumi.StringArray{
pulumi.String("my-value"),
pulumi.String("my-other-value"),
},
},
&newrelic.EntityTagsTagArgs{
Key: pulumi.String("my-key-2"),
Values: pulumi.StringArray{
pulumi.String("my-value-2"),
},
},
},
})
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 foo = new NewRelic.AlertPolicy("foo", new()
{
Name = "foo policy",
});
var fooMonitor = new NewRelic.Synthetics.Monitor("foo", new()
{
Status = "ENABLED",
Name = "foo monitor",
Period = "EVERY_MINUTE",
Uri = "https://www.one.newrelic.com",
Type = "SIMPLE",
LocationsPublics = new[]
{
"AP_EAST_1",
},
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",
},
},
},
});
var fooMultiLocationAlertCondition = new NewRelic.Synthetics.MultiLocationAlertCondition("foo", new()
{
PolicyId = foo.Id,
Name = "foo condition",
RunbookUrl = "https://example.com",
Enabled = true,
ViolationTimeLimitSeconds = 3600,
Entities = new[]
{
fooMonitor.Id,
},
Critical = new NewRelic.Synthetics.Inputs.MultiLocationAlertConditionCriticalArgs
{
Threshold = 2,
},
Warning = new NewRelic.Synthetics.Inputs.MultiLocationAlertConditionWarningArgs
{
Threshold = 1,
},
});
var myConditionEntityTags = new NewRelic.EntityTags("my_condition_entity_tags", new()
{
Guid = fooMultiLocationAlertCondition.EntityGuid,
Tags = new[]
{
new NewRelic.Inputs.EntityTagsTagArgs
{
Key = "my-key",
Values = new[]
{
"my-value",
"my-other-value",
},
},
new NewRelic.Inputs.EntityTagsTagArgs
{
Key = "my-key-2",
Values = new[]
{
"my-value-2",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.AlertPolicyArgs;
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 com.pulumi.newrelic.synthetics.MultiLocationAlertCondition;
import com.pulumi.newrelic.synthetics.MultiLocationAlertConditionArgs;
import com.pulumi.newrelic.synthetics.inputs.MultiLocationAlertConditionCriticalArgs;
import com.pulumi.newrelic.synthetics.inputs.MultiLocationAlertConditionWarningArgs;
import com.pulumi.newrelic.EntityTags;
import com.pulumi.newrelic.EntityTagsArgs;
import com.pulumi.newrelic.inputs.EntityTagsTagArgs;
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 AlertPolicy("foo", AlertPolicyArgs.builder()
.name("foo policy")
.build());
var fooMonitor = new Monitor("fooMonitor", MonitorArgs.builder()
.status("ENABLED")
.name("foo monitor")
.period("EVERY_MINUTE")
.uri("https://www.one.newrelic.com")
.type("SIMPLE")
.locationsPublics("AP_EAST_1")
.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());
var fooMultiLocationAlertCondition = new MultiLocationAlertCondition("fooMultiLocationAlertCondition", MultiLocationAlertConditionArgs.builder()
.policyId(foo.id())
.name("foo condition")
.runbookUrl("https://example.com")
.enabled(true)
.violationTimeLimitSeconds(3600)
.entities(fooMonitor.id())
.critical(MultiLocationAlertConditionCriticalArgs.builder()
.threshold(2)
.build())
.warning(MultiLocationAlertConditionWarningArgs.builder()
.threshold(1)
.build())
.build());
var myConditionEntityTags = new EntityTags("myConditionEntityTags", EntityTagsArgs.builder()
.guid(fooMultiLocationAlertCondition.entityGuid())
.tags(
EntityTagsTagArgs.builder()
.key("my-key")
.values(
"my-value",
"my-other-value")
.build(),
EntityTagsTagArgs.builder()
.key("my-key-2")
.values("my-value-2")
.build())
.build());
}
}
resources:
foo:
type: newrelic:AlertPolicy
properties:
name: foo policy
fooMonitor:
type: newrelic:synthetics:Monitor
name: foo
properties:
status: ENABLED
name: foo monitor
period: EVERY_MINUTE
uri: https://www.one.newrelic.com
type: SIMPLE
locationsPublics:
- AP_EAST_1
customHeaders:
- name: some_name
value: some_value
treatRedirectAsFailure: true
validationString: success
bypassHeadRequest: true
verifySsl: true
tags:
- key: some_key
values:
- some_value
fooMultiLocationAlertCondition:
type: newrelic:synthetics:MultiLocationAlertCondition
name: foo
properties:
policyId: ${foo.id}
name: foo condition
runbookUrl: https://example.com
enabled: true
violationTimeLimitSeconds: 3600
entities:
- ${fooMonitor.id}
critical:
threshold: 2
warning:
threshold: 1
myConditionEntityTags:
type: newrelic:EntityTags
name: my_condition_entity_tags
properties:
guid: ${fooMultiLocationAlertCondition.entityGuid}
tags:
- key: my-key
values:
- my-value
- my-other-value
- key: my-key-2
values:
- my-value-2
Create MultiLocationAlertCondition Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MultiLocationAlertCondition(name: string, args: MultiLocationAlertConditionArgs, opts?: CustomResourceOptions);
@overload
def MultiLocationAlertCondition(resource_name: str,
args: MultiLocationAlertConditionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MultiLocationAlertCondition(resource_name: str,
opts: Optional[ResourceOptions] = None,
critical: Optional[MultiLocationAlertConditionCriticalArgs] = None,
entities: Optional[Sequence[str]] = None,
policy_id: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
runbook_url: Optional[str] = None,
violation_time_limit_seconds: Optional[int] = None,
warning: Optional[MultiLocationAlertConditionWarningArgs] = None)
func NewMultiLocationAlertCondition(ctx *Context, name string, args MultiLocationAlertConditionArgs, opts ...ResourceOption) (*MultiLocationAlertCondition, error)
public MultiLocationAlertCondition(string name, MultiLocationAlertConditionArgs args, CustomResourceOptions? opts = null)
public MultiLocationAlertCondition(String name, MultiLocationAlertConditionArgs args)
public MultiLocationAlertCondition(String name, MultiLocationAlertConditionArgs args, CustomResourceOptions options)
type: newrelic:synthetics:MultiLocationAlertCondition
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 MultiLocationAlertConditionArgs
- 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 MultiLocationAlertConditionArgs
- 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 MultiLocationAlertConditionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MultiLocationAlertConditionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MultiLocationAlertConditionArgs
- 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 multiLocationAlertConditionResource = new NewRelic.Synthetics.MultiLocationAlertCondition("multiLocationAlertConditionResource", new()
{
Critical = new NewRelic.Synthetics.Inputs.MultiLocationAlertConditionCriticalArgs
{
Threshold = 0,
},
Entities = new[]
{
"string",
},
PolicyId = "string",
Enabled = false,
Name = "string",
RunbookUrl = "string",
ViolationTimeLimitSeconds = 0,
Warning = new NewRelic.Synthetics.Inputs.MultiLocationAlertConditionWarningArgs
{
Threshold = 0,
},
});
example, err := synthetics.NewMultiLocationAlertCondition(ctx, "multiLocationAlertConditionResource", &synthetics.MultiLocationAlertConditionArgs{
Critical: &synthetics.MultiLocationAlertConditionCriticalArgs{
Threshold: pulumi.Int(0),
},
Entities: pulumi.StringArray{
pulumi.String("string"),
},
PolicyId: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Name: pulumi.String("string"),
RunbookUrl: pulumi.String("string"),
ViolationTimeLimitSeconds: pulumi.Int(0),
Warning: &synthetics.MultiLocationAlertConditionWarningArgs{
Threshold: pulumi.Int(0),
},
})
var multiLocationAlertConditionResource = new MultiLocationAlertCondition("multiLocationAlertConditionResource", MultiLocationAlertConditionArgs.builder()
.critical(MultiLocationAlertConditionCriticalArgs.builder()
.threshold(0)
.build())
.entities("string")
.policyId("string")
.enabled(false)
.name("string")
.runbookUrl("string")
.violationTimeLimitSeconds(0)
.warning(MultiLocationAlertConditionWarningArgs.builder()
.threshold(0)
.build())
.build());
multi_location_alert_condition_resource = newrelic.synthetics.MultiLocationAlertCondition("multiLocationAlertConditionResource",
critical=newrelic.synthetics.MultiLocationAlertConditionCriticalArgs(
threshold=0,
),
entities=["string"],
policy_id="string",
enabled=False,
name="string",
runbook_url="string",
violation_time_limit_seconds=0,
warning=newrelic.synthetics.MultiLocationAlertConditionWarningArgs(
threshold=0,
))
const multiLocationAlertConditionResource = new newrelic.synthetics.MultiLocationAlertCondition("multiLocationAlertConditionResource", {
critical: {
threshold: 0,
},
entities: ["string"],
policyId: "string",
enabled: false,
name: "string",
runbookUrl: "string",
violationTimeLimitSeconds: 0,
warning: {
threshold: 0,
},
});
type: newrelic:synthetics:MultiLocationAlertCondition
properties:
critical:
threshold: 0
enabled: false
entities:
- string
name: string
policyId: string
runbookUrl: string
violationTimeLimitSeconds: 0
warning:
threshold: 0
MultiLocationAlertCondition 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 MultiLocationAlertCondition resource accepts the following input properties:
- Critical
Pulumi.
New Relic. Synthetics. Inputs. Multi Location Alert Condition Critical - A condition term with the priority set to critical.
- Entities List<string>
- The Monitor GUID's of the Synthetics monitors to alert on.
- Policy
Id string - The ID of the policy where this condition will be used.
- Enabled bool
- Set whether to enable the alert condition. Defaults to true.
- Name string
- The title of the condition.
- Runbook
Url string - Runbook URL to display in notifications.
- Violation
Time intLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- Warning
Pulumi.
New Relic. Synthetics. Inputs. Multi Location Alert Condition Warning A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- Critical
Multi
Location Alert Condition Critical Args - A condition term with the priority set to critical.
- Entities []string
- The Monitor GUID's of the Synthetics monitors to alert on.
- Policy
Id string - The ID of the policy where this condition will be used.
- Enabled bool
- Set whether to enable the alert condition. Defaults to true.
- Name string
- The title of the condition.
- Runbook
Url string - Runbook URL to display in notifications.
- Violation
Time intLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- Warning
Multi
Location Alert Condition Warning Args A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- critical
Multi
Location Alert Condition Critical - A condition term with the priority set to critical.
- entities List<String>
- The Monitor GUID's of the Synthetics monitors to alert on.
- policy
Id String - The ID of the policy where this condition will be used.
- enabled Boolean
- Set whether to enable the alert condition. Defaults to true.
- name String
- The title of the condition.
- runbook
Url String - Runbook URL to display in notifications.
- violation
Time IntegerLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- warning
Multi
Location Alert Condition Warning A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- critical
Multi
Location Alert Condition Critical - A condition term with the priority set to critical.
- entities string[]
- The Monitor GUID's of the Synthetics monitors to alert on.
- policy
Id string - The ID of the policy where this condition will be used.
- enabled boolean
- Set whether to enable the alert condition. Defaults to true.
- name string
- The title of the condition.
- runbook
Url string - Runbook URL to display in notifications.
- violation
Time numberLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- warning
Multi
Location Alert Condition Warning A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- critical
Multi
Location Alert Condition Critical Args - A condition term with the priority set to critical.
- entities Sequence[str]
- The Monitor GUID's of the Synthetics monitors to alert on.
- policy_
id str - The ID of the policy where this condition will be used.
- enabled bool
- Set whether to enable the alert condition. Defaults to true.
- name str
- The title of the condition.
- runbook_
url str - Runbook URL to display in notifications.
- violation_
time_ intlimit_ seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- warning
Multi
Location Alert Condition Warning Args A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- critical Property Map
- A condition term with the priority set to critical.
- entities List<String>
- The Monitor GUID's of the Synthetics monitors to alert on.
- policy
Id String - The ID of the policy where this condition will be used.
- enabled Boolean
- Set whether to enable the alert condition. Defaults to true.
- name String
- The title of the condition.
- runbook
Url String - Runbook URL to display in notifications.
- violation
Time NumberLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- warning Property Map
A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the MultiLocationAlertCondition resource produces the following output properties:
- Entity
Guid string - The unique entity identifier of the condition in New Relic.
- Id string
- The provider-assigned unique ID for this managed resource.
- Entity
Guid string - The unique entity identifier of the condition in New Relic.
- Id string
- The provider-assigned unique ID for this managed resource.
- entity
Guid String - The unique entity identifier of the condition in New Relic.
- id String
- The provider-assigned unique ID for this managed resource.
- entity
Guid string - The unique entity identifier of the condition in New Relic.
- id string
- The provider-assigned unique ID for this managed resource.
- entity_
guid str - The unique entity identifier of the condition in New Relic.
- id str
- The provider-assigned unique ID for this managed resource.
- entity
Guid String - The unique entity identifier of the condition in New Relic.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing MultiLocationAlertCondition Resource
Get an existing MultiLocationAlertCondition 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?: MultiLocationAlertConditionState, opts?: CustomResourceOptions): MultiLocationAlertCondition
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
critical: Optional[MultiLocationAlertConditionCriticalArgs] = None,
enabled: Optional[bool] = None,
entities: Optional[Sequence[str]] = None,
entity_guid: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[str] = None,
runbook_url: Optional[str] = None,
violation_time_limit_seconds: Optional[int] = None,
warning: Optional[MultiLocationAlertConditionWarningArgs] = None) -> MultiLocationAlertCondition
func GetMultiLocationAlertCondition(ctx *Context, name string, id IDInput, state *MultiLocationAlertConditionState, opts ...ResourceOption) (*MultiLocationAlertCondition, error)
public static MultiLocationAlertCondition Get(string name, Input<string> id, MultiLocationAlertConditionState? state, CustomResourceOptions? opts = null)
public static MultiLocationAlertCondition get(String name, Output<String> id, MultiLocationAlertConditionState 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.
- Critical
Pulumi.
New Relic. Synthetics. Inputs. Multi Location Alert Condition Critical - A condition term with the priority set to critical.
- Enabled bool
- Set whether to enable the alert condition. Defaults to true.
- Entities List<string>
- The Monitor GUID's of the Synthetics monitors to alert on.
- Entity
Guid string - The unique entity identifier of the condition in New Relic.
- Name string
- The title of the condition.
- Policy
Id string - The ID of the policy where this condition will be used.
- Runbook
Url string - Runbook URL to display in notifications.
- Violation
Time intLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- Warning
Pulumi.
New Relic. Synthetics. Inputs. Multi Location Alert Condition Warning A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- Critical
Multi
Location Alert Condition Critical Args - A condition term with the priority set to critical.
- Enabled bool
- Set whether to enable the alert condition. Defaults to true.
- Entities []string
- The Monitor GUID's of the Synthetics monitors to alert on.
- Entity
Guid string - The unique entity identifier of the condition in New Relic.
- Name string
- The title of the condition.
- Policy
Id string - The ID of the policy where this condition will be used.
- Runbook
Url string - Runbook URL to display in notifications.
- Violation
Time intLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- Warning
Multi
Location Alert Condition Warning Args A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- critical
Multi
Location Alert Condition Critical - A condition term with the priority set to critical.
- enabled Boolean
- Set whether to enable the alert condition. Defaults to true.
- entities List<String>
- The Monitor GUID's of the Synthetics monitors to alert on.
- entity
Guid String - The unique entity identifier of the condition in New Relic.
- name String
- The title of the condition.
- policy
Id String - The ID of the policy where this condition will be used.
- runbook
Url String - Runbook URL to display in notifications.
- violation
Time IntegerLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- warning
Multi
Location Alert Condition Warning A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- critical
Multi
Location Alert Condition Critical - A condition term with the priority set to critical.
- enabled boolean
- Set whether to enable the alert condition. Defaults to true.
- entities string[]
- The Monitor GUID's of the Synthetics monitors to alert on.
- entity
Guid string - The unique entity identifier of the condition in New Relic.
- name string
- The title of the condition.
- policy
Id string - The ID of the policy where this condition will be used.
- runbook
Url string - Runbook URL to display in notifications.
- violation
Time numberLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- warning
Multi
Location Alert Condition Warning A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- critical
Multi
Location Alert Condition Critical Args - A condition term with the priority set to critical.
- enabled bool
- Set whether to enable the alert condition. Defaults to true.
- entities Sequence[str]
- The Monitor GUID's of the Synthetics monitors to alert on.
- entity_
guid str - The unique entity identifier of the condition in New Relic.
- name str
- The title of the condition.
- policy_
id str - The ID of the policy where this condition will be used.
- runbook_
url str - Runbook URL to display in notifications.
- violation_
time_ intlimit_ seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- warning
Multi
Location Alert Condition Warning Args A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
- critical Property Map
- A condition term with the priority set to critical.
- enabled Boolean
- Set whether to enable the alert condition. Defaults to true.
- entities List<String>
- The Monitor GUID's of the Synthetics monitors to alert on.
- entity
Guid String - The unique entity identifier of the condition in New Relic.
- name String
- The title of the condition.
- policy
Id String - The ID of the policy where this condition will be used.
- runbook
Url String - Runbook URL to display in notifications.
- violation
Time NumberLimit Seconds - The maximum number of seconds a violation can remain open before being closed by the system. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days), both inclusive. Defaults to 259200 seconds (3 days) if this argument is not specified in the configuration, in accordance with the characteristics of this field in NerdGraph, as specified in the docs.
- warning Property Map
A condition term with the priority set to warning.
WARNING: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
Supporting Types
MultiLocationAlertConditionCritical, MultiLocationAlertConditionCriticalArgs
- Threshold int
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- Threshold int
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- threshold Integer
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- threshold number
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- threshold int
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- threshold Number
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
MultiLocationAlertConditionWarning, MultiLocationAlertConditionWarningArgs
- Threshold int
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- Threshold int
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- threshold Integer
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- threshold number
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- threshold int
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
- threshold Number
- The minimum number of monitor locations that must be concurrently failing before an incident is opened.
Import
New Relic Synthetics MultiLocation Conditions can be imported using a concatenated string of the format
<policy_id>:<condition_id>
, e.g.
bash
$ pulumi import newrelic:synthetics/multiLocationAlertCondition:MultiLocationAlertCondition example 12345678:1456
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.