UNPKG

@pulumi/wavefront

Version:

A Pulumi package for creating and managing wavefront cloud resources.

195 lines 6.66 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.DashboardJson = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Wavefront Dashboard JSON 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 testDashboardJson = new wavefront.DashboardJson("test_dashboard_json", {dashboardJson: `{ * "acl": { * "canModify": [ * "group-uuid", * "role-uuid" * ], * "canView": [ * "group-uuid", * "role-uuid" * ] * }, * "name": "Terraform Test Dashboard Json", * "description": "a", * "eventFilterType": "BYCHART", * "eventQuery": "", * "defaultTimeWindow": "", * "url": "tftestimport", * "displayDescription": false, * "displaySectionTableOfContents": true, * "displayQueryParameters": false, * "sections": [ * { * "name": "section 1", * "rows": [ * { * "charts": [ * { * "name": "chart 1", * "sources": [ * { * "name": "source 1", * "query": "ts()", * "scatterPlotSource": "Y", * "querybuilderEnabled": false, * "sourceDescription": "" * } * ], * "units": "someunit", * "base": 0, * "noDefaultEvents": false, * "interpolatePoints": false, * "includeObsoleteMetrics": false, * "description": "This is chart 1, showing something", * "chartSettings": { * "type": "markdown-widget", * "max": 100, * "expectedDataSpacing": 120, * "windowing": "full", * "windowSize": 10, * "autoColumnTags": false, * "columnTags": "deprecated", * "tagMode": "all", * "numTags": 2, * "customTags": [ * "tag1", * "tag2" * ], * "groupBySource": true, * "y1Max": 100, * "y1Units": "units", * "y0ScaleSIBy1024": true, * "y1ScaleSIBy1024": true, * "y0UnitAutoscaling": true, * "y1UnitAutoscaling": true, * "fixedLegendEnabled": true, * "fixedLegendUseRawStats": true, * "fixedLegendPosition": "RIGHT", * "fixedLegendDisplayStats": [ * "stat1", * "stat2" * ], * "fixedLegendFilterSort": "TOP", * "fixedLegendFilterLimit": 1, * "fixedLegendFilterField": "CURRENT", * "plainMarkdownContent": "markdown content" * }, * "chartAttributes": { * "dashboardLinks": { * "*": { * "variables": { * "xxx": "xxx" * }, * "destination": "/dashboards/xxxx" * } * } * }, * "summarization": "MEAN" * } * ], * "heightFactor": 50 * } * ] * } * ], * "parameterDetails": { * "param": { * "hideFromView": false, * "description": null, * "allowAll": null, * "tagKey": null, * "queryValue": null, * "dynamicFieldType": null, * "reverseDynSort": null, * "parameterType": "SIMPLE", * "label": "test", * "defaultValue": "Label", * "valuesToReadableStrings": { * "Label": "test" * }, * "selectedLabel": "Label", * "value": "test" * } * }, * "tags": { * "customerTags": [ * "terraform" * ] * } * } * `}); * ``` * * * * *Note: * ** If there are dynamic variables in the Wavefront dashboard json, then these variables must be present in a separate file as mentioned in the section below. * * ## Import * * Dashboard JSON can be imported by using the `id`, e.g.: * * ```sh * $ pulumi import wavefront:index/dashboardJson:DashboardJson dashboard_json tftestimport * ``` */ class DashboardJson extends pulumi.CustomResource { /** * Get an existing DashboardJson 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 DashboardJson(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DashboardJson. 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'] === DashboardJson.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dashboardJson"] = state ? state.dashboardJson : undefined; } else { const args = argsOrState; if ((!args || args.dashboardJson === undefined) && !opts.urn) { throw new Error("Missing required property 'dashboardJson'"); } resourceInputs["dashboardJson"] = args ? args.dashboardJson : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DashboardJson.__pulumiType, name, resourceInputs, opts); } } exports.DashboardJson = DashboardJson; /** @internal */ DashboardJson.__pulumiType = 'wavefront:index/dashboardJson:DashboardJson'; //# sourceMappingURL=dashboardJson.js.map