@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
93 lines • 3.62 kB
JavaScript
;
// *** 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.SuppressedAssertionsConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages Knowledge Graph Disabled Alert Configurations through Grafana API.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* // Basic suppressed alert configuration for maintenance
* const maintenanceWindow = new grafana.assert.SuppressedAssertionsConfig("maintenance_window", {
* name: "MaintenanceWindow",
* matchLabels: {
* service: "api-service",
* maintenance: "true",
* },
* });
* // Suppress specific alertname during deployment
* const deploymentSuppression = new grafana.assert.SuppressedAssertionsConfig("deployment_suppression", {
* name: "DeploymentSuppression",
* matchLabels: {
* alertname: "HighLatency",
* job: "web-service",
* env: "staging",
* },
* });
* // Suppress alerts for specific test environment
* const testEnvironmentSuppression = new grafana.assert.SuppressedAssertionsConfig("test_environment_suppression", {
* name: "TestEnvironmentSuppression",
* matchLabels: {
* alertgroup: "test.alerts",
* environment: "test",
* },
* });
* ```
*
* ## Import
*
* ```sh
* terraform import grafana_asserts_suppressed_assertions_config.name "{{ name }}"
* ```
*/
class SuppressedAssertionsConfig extends pulumi.CustomResource {
/**
* Get an existing SuppressedAssertionsConfig 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 SuppressedAssertionsConfig(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of SuppressedAssertionsConfig. 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'] === SuppressedAssertionsConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["matchLabels"] = state?.matchLabels;
resourceInputs["name"] = state?.name;
}
else {
const args = argsOrState;
resourceInputs["matchLabels"] = args?.matchLabels;
resourceInputs["name"] = args?.name;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SuppressedAssertionsConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.SuppressedAssertionsConfig = SuppressedAssertionsConfig;
/** @internal */
SuppressedAssertionsConfig.__pulumiType = 'grafana:assert/suppressedAssertionsConfig:SuppressedAssertionsConfig';
//# sourceMappingURL=suppressedAssertionsConfig.js.map