@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
95 lines • 5.22 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.SloV2 = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class SloV2 extends pulumi.CustomResource {
/**
* Get an existing SloV2 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 SloV2(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SloV2. 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'] === SloV2.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["customDescription"] = state ? state.customDescription : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["errorBudgetBurnRate"] = state ? state.errorBudgetBurnRate : undefined;
resourceInputs["evaluationType"] = state ? state.evaluationType : undefined;
resourceInputs["evaluationWindow"] = state ? state.evaluationWindow : undefined;
resourceInputs["filter"] = state ? state.filter : undefined;
resourceInputs["legacyId"] = state ? state.legacyId : undefined;
resourceInputs["metricExpression"] = state ? state.metricExpression : undefined;
resourceInputs["metricName"] = state ? state.metricName : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["targetSuccess"] = state ? state.targetSuccess : undefined;
resourceInputs["targetWarning"] = state ? state.targetWarning : undefined;
}
else {
const args = argsOrState;
if ((!args || args.enabled === undefined) && !opts.urn) {
throw new Error("Missing required property 'enabled'");
}
if ((!args || args.errorBudgetBurnRate === undefined) && !opts.urn) {
throw new Error("Missing required property 'errorBudgetBurnRate'");
}
if ((!args || args.evaluationType === undefined) && !opts.urn) {
throw new Error("Missing required property 'evaluationType'");
}
if ((!args || args.evaluationWindow === undefined) && !opts.urn) {
throw new Error("Missing required property 'evaluationWindow'");
}
if ((!args || args.filter === undefined) && !opts.urn) {
throw new Error("Missing required property 'filter'");
}
if ((!args || args.metricExpression === undefined) && !opts.urn) {
throw new Error("Missing required property 'metricExpression'");
}
if ((!args || args.targetSuccess === undefined) && !opts.urn) {
throw new Error("Missing required property 'targetSuccess'");
}
if ((!args || args.targetWarning === undefined) && !opts.urn) {
throw new Error("Missing required property 'targetWarning'");
}
resourceInputs["customDescription"] = args ? args.customDescription : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["errorBudgetBurnRate"] = args ? args.errorBudgetBurnRate : undefined;
resourceInputs["evaluationType"] = args ? args.evaluationType : undefined;
resourceInputs["evaluationWindow"] = args ? args.evaluationWindow : undefined;
resourceInputs["filter"] = args ? args.filter : undefined;
resourceInputs["legacyId"] = args ? args.legacyId : undefined;
resourceInputs["metricExpression"] = args ? args.metricExpression : undefined;
resourceInputs["metricName"] = args ? args.metricName : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["targetSuccess"] = args ? args.targetSuccess : undefined;
resourceInputs["targetWarning"] = args ? args.targetWarning : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SloV2.__pulumiType, name, resourceInputs, opts);
}
}
exports.SloV2 = SloV2;
/** @internal */
SloV2.__pulumiType = 'dynatrace:index/sloV2:SloV2';
//# sourceMappingURL=sloV2.js.map