UNPKG

@pulumi/wavefront

Version:

A Pulumi package for creating and managing wavefront cloud resources.

149 lines 5.73 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Dashboard = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Wavefront Dashboard resource. This allows dashboards to be created, updated, and deleted. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as wavefront from "@pulumi/wavefront"; * * const basic = new wavefront.User("basic", { * email: "test+tftesting@example.com", * groups: [ * "agent_management", * "alerts_management", * ], * }); * const testDashboard = new wavefront.Dashboard("test_dashboard", { * name: "Terraform Test Dashboard", * description: "testing, testing", * url: "tftestcreate", * displaySectionTableOfContents: true, * displayQueryParameters: true, * canViews: [basic.id], * sections: [{ * name: "section 1", * rows: [{ * charts: [{ * name: "chart 1", * description: "chart number 1", * units: "something per unit", * sources: [{ * name: "source name", * query: "ts()", * }], * chartSetting: { * type: "linear", * }, * summarization: "MEAN", * }], * }], * }], * parameterDetails: [{ * name: "param1", * label: "param1", * defaultValue: "Label", * hideFromView: false, * parameterType: "SIMPLE", * valuesToReadableStrings: { * Label: "test", * }, * }], * tags: [ * "b", * "terraform", * "a", * "test", * ], * }); * ``` * * ## Import * * Dashboards can be imported by using the `id`, e.g.: * * ```sh * $ pulumi import wavefront:index/dashboard:Dashboard dashboard tftestimport * ``` */ class Dashboard extends pulumi.CustomResource { /** * Get an existing Dashboard 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 Dashboard(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Dashboard. 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'] === Dashboard.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["canModifies"] = state?.canModifies; resourceInputs["canViews"] = state?.canViews; resourceInputs["description"] = state?.description; resourceInputs["displayQueryParameters"] = state?.displayQueryParameters; resourceInputs["displaySectionTableOfContents"] = state?.displaySectionTableOfContents; resourceInputs["eventFilterType"] = state?.eventFilterType; resourceInputs["name"] = state?.name; resourceInputs["parameterDetails"] = state?.parameterDetails; resourceInputs["sections"] = state?.sections; resourceInputs["tags"] = state?.tags; resourceInputs["url"] = state?.url; } else { const args = argsOrState; if (args?.description === undefined && !opts.urn) { throw new Error("Missing required property 'description'"); } if (args?.sections === undefined && !opts.urn) { throw new Error("Missing required property 'sections'"); } if (args?.tags === undefined && !opts.urn) { throw new Error("Missing required property 'tags'"); } if (args?.url === undefined && !opts.urn) { throw new Error("Missing required property 'url'"); } resourceInputs["canModifies"] = args?.canModifies; resourceInputs["canViews"] = args?.canViews; resourceInputs["description"] = args?.description; resourceInputs["displayQueryParameters"] = args?.displayQueryParameters; resourceInputs["displaySectionTableOfContents"] = args?.displaySectionTableOfContents; resourceInputs["eventFilterType"] = args?.eventFilterType; resourceInputs["name"] = args?.name; resourceInputs["parameterDetails"] = args?.parameterDetails; resourceInputs["sections"] = args?.sections; resourceInputs["tags"] = args?.tags; resourceInputs["url"] = args?.url; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Dashboard.__pulumiType, name, resourceInputs, opts); } } exports.Dashboard = Dashboard; /** @internal */ Dashboard.__pulumiType = 'wavefront:index/dashboard:Dashboard'; //# sourceMappingURL=dashboard.js.map