UNPKG

@pulumi/signalfx

Version:

A Pulumi package for creating and managing SignalFx resources.

119 lines 5.36 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.AlertMutingRule = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(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: [someDetector.id], * 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, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'signalfx:index/alertMutingRule:AlertMutingRule'; /** * 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?.description; resourceInputs["detectors"] = state?.detectors; resourceInputs["effectiveStartTime"] = state?.effectiveStartTime; resourceInputs["filters"] = state?.filters; resourceInputs["recurrence"] = state?.recurrence; resourceInputs["startTime"] = state?.startTime; resourceInputs["stopTime"] = state?.stopTime; } else { const args = argsOrState; if (args?.description === undefined && !opts.urn) { throw new Error("Missing required property 'description'"); } if (args?.startTime === undefined && !opts.urn) { throw new Error("Missing required property 'startTime'"); } resourceInputs["description"] = args?.description; resourceInputs["detectors"] = args?.detectors; resourceInputs["filters"] = args?.filters; resourceInputs["recurrence"] = args?.recurrence; resourceInputs["startTime"] = args?.startTime; resourceInputs["stopTime"] = args?.stopTime; resourceInputs["effectiveStartTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AlertMutingRule.__pulumiType, name, resourceInputs, opts); } } exports.AlertMutingRule = AlertMutingRule; //# sourceMappingURL=alertMutingRule.js.map