UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

106 lines 3.72 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.MuteTiming = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages Grafana Alerting mute timings. * * * Official documentation * * [HTTP API](https://grafana.com/docs/grafana/latest/developer-resources/api-reference/http-api/api-legacy/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 "@pulumiverse/grafana"; * * const myMuteTiming = new grafana.alerting.MuteTiming("my_mute_timing", { * name: "My Mute Timing", * intervals: [{ * times: [{ * start: "04:56", * end: "14:17", * }], * weekdays: [ * "monday", * "tuesday:thursday", * ], * daysOfMonths: [ * "1:7", * "-1", * ], * months: [ * "1:3", * "december", * ], * years: [ * "2030", * "2025:2026", * ], * location: "America/New_York", * }], * }); * ``` * * ## Import * * ```sh * terraform import grafana_mute_timing.name "{{ name }}" * terraform import grafana_mute_timing.name "{{ orgID }}:{{ 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, { ...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["disableProvenance"] = state?.disableProvenance; resourceInputs["intervals"] = state?.intervals; resourceInputs["name"] = state?.name; resourceInputs["orgId"] = state?.orgId; } else { const args = argsOrState; resourceInputs["disableProvenance"] = args?.disableProvenance; resourceInputs["intervals"] = args?.intervals; resourceInputs["name"] = args?.name; resourceInputs["orgId"] = args?.orgId; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const aliasOpts = { aliases: [{ type: "grafana:index/muteTiming:MuteTiming" }] }; opts = pulumi.mergeOptions(opts, aliasOpts); super(MuteTiming.__pulumiType, name, resourceInputs, opts); } } exports.MuteTiming = MuteTiming; /** @internal */ MuteTiming.__pulumiType = 'grafana:alerting/muteTiming:MuteTiming'; //# sourceMappingURL=muteTiming.js.map