1. Packages
  2. New Relic
  3. API Docs
  4. synthetics
  5. AlertCondition
New Relic v5.22.0 published on Wednesday, Mar 27, 2024 by Pulumi

newrelic.synthetics.AlertCondition

Explore with Pulumi AI

newrelic logo
New Relic v5.22.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Use this resource to create and manage synthetics alert conditions in New Relic.

    WARNING: The newrelic.synthetics.AlertCondition resource is deprecated and will be removed in the next major release. The resource newrelic.NrqlAlertCondition would be a preferred alternative to configure alert conditions - in most cases, feature parity can be achieved with a NRQL query.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.AlertCondition("foo", {
        policyId: newrelic_alert_policy.foo.id,
        monitorId: newrelic_synthetics_monitor.foo.id,
        runbookUrl: "https://www.example.com",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.AlertCondition("foo",
        policy_id=newrelic_alert_policy["foo"]["id"],
        monitor_id=newrelic_synthetics_monitor["foo"]["id"],
        runbook_url="https://www.example.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic/synthetics"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := synthetics.NewAlertCondition(ctx, "foo", &synthetics.AlertConditionArgs{
    			PolicyId:   pulumi.Any(newrelic_alert_policy.Foo.Id),
    			MonitorId:  pulumi.Any(newrelic_synthetics_monitor.Foo.Id),
    			RunbookUrl: pulumi.String("https://www.example.com"),
    		})
    		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.Synthetics.AlertCondition("foo", new()
        {
            PolicyId = newrelic_alert_policy.Foo.Id,
            MonitorId = newrelic_synthetics_monitor.Foo.Id,
            RunbookUrl = "https://www.example.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.newrelic.synthetics.AlertCondition;
    import com.pulumi.newrelic.synthetics.AlertConditionArgs;
    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 AlertCondition("foo", AlertConditionArgs.builder()        
                .policyId(newrelic_alert_policy.foo().id())
                .monitorId(newrelic_synthetics_monitor.foo().id())
                .runbookUrl("https://www.example.com")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: newrelic:synthetics:AlertCondition
        properties:
          policyId: ${newrelic_alert_policy.foo.id}
          monitorId: ${newrelic_synthetics_monitor.foo.id}
          runbookUrl: https://www.example.com
    

    Tags

    Manage synthetics 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 fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
    const fooMonitor = new newrelic.synthetics.Monitor("fooMonitor", {
        status: "ENABLED",
        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 fooAlertCondition = new newrelic.synthetics.AlertCondition("fooAlertCondition", {
        policyId: fooAlertPolicy.id,
        monitorId: fooMonitor.id,
        runbookUrl: "https://www.example.com",
    });
    const myConditionEntityTags = new newrelic.EntityTags("myConditionEntityTags", {
        guid: fooAlertCondition.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_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
    foo_monitor = newrelic.synthetics.Monitor("fooMonitor",
        status="ENABLED",
        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_alert_condition = newrelic.synthetics.AlertCondition("fooAlertCondition",
        policy_id=foo_alert_policy.id,
        monitor_id=foo_monitor.id,
        runbook_url="https://www.example.com")
    my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
        guid=foo_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 {
    		fooAlertPolicy, err := newrelic.NewAlertPolicy(ctx, "fooAlertPolicy", nil)
    		if err != nil {
    			return err
    		}
    		fooMonitor, err := synthetics.NewMonitor(ctx, "fooMonitor", &synthetics.MonitorArgs{
    			Status: pulumi.String("ENABLED"),
    			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
    		}
    		fooAlertCondition, err := synthetics.NewAlertCondition(ctx, "fooAlertCondition", &synthetics.AlertConditionArgs{
    			PolicyId:   fooAlertPolicy.ID(),
    			MonitorId:  fooMonitor.ID(),
    			RunbookUrl: pulumi.String("https://www.example.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = newrelic.NewEntityTags(ctx, "myConditionEntityTags", &newrelic.EntityTagsArgs{
    			Guid: fooAlertCondition.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 fooAlertPolicy = new NewRelic.AlertPolicy("fooAlertPolicy");
    
        var fooMonitor = new NewRelic.Synthetics.Monitor("fooMonitor", new()
        {
            Status = "ENABLED",
            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 fooAlertCondition = new NewRelic.Synthetics.AlertCondition("fooAlertCondition", new()
        {
            PolicyId = fooAlertPolicy.Id,
            MonitorId = fooMonitor.Id,
            RunbookUrl = "https://www.example.com",
        });
    
        var myConditionEntityTags = new NewRelic.EntityTags("myConditionEntityTags", new()
        {
            Guid = fooAlertCondition.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.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.AlertCondition;
    import com.pulumi.newrelic.synthetics.AlertConditionArgs;
    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 fooAlertPolicy = new AlertPolicy("fooAlertPolicy");
    
            var fooMonitor = new Monitor("fooMonitor", MonitorArgs.builder()        
                .status("ENABLED")
                .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 fooAlertCondition = new AlertCondition("fooAlertCondition", AlertConditionArgs.builder()        
                .policyId(fooAlertPolicy.id())
                .monitorId(fooMonitor.id())
                .runbookUrl("https://www.example.com")
                .build());
    
            var myConditionEntityTags = new EntityTags("myConditionEntityTags", EntityTagsArgs.builder()        
                .guid(fooAlertCondition.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:
      fooAlertPolicy:
        type: newrelic:AlertPolicy
      fooMonitor:
        type: newrelic:synthetics:Monitor
        properties:
          status: ENABLED
          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
      fooAlertCondition:
        type: newrelic:synthetics:AlertCondition
        properties:
          policyId: ${fooAlertPolicy.id}
          monitorId: ${fooMonitor.id}
          runbookUrl: https://www.example.com
      myConditionEntityTags:
        type: newrelic:EntityTags
        properties:
          guid: ${fooAlertCondition.entityGuid}
          tags:
            - key: my-key
              values:
                - my-value
                - my-other-value
            - key: my-key-2
              values:
                - my-value-2
    

    Create AlertCondition Resource

    new AlertCondition(name: string, args: AlertConditionArgs, opts?: CustomResourceOptions);
    @overload
    def AlertCondition(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       enabled: Optional[bool] = None,
                       monitor_id: Optional[str] = None,
                       name: Optional[str] = None,
                       policy_id: Optional[int] = None,
                       runbook_url: Optional[str] = None)
    @overload
    def AlertCondition(resource_name: str,
                       args: AlertConditionArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewAlertCondition(ctx *Context, name string, args AlertConditionArgs, opts ...ResourceOption) (*AlertCondition, error)
    public AlertCondition(string name, AlertConditionArgs args, CustomResourceOptions? opts = null)
    public AlertCondition(String name, AlertConditionArgs args)
    public AlertCondition(String name, AlertConditionArgs args, CustomResourceOptions options)
    
    type: newrelic:synthetics:AlertCondition
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AlertConditionArgs
    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 AlertConditionArgs
    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 AlertConditionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertConditionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertConditionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    MonitorId string
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    PolicyId int
    The ID of the policy where this condition should be used.
    Enabled bool
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="name_csharp">

    Name string

    The title of this condition.
    RunbookUrl string
    Runbook URL to display in notifications.

    MonitorId string
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    PolicyId int
    The ID of the policy where this condition should be used.
    Enabled bool
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="name_go">

    Name string

    The title of this condition.
    RunbookUrl string
    Runbook URL to display in notifications.

    monitorId String
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    policyId Integer
    The ID of the policy where this condition should be used.
    enabled Boolean
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="name_java">

    name String

    The title of this condition.
    runbookUrl String
    Runbook URL to display in notifications.

    monitorId string
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    policyId number
    The ID of the policy where this condition should be used.
    enabled boolean
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="name_nodejs">

    name string

    The title of this condition.
    runbookUrl string
    Runbook URL to display in notifications.

    monitor_id str
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    policy_id int
    The ID of the policy where this condition should be used.
    enabled bool
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="name_python">

    name str

    The title of this condition.
    runbook_url str
    Runbook URL to display in notifications.

    monitorId String
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    policyId Number
    The ID of the policy where this condition should be used.
    enabled Boolean
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="name_yaml">

    name String

    The title of this condition.
    runbookUrl String
    Runbook URL to display in notifications.

    Outputs

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

    EntityGuid string
    The unique entity identifier of the condition in New Relic.
    Id string
    The provider-assigned unique ID for this managed resource.
    EntityGuid string
    The unique entity identifier of the condition in New Relic.
    Id string
    The provider-assigned unique ID for this managed resource.
    entityGuid String
    The unique entity identifier of the condition in New Relic.
    id String
    The provider-assigned unique ID for this managed resource.
    entityGuid 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.
    entityGuid 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 AlertCondition Resource

    Get an existing AlertCondition 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?: AlertConditionState, opts?: CustomResourceOptions): AlertCondition
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            entity_guid: Optional[str] = None,
            monitor_id: Optional[str] = None,
            name: Optional[str] = None,
            policy_id: Optional[int] = None,
            runbook_url: Optional[str] = None) -> AlertCondition
    func GetAlertCondition(ctx *Context, name string, id IDInput, state *AlertConditionState, opts ...ResourceOption) (*AlertCondition, error)
    public static AlertCondition Get(string name, Input<string> id, AlertConditionState? state, CustomResourceOptions? opts = null)
    public static AlertCondition get(String name, Output<String> id, AlertConditionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Enabled bool
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="state_entityguid_csharp">

    EntityGuid string

    The unique entity identifier of the condition in New Relic.
    MonitorId string
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    Name string
    The title of this condition.
    PolicyId int
    The ID of the policy where this condition should be used.
    RunbookUrl string
    Runbook URL to display in notifications.

    Enabled bool
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="state_entityguid_go">

    EntityGuid string

    The unique entity identifier of the condition in New Relic.
    MonitorId string
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    Name string
    The title of this condition.
    PolicyId int
    The ID of the policy where this condition should be used.
    RunbookUrl string
    Runbook URL to display in notifications.

    enabled Boolean
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="state_entityguid_java">

    entityGuid String

    The unique entity identifier of the condition in New Relic.
    monitorId String
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    name String
    The title of this condition.
    policyId Integer
    The ID of the policy where this condition should be used.
    runbookUrl String
    Runbook URL to display in notifications.

    enabled boolean
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="state_entityguid_nodejs">

    entityGuid string

    The unique entity identifier of the condition in New Relic.
    monitorId string
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    name string
    The title of this condition.
    policyId number
    The ID of the policy where this condition should be used.
    runbookUrl string
    Runbook URL to display in notifications.

    enabled bool
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="state_entity_guid_python">

    entity_guid str

    The unique entity identifier of the condition in New Relic.
    monitor_id str
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    name str
    The title of this condition.
    policy_id int
    The ID of the policy where this condition should be used.
    runbook_url str
    Runbook URL to display in notifications.

    enabled Boolean
    Set whether to enable the alert condition. Defaults to true.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    

    return await Deployment.RunAsync(() => { });

    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    title="Optional"> <span id="state_entityguid_yaml">

    entityGuid String

    The unique entity identifier of the condition in New Relic.
    monitorId String
    The GUID of the Synthetics monitor to be referenced in the alert condition.
    name String
    The title of this condition.
    policyId Number
    The ID of the policy where this condition should be used.
    runbookUrl String
    Runbook URL to display in notifications.

    Import

    Synthetics alert conditions can be imported using a composite ID of <policy_id>:<condition_id>, e.g.

    $ pulumi import newrelic:synthetics/alertCondition:AlertCondition main 12345:67890
    

    Package Details

    Repository
    New Relic pulumi/pulumi-newrelic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the newrelic Terraform Provider.
    newrelic logo
    New Relic v5.22.0 published on Wednesday, Mar 27, 2024 by Pulumi