@pulumi/signalfx
Version:
A Pulumi package for creating and managing SignalFx resources.
128 lines • 6.05 kB
JavaScript
;
// *** 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.HeatmapChart = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This chart type shows the specified plot in a heat map fashion. This format is similar to the [Infrastructure Navigator](https://signalfx-product-docs.readthedocs-hosted.com/en/latest/built-in-content/infra-nav.html#infra), with squares representing each source for the selected metric, and the color of each square representing the value range of the metric.
*
* ## Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
*
* const myheatmapchart0 = new signalfx.HeatmapChart("myheatmapchart0", {
* name: "CPU Total Idle - Heatmap",
* programText: `myfilters = filter("cluster_name", "prod") and filter("role", "search")
* data("cpu.total.idle", filter=myfilters).publish()
* `,
* description: "Very cool Heatmap",
* disableSampling: true,
* sortBy: "+host",
* groupBies: [
* "hostname",
* "host",
* ],
* hideTimestamp: true,
* timezone: "Europe/Paris",
* colorRange: {
* minValue: 0,
* maxValue: 100,
* color: "#ff0000",
* },
* colorScales: [
* {
* gte: 99,
* color: "green",
* },
* {
* lt: 99,
* gte: 95,
* color: "yellow",
* },
* {
* lt: 95,
* color: "red",
* },
* ],
* });
* ```
*/
class HeatmapChart extends pulumi.CustomResource {
/**
* Get an existing HeatmapChart 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 HeatmapChart(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of HeatmapChart. 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'] === HeatmapChart.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["colorRange"] = state ? state.colorRange : undefined;
resourceInputs["colorScales"] = state ? state.colorScales : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["disableSampling"] = state ? state.disableSampling : undefined;
resourceInputs["groupBies"] = state ? state.groupBies : undefined;
resourceInputs["hideTimestamp"] = state ? state.hideTimestamp : undefined;
resourceInputs["maxDelay"] = state ? state.maxDelay : undefined;
resourceInputs["minimumResolution"] = state ? state.minimumResolution : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["programText"] = state ? state.programText : undefined;
resourceInputs["refreshInterval"] = state ? state.refreshInterval : undefined;
resourceInputs["sortBy"] = state ? state.sortBy : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["timezone"] = state ? state.timezone : undefined;
resourceInputs["unitPrefix"] = state ? state.unitPrefix : undefined;
resourceInputs["url"] = state ? state.url : undefined;
}
else {
const args = argsOrState;
if ((!args || args.programText === undefined) && !opts.urn) {
throw new Error("Missing required property 'programText'");
}
resourceInputs["colorRange"] = args ? args.colorRange : undefined;
resourceInputs["colorScales"] = args ? args.colorScales : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["disableSampling"] = args ? args.disableSampling : undefined;
resourceInputs["groupBies"] = args ? args.groupBies : undefined;
resourceInputs["hideTimestamp"] = args ? args.hideTimestamp : undefined;
resourceInputs["maxDelay"] = args ? args.maxDelay : undefined;
resourceInputs["minimumResolution"] = args ? args.minimumResolution : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["programText"] = args ? args.programText : undefined;
resourceInputs["refreshInterval"] = args ? args.refreshInterval : undefined;
resourceInputs["sortBy"] = args ? args.sortBy : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["timezone"] = args ? args.timezone : undefined;
resourceInputs["unitPrefix"] = args ? args.unitPrefix : undefined;
resourceInputs["url"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(HeatmapChart.__pulumiType, name, resourceInputs, opts);
}
}
exports.HeatmapChart = HeatmapChart;
/** @internal */
HeatmapChart.__pulumiType = 'signalfx:index/heatmapChart:HeatmapChart';
//# sourceMappingURL=heatmapChart.js.map