UNPKG

@pulumiverse/dynatrace

Version:

A Pulumi package for creating and managing Dynatrace cloud resources.

87 lines 4.67 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.Slo = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); class Slo extends pulumi.CustomResource { /** * Get an existing Slo 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 Slo(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Slo. 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'] === Slo.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["denominator"] = state ? state.denominator : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["disabled"] = state ? state.disabled : undefined; resourceInputs["errorBudgetBurnRate"] = state ? state.errorBudgetBurnRate : undefined; resourceInputs["evaluation"] = state ? state.evaluation : undefined; resourceInputs["filter"] = state ? state.filter : undefined; resourceInputs["metricExpression"] = state ? state.metricExpression : undefined; resourceInputs["metricName"] = state ? state.metricName : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["numerator"] = state ? state.numerator : undefined; resourceInputs["rate"] = state ? state.rate : undefined; resourceInputs["target"] = state ? state.target : undefined; resourceInputs["timeframe"] = state ? state.timeframe : undefined; resourceInputs["warning"] = state ? state.warning : undefined; } else { const args = argsOrState; if ((!args || args.evaluation === undefined) && !opts.urn) { throw new Error("Missing required property 'evaluation'"); } if ((!args || args.target === undefined) && !opts.urn) { throw new Error("Missing required property 'target'"); } if ((!args || args.timeframe === undefined) && !opts.urn) { throw new Error("Missing required property 'timeframe'"); } if ((!args || args.warning === undefined) && !opts.urn) { throw new Error("Missing required property 'warning'"); } resourceInputs["denominator"] = args ? args.denominator : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["disabled"] = args ? args.disabled : undefined; resourceInputs["errorBudgetBurnRate"] = args ? args.errorBudgetBurnRate : undefined; resourceInputs["evaluation"] = args ? args.evaluation : undefined; resourceInputs["filter"] = args ? args.filter : undefined; resourceInputs["metricExpression"] = args ? args.metricExpression : undefined; resourceInputs["metricName"] = args ? args.metricName : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["numerator"] = args ? args.numerator : undefined; resourceInputs["rate"] = args ? args.rate : undefined; resourceInputs["target"] = args ? args.target : undefined; resourceInputs["timeframe"] = args ? args.timeframe : undefined; resourceInputs["warning"] = args ? args.warning : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Slo.__pulumiType, name, resourceInputs, opts); } } exports.Slo = Slo; /** @internal */ Slo.__pulumiType = 'dynatrace:index/slo:Slo'; //# sourceMappingURL=slo.js.map