UNPKG

@pulumiverse/dynatrace

Version:

A Pulumi package for creating and managing Dynatrace cloud resources.

116 lines 5.21 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.MaintenanceWindow = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * !> This resource API endpoint has been deprecated, please use dynatrace.Maintenance instead. * * > This resource requires the API token scopes **Read configuration** (`ReadConfig`) and **Write configuration** (`WriteConfig`) * * ## Dynatrace Documentation * * - Maintenance windows - https://www.dynatrace.com/support/help/how-to-use-dynatrace/problem-detection-and-analysis/notifications-and-alerting/maintenance-windows * * - Maintenance windows API - https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/maintenance-windows-api * * ## Resource Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as dynatrace from "@pulumiverse/dynatrace"; * * const _name_ = new dynatrace.MaintenanceWindow("#name#", { * schedule: { * end: "2021-05-11 14:41", * recurrenceType: "ONCE", * start: "2021-05-11 13:41", * zoneId: "Europe/Vienna", * }, * scope: { * matches: [{ * tagCombination: "AND", * tags: [ * { * context: "CONTEXTLESS", * key: "bggtedgxen", * }, * { * context: "CONTEXTLESS", * key: "deldel1", * }, * ], * }], * }, * suppressSynthMonExec: true, * suppression: "DONT_DETECT_PROBLEMS", * type: "PLANNED", * }); * ``` */ class MaintenanceWindow extends pulumi.CustomResource { /** * Get an existing MaintenanceWindow 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 MaintenanceWindow(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MaintenanceWindow. 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'] === MaintenanceWindow.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["schedule"] = state ? state.schedule : undefined; resourceInputs["scope"] = state ? state.scope : undefined; resourceInputs["suppressSynthMonExec"] = state ? state.suppressSynthMonExec : undefined; resourceInputs["suppression"] = state ? state.suppression : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["unknowns"] = state ? state.unknowns : undefined; } else { const args = argsOrState; if ((!args || args.suppression === undefined) && !opts.urn) { throw new Error("Missing required property 'suppression'"); } if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["schedule"] = args ? args.schedule : undefined; resourceInputs["scope"] = args ? args.scope : undefined; resourceInputs["suppressSynthMonExec"] = args ? args.suppressSynthMonExec : undefined; resourceInputs["suppression"] = args ? args.suppression : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["unknowns"] = args ? args.unknowns : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MaintenanceWindow.__pulumiType, name, resourceInputs, opts); } } exports.MaintenanceWindow = MaintenanceWindow; /** @internal */ MaintenanceWindow.__pulumiType = 'dynatrace:index/maintenanceWindow:MaintenanceWindow'; //# sourceMappingURL=maintenanceWindow.js.map