UNPKG

@pulumi/signalfx

Version:

A Pulumi package for creating and managing SignalFx resources.

96 lines 4.59 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.AlertMutingRule = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Splunk Observability Cloud resource for managing alert muting rules. See [Mute Notifications](https://docs.splunk.com/Observability/alerts-detectors-notifications/mute-notifications.html) for more information. * * Splunk Observability Cloud currently allows linking an alert muting rule with only one detector ID. Specifying multiple detector IDs makes the muting rule obsolete. * * > **WARNING** Splunk Observability Cloud does not allow the start time of a **currently active** muting rule to be modified. Attempting to modify a currently active rule destroys the existing rule and creates a new rule. This might result in the emission of notifications. * * ## Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as signalfx from "@pulumi/signalfx"; * * const roolMooterOne = new signalfx.AlertMutingRule("rool_mooter_one", { * description: "mooted it NEW", * startTime: 1573063243, * stopTime: 0, * detectors: [someDetectorId], * filters: [{ * property: "foo", * propertyValue: "bar", * }], * recurrence: { * unit: "d", * value: 2, * }, * }); * ``` */ class AlertMutingRule extends pulumi.CustomResource { /** * Get an existing AlertMutingRule 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, id, state, opts) { return new AlertMutingRule(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AlertMutingRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === AlertMutingRule.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["detectors"] = state ? state.detectors : undefined; resourceInputs["effectiveStartTime"] = state ? state.effectiveStartTime : undefined; resourceInputs["filters"] = state ? state.filters : undefined; resourceInputs["recurrence"] = state ? state.recurrence : undefined; resourceInputs["startTime"] = state ? state.startTime : undefined; resourceInputs["stopTime"] = state ? state.stopTime : undefined; } else { const args = argsOrState; if ((!args || args.description === undefined) && !opts.urn) { throw new Error("Missing required property 'description'"); } if ((!args || args.startTime === undefined) && !opts.urn) { throw new Error("Missing required property 'startTime'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["detectors"] = args ? args.detectors : undefined; resourceInputs["filters"] = args ? args.filters : undefined; resourceInputs["recurrence"] = args ? args.recurrence : undefined; resourceInputs["startTime"] = args ? args.startTime : undefined; resourceInputs["stopTime"] = args ? args.stopTime : undefined; resourceInputs["effectiveStartTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AlertMutingRule.__pulumiType, name, resourceInputs, opts); } } exports.AlertMutingRule = AlertMutingRule; /** @internal */ AlertMutingRule.__pulumiType = 'signalfx:index/alertMutingRule:AlertMutingRule'; //# sourceMappingURL=alertMutingRule.js.map