UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

95 lines 3.29 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.MuteTiming = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages Grafana Alerting mute timings. * * * [Official documentation](https://grafana.com/docs/grafana/latest/alerting/manage-notifications/mute-timings/) * * [HTTP API](https://grafana.com/docs/grafana/next/developers/http_api/alerting_provisioning/#mute-timings) * * This resource requires Grafana 9.1.0 or later. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * * const myMuteTiming = new grafana.MuteTiming("myMuteTiming", {intervals: [{ * daysOfMonths: [ * "1:7", * "-1", * ], * months: [ * "1:3", * "december", * ], * times: [{ * end: "14:17", * start: "04:56", * }], * weekdays: [ * "monday", * "tuesday:thursday", * ], * years: [ * "2030", * "2025:2026", * ], * }]}); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/muteTiming:MuteTiming mute_timing_name {{mute_timing_name}} * ``` */ class MuteTiming extends pulumi.CustomResource { /** * Get an existing MuteTiming 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 MuteTiming(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MuteTiming. 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'] === MuteTiming.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["intervals"] = state ? state.intervals : undefined; resourceInputs["name"] = state ? state.name : undefined; } else { const args = argsOrState; resourceInputs["intervals"] = args ? args.intervals : undefined; resourceInputs["name"] = args ? args.name : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MuteTiming.__pulumiType, name, resourceInputs, opts); } } exports.MuteTiming = MuteTiming; /** @internal */ MuteTiming.__pulumiType = 'grafana:index/muteTiming:MuteTiming'; //# sourceMappingURL=muteTiming.js.map