@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
201 lines • 7.79 kB
JavaScript
;
// *** 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.AlertingProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* !> This resource API endpoint has been deprecated, please use dynatrace.Alerting instead.
*
* > This resource requires the API token scopes **Read configuration** (`ReadConfig`) and **Write configuration** (`WriteConfig`)
*
* ## Dynatrace Documentation
*
* - Alerting profiles - https://www.dynatrace.com/support/help/how-to-use-dynatrace/problem-detection-and-analysis/notifications-and-alerting/alerting-profiles
*
* - Alerting profiles API - https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/alerting-profiles-api
*
* ## Resource Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const _name_ = new dynatrace.AlertingProfile("#name#", {
* displayName: "#name#",
* mzId: "",
* rules: [
* {
* delayInMinutes: 0,
* severityLevel: "AVAILABILITY",
* tagFilters: [{
* includeMode: "INCLUDE_ALL",
* tagFilters: [
* {
* context: "CONTEXTLESS",
* key: "EnvironmentA",
* value: "production",
* },
* {
* context: "CONTEXTLESS",
* key: "Team",
* value: "test",
* },
* ],
* }],
* },
* {
* delayInMinutes: 0,
* severityLevel: "CUSTOM_ALERT",
* tagFilters: [{
* includeMode: "INCLUDE_ALL",
* tagFilters: [
* {
* context: "CONTEXTLESS",
* key: "EnvironmentB",
* value: "production",
* },
* {
* context: "CONTEXTLESS",
* key: "Team",
* value: "test",
* },
* ],
* }],
* },
* {
* delayInMinutes: 0,
* severityLevel: "ERROR",
* tagFilters: [{
* includeMode: "INCLUDE_ALL",
* tagFilters: [
* {
* context: "CONTEXTLESS",
* key: "EnvironmentC",
* value: "production",
* },
* {
* context: "CONTEXTLESS",
* key: "Team",
* value: "test",
* },
* ],
* }],
* },
* {
* delayInMinutes: 0,
* severityLevel: "MONITORING_UNAVAILABLE",
* tagFilters: [{
* includeMode: "INCLUDE_ALL",
* tagFilters: [
* {
* context: "CONTEXTLESS",
* key: "EnvironmentD",
* value: "production",
* },
* {
* context: "CONTEXTLESS",
* key: "Team",
* value: "test",
* },
* ],
* }],
* },
* {
* delayInMinutes: 0,
* severityLevel: "PERFORMANCE",
* tagFilters: [{
* includeMode: "INCLUDE_ALL",
* tagFilters: [
* {
* context: "CONTEXTLESS",
* key: "EnvironmentE",
* value: "production",
* },
* {
* context: "CONTEXTLESS",
* key: "Team",
* value: "test",
* },
* ],
* }],
* },
* {
* delayInMinutes: 0,
* severityLevel: "RESOURCE_CONTENTION",
* tagFilters: [{
* includeMode: "INCLUDE_ALL",
* tagFilters: [
* {
* context: "CONTEXTLESS",
* key: "EnvironmentF",
* value: "production",
* },
* {
* context: "CONTEXTLESS",
* key: "Team",
* value: "test",
* },
* ],
* }],
* },
* ],
* });
* ```
*/
class AlertingProfile extends pulumi.CustomResource {
/**
* Get an existing AlertingProfile 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 AlertingProfile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of AlertingProfile. 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'] === AlertingProfile.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["eventTypeFilters"] = state ? state.eventTypeFilters : undefined;
resourceInputs["metadata"] = state ? state.metadata : undefined;
resourceInputs["mzId"] = state ? state.mzId : undefined;
resourceInputs["rules"] = state ? state.rules : undefined;
resourceInputs["unknowns"] = state ? state.unknowns : undefined;
}
else {
const args = argsOrState;
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["eventTypeFilters"] = args ? args.eventTypeFilters : undefined;
resourceInputs["metadata"] = args ? args.metadata : undefined;
resourceInputs["mzId"] = args ? args.mzId : undefined;
resourceInputs["rules"] = args ? args.rules : undefined;
resourceInputs["unknowns"] = args ? args.unknowns : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AlertingProfile.__pulumiType, name, resourceInputs, opts);
}
}
exports.AlertingProfile = AlertingProfile;
/** @internal */
AlertingProfile.__pulumiType = 'dynatrace:index/alertingProfile:AlertingProfile';
//# sourceMappingURL=alertingProfile.js.map