UNPKG

@pulumiverse/dynatrace

Version:

A Pulumi package for creating and managing Dynatrace cloud resources.

80 lines 4.14 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.DiskAnomalies = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); class DiskAnomalies extends pulumi.CustomResource { /** * Get an existing DiskAnomalies 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 DiskAnomalies(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DiskAnomalies. 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'] === DiskAnomalies.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["diskName"] = state ? state.diskName : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["hostGroupId"] = state ? state.hostGroupId : undefined; resourceInputs["metric"] = state ? state.metric : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["samples"] = state ? state.samples : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["threshold"] = state ? state.threshold : undefined; resourceInputs["violatingSamples"] = state ? state.violatingSamples : undefined; } else { const args = argsOrState; if ((!args || args.enabled === undefined) && !opts.urn) { throw new Error("Missing required property 'enabled'"); } if ((!args || args.metric === undefined) && !opts.urn) { throw new Error("Missing required property 'metric'"); } if ((!args || args.samples === undefined) && !opts.urn) { throw new Error("Missing required property 'samples'"); } if ((!args || args.threshold === undefined) && !opts.urn) { throw new Error("Missing required property 'threshold'"); } if ((!args || args.violatingSamples === undefined) && !opts.urn) { throw new Error("Missing required property 'violatingSamples'"); } resourceInputs["diskName"] = args ? args.diskName : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["hostGroupId"] = args ? args.hostGroupId : undefined; resourceInputs["metric"] = args ? args.metric : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["samples"] = args ? args.samples : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["threshold"] = args ? args.threshold : undefined; resourceInputs["violatingSamples"] = args ? args.violatingSamples : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DiskAnomalies.__pulumiType, name, resourceInputs, opts); } } exports.DiskAnomalies = DiskAnomalies; /** @internal */ DiskAnomalies.__pulumiType = 'dynatrace:index/diskAnomalies:DiskAnomalies'; //# sourceMappingURL=diskAnomalies.js.map