import * as pulumi from "@pulumi/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. For more details and examples on moving away from synthetics alert conditions to the NRQL based alternative, please check out this example. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const foo = new newrelic.synthetics.AlertCondition("foo", { * policyId: fooNewrelicAlertPolicy.id, * name: "foo", * monitorId: fooNewrelicSyntheticsMonitor.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 * * ```typescript * 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 fooAlertCondition = new newrelic.synthetics.AlertCondition("foo", { * policyId: foo.id, * name: "foo synthetics condition", * monitorId: fooMonitor.id, * runbookUrl: "https://www.example.com", * }); * const myConditionEntityTags = new newrelic.EntityTags("my_condition_entity_tags", { * guid: fooAlertCondition.entityGuid, * tags: [ * { * key: "my-key", * values: [ * "my-value", * "my-other-value", * ], * }, * { * key: "my-key-2", * values: ["my-value-2"], * }, * ], * }); * ``` * * ## Import * * Synthetics alert conditions can be imported using a composite ID of `:`, e.g. * * ```sh * $ pulumi import newrelic:synthetics/alertCondition:AlertCondition main 12345:67890 * ``` */ export declare class AlertCondition extends pulumi.CustomResource { /** * Get an existing AlertCondition resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AlertConditionState, opts?: pulumi.CustomResourceOptions): AlertCondition; /** * Returns true if the given object is an instance of AlertCondition. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AlertCondition; /** * Set whether to enable the alert condition. Defaults to `true`. * * ``` * 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. * ``` */ readonly enabled: pulumi.Output; /** * The unique entity identifier of the condition in New Relic. */ readonly entityGuid: pulumi.Output; /** * The GUID of the Synthetics monitor to be referenced in the alert condition. */ readonly monitorId: pulumi.Output; /** * The title of this condition. */ readonly name: pulumi.Output; /** * The ID of the policy where this condition should be used. */ readonly policyId: pulumi.Output; /** * Runbook URL to display in notifications. */ readonly runbookUrl: pulumi.Output; /** * Create a AlertCondition resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AlertConditionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AlertCondition resources. */ export interface AlertConditionState { /** * Set whether to enable the alert condition. Defaults to `true`. * * ``` * 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. * ``` */ enabled?: pulumi.Input; /** * The unique entity identifier of the condition in New Relic. */ entityGuid?: pulumi.Input; /** * The GUID of the Synthetics monitor to be referenced in the alert condition. */ monitorId?: pulumi.Input; /** * The title of this condition. */ name?: pulumi.Input; /** * The ID of the policy where this condition should be used. */ policyId?: pulumi.Input; /** * Runbook URL to display in notifications. */ runbookUrl?: pulumi.Input; } /** * The set of arguments for constructing a AlertCondition resource. */ export interface AlertConditionArgs { /** * Set whether to enable the alert condition. Defaults to `true`. * * ``` * 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. * ``` */ enabled?: pulumi.Input; /** * The GUID of the Synthetics monitor to be referenced in the alert condition. */ monitorId: pulumi.Input; /** * The title of this condition. */ name?: pulumi.Input; /** * The ID of the policy where this condition should be used. */ policyId: pulumi.Input; /** * Runbook URL to display in notifications. */ runbookUrl?: pulumi.Input; } //# sourceMappingURL=alertCondition.d.ts.map