@pulumi/signalfx
Version:
A Pulumi package for creating and managing SignalFx resources.
107 lines • 5.58 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.SingleValueChart = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This chart type displays a single number in a large font, representing the current value of a single metric on a plot line.
*
* If the time period is in the past, the number represents the value of the metric near the end of the time period.
*
* ## Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as signalfx from "@pulumi/signalfx";
*
* const mysvchart0 = new signalfx.SingleValueChart("mysvchart0", {
* name: "CPU Total Idle - Single Value",
* programText: `myfilters = filter("cluster_name", "prod") and filter("role", "search")
* data("cpu.total.idle", filter=myfilters).publish()
* `,
* description: "Very cool Single Value Chart",
* colorBy: "Dimension",
* maxDelay: 2,
* refreshInterval: 1,
* maxPrecision: 2,
* isTimestampHidden: true,
* });
* ```
*/
class SingleValueChart extends pulumi.CustomResource {
/**
* Get an existing SingleValueChart 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 SingleValueChart(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SingleValueChart. 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'] === SingleValueChart.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["colorBy"] = state ? state.colorBy : undefined;
resourceInputs["colorScales"] = state ? state.colorScales : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["isTimestampHidden"] = state ? state.isTimestampHidden : undefined;
resourceInputs["maxDelay"] = state ? state.maxDelay : undefined;
resourceInputs["maxPrecision"] = state ? state.maxPrecision : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["programText"] = state ? state.programText : undefined;
resourceInputs["refreshInterval"] = state ? state.refreshInterval : undefined;
resourceInputs["secondaryVisualization"] = state ? state.secondaryVisualization : undefined;
resourceInputs["showSparkLine"] = state ? state.showSparkLine : 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;
resourceInputs["vizOptions"] = state ? state.vizOptions : undefined;
}
else {
const args = argsOrState;
if ((!args || args.programText === undefined) && !opts.urn) {
throw new Error("Missing required property 'programText'");
}
resourceInputs["colorBy"] = args ? args.colorBy : undefined;
resourceInputs["colorScales"] = args ? args.colorScales : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["isTimestampHidden"] = args ? args.isTimestampHidden : undefined;
resourceInputs["maxDelay"] = args ? args.maxDelay : undefined;
resourceInputs["maxPrecision"] = args ? args.maxPrecision : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["programText"] = args ? args.programText : undefined;
resourceInputs["refreshInterval"] = args ? args.refreshInterval : undefined;
resourceInputs["secondaryVisualization"] = args ? args.secondaryVisualization : undefined;
resourceInputs["showSparkLine"] = args ? args.showSparkLine : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["timezone"] = args ? args.timezone : undefined;
resourceInputs["unitPrefix"] = args ? args.unitPrefix : undefined;
resourceInputs["vizOptions"] = args ? args.vizOptions : undefined;
resourceInputs["url"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SingleValueChart.__pulumiType, name, resourceInputs, opts);
}
}
exports.SingleValueChart = SingleValueChart;
/** @internal */
SingleValueChart.__pulumiType = 'signalfx:index/singleValueChart:SingleValueChart';
//# sourceMappingURL=singleValueChart.js.map