1. Packages
  2. Packages
  3. Newrelic Provider
  4. API Docs
  5. synthetics
  6. MultiLocationAlertCondition
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 New Relic Synthetics Location Alerts.

    NOTE: The newrelic.NrqlAlertCondition resource is preferred for configuring alerts conditions. In most cases feature parity can be achieved with a NRQL query. Other condition types may be deprecated in the future and receive fewer product updates.

    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[int] = None,
                                    violation_time_limit_seconds: Optional[int] = None,
                                    enabled: Optional[bool] = None,
                                    name: Optional[str] = None,
                                    runbook_url: Optional[str] = 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 = 0,
        ViolationTimeLimitSeconds = 0,
        Enabled = false,
        Name = "string",
        RunbookUrl = "string",
        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.Int(0),
    	ViolationTimeLimitSeconds: pulumi.Int(0),
    	Enabled:                   pulumi.Bool(false),
    	Name:                      pulumi.String("string"),
    	RunbookUrl:                pulumi.String("string"),
    	Warning: &synthetics.MultiLocationAlertConditionWarningArgs{
    		Threshold: pulumi.Int(0),
    	},
    })
    
    var multiLocationAlertConditionResource = new MultiLocationAlertCondition("multiLocationAlertConditionResource", MultiLocationAlertConditionArgs.builder()
        .critical(MultiLocationAlertConditionCriticalArgs.builder()
            .threshold(0)
            .build())
        .entities("string")
        .policyId(0)
        .violationTimeLimitSeconds(0)
        .enabled(false)
        .name("string")
        .runbookUrl("string")
        .warning(MultiLocationAlertConditionWarningArgs.builder()
            .threshold(0)
            .build())
        .build());
    
    multi_location_alert_condition_resource = newrelic.synthetics.MultiLocationAlertCondition("multiLocationAlertConditionResource",
        critical={
            "threshold": 0,
        },
        entities=["string"],
        policy_id=0,
        violation_time_limit_seconds=0,
        enabled=False,
        name="string",
        runbook_url="string",
        warning={
            "threshold": 0,
        })
    
    const multiLocationAlertConditionResource = new newrelic.synthetics.MultiLocationAlertCondition("multiLocationAlertConditionResource", {
        critical: {
            threshold: 0,
        },
        entities: ["string"],
        policyId: 0,
        violationTimeLimitSeconds: 0,
        enabled: false,
        name: "string",
        runbookUrl: "string",
        warning: {
            threshold: 0,
        },
    });
    
    type: newrelic:synthetics:MultiLocationAlertCondition
    properties:
        critical:
            threshold: 0
        enabled: false
        entities:
            - string
        name: string
        policyId: 0
        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

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

    The MultiLocationAlertCondition resource accepts the following input properties:

    Critical Pulumi.NewRelic.Synthetics.Inputs.MultiLocationAlertConditionCritical
    A condition term with the priority set to critical.
    Entities List<string>
    The GUIDs of the Synthetics monitors to alert on.
    PolicyId int
    The ID of the policy where this condition will be used.
    ViolationTimeLimitSeconds int
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    Enabled bool
    Set whether to enable the alert condition. Defaults to true.
    Name string
    The title of the condition.
    RunbookUrl string
    Runbook URL to display in notifications.
    Warning Pulumi.NewRelic.Synthetics.Inputs.MultiLocationAlertConditionWarning
    A condition term with the priority set to warning.
    Critical MultiLocationAlertConditionCriticalArgs
    A condition term with the priority set to critical.
    Entities []string
    The GUIDs of the Synthetics monitors to alert on.
    PolicyId int
    The ID of the policy where this condition will be used.
    ViolationTimeLimitSeconds int
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    Enabled bool
    Set whether to enable the alert condition. Defaults to true.
    Name string
    The title of the condition.
    RunbookUrl string
    Runbook URL to display in notifications.
    Warning MultiLocationAlertConditionWarningArgs
    A condition term with the priority set to warning.
    critical MultiLocationAlertConditionCritical
    A condition term with the priority set to critical.
    entities List<String>
    The GUIDs of the Synthetics monitors to alert on.
    policyId Integer
    The ID of the policy where this condition will be used.
    violationTimeLimitSeconds Integer
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    enabled Boolean
    Set whether to enable the alert condition. Defaults to true.
    name String
    The title of the condition.
    runbookUrl String
    Runbook URL to display in notifications.
    warning MultiLocationAlertConditionWarning
    A condition term with the priority set to warning.
    critical MultiLocationAlertConditionCritical
    A condition term with the priority set to critical.
    entities string[]
    The GUIDs of the Synthetics monitors to alert on.
    policyId number
    The ID of the policy where this condition will be used.
    violationTimeLimitSeconds number
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    enabled boolean
    Set whether to enable the alert condition. Defaults to true.
    name string
    The title of the condition.
    runbookUrl string
    Runbook URL to display in notifications.
    warning MultiLocationAlertConditionWarning
    A condition term with the priority set to warning.
    critical MultiLocationAlertConditionCriticalArgs
    A condition term with the priority set to critical.
    entities Sequence[str]
    The GUIDs of the Synthetics monitors to alert on.
    policy_id int
    The ID of the policy where this condition will be used.
    violation_time_limit_seconds int
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    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.
    warning MultiLocationAlertConditionWarningArgs
    A condition term with the priority set to warning.
    critical Property Map
    A condition term with the priority set to critical.
    entities List<String>
    The GUIDs of the Synthetics monitors to alert on.
    policyId Number
    The ID of the policy where this condition will be used.
    violationTimeLimitSeconds Number
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    enabled Boolean
    Set whether to enable the alert condition. Defaults to true.
    name String
    The title of the condition.
    runbookUrl String
    Runbook URL to display in notifications.
    warning Property Map
    A condition term with the priority set to warning.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MultiLocationAlertCondition 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 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,
            name: Optional[str] = None,
            policy_id: Optional[int] = 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)
    resources:  _:    type: newrelic:synthetics:MultiLocationAlertCondition    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:
    Critical Pulumi.NewRelic.Synthetics.Inputs.MultiLocationAlertConditionCritical
    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 GUIDs of the Synthetics monitors to alert on.
    Name string
    The title of the condition.
    PolicyId int
    The ID of the policy where this condition will be used.
    RunbookUrl string
    Runbook URL to display in notifications.
    ViolationTimeLimitSeconds int
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    Warning Pulumi.NewRelic.Synthetics.Inputs.MultiLocationAlertConditionWarning
    A condition term with the priority set to warning.
    Critical MultiLocationAlertConditionCriticalArgs
    A condition term with the priority set to critical.
    Enabled bool
    Set whether to enable the alert condition. Defaults to true.
    Entities []string
    The GUIDs of the Synthetics monitors to alert on.
    Name string
    The title of the condition.
    PolicyId int
    The ID of the policy where this condition will be used.
    RunbookUrl string
    Runbook URL to display in notifications.
    ViolationTimeLimitSeconds int
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    Warning MultiLocationAlertConditionWarningArgs
    A condition term with the priority set to warning.
    critical MultiLocationAlertConditionCritical
    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 GUIDs of the Synthetics monitors to alert on.
    name String
    The title of the condition.
    policyId Integer
    The ID of the policy where this condition will be used.
    runbookUrl String
    Runbook URL to display in notifications.
    violationTimeLimitSeconds Integer
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    warning MultiLocationAlertConditionWarning
    A condition term with the priority set to warning.
    critical MultiLocationAlertConditionCritical
    A condition term with the priority set to critical.
    enabled boolean
    Set whether to enable the alert condition. Defaults to true.
    entities string[]
    The GUIDs of the Synthetics monitors to alert on.
    name string
    The title of the condition.
    policyId number
    The ID of the policy where this condition will be used.
    runbookUrl string
    Runbook URL to display in notifications.
    violationTimeLimitSeconds number
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    warning MultiLocationAlertConditionWarning
    A condition term with the priority set to warning.
    critical MultiLocationAlertConditionCriticalArgs
    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 GUIDs of the Synthetics monitors to alert on.
    name str
    The title of the condition.
    policy_id int
    The ID of the policy where this condition will be used.
    runbook_url str
    Runbook URL to display in notifications.
    violation_time_limit_seconds int
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    warning MultiLocationAlertConditionWarningArgs
    A condition term with the priority set to warning.
    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 GUIDs of the Synthetics monitors to alert on.
    name String
    The title of the condition.
    policyId Number
    The ID of the policy where this condition will be used.
    runbookUrl String
    Runbook URL to display in notifications.
    violationTimeLimitSeconds Number
    The maximum number of seconds a violation can remain open before being closed by the system. Must be one of: 0, 3600, 7200, 14400, 28800, 43200, 86400.
    warning Property Map
    A condition term with the priority set to warning.

    Supporting Types

    MultiLocationAlertConditionCritical, MultiLocationAlertConditionCriticalArgs

    threshold Integer
    threshold number
    threshold Number

    MultiLocationAlertConditionWarning, MultiLocationAlertConditionWarningArgs

    threshold Integer
    threshold number
    threshold Number

    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.
    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.