UNPKG

@pulumi/signalfx

Version:

A Pulumi package for creating and managing SignalFx resources.

145 lines 7.7 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.TimeChart = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Splunk Observability Cloud time chart resource. This can be used to create and manage the different types of time charts. * * Time charts display data points over a period of time. * * ## Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as signalfx from "@pulumi/signalfx"; * * const mychart0 = new signalfx.TimeChart("mychart0", { * name: "CPU Total Idle", * programText: "data(\"cpu.total.idle\").publish(label=\"CPU Idle\")\n", * timeRange: 3600, * plotType: "LineChart", * showDataMarkers: true, * legendOptionsFields: [ * { * property: "collector", * enabled: false, * }, * { * property: "hostname", * enabled: false, * }, * ], * vizOptions: [{ * label: "CPU Idle", * axis: "left", * color: "orange", * }], * axisLeft: { * label: "CPU Total Idle", * lowWatermark: 1000, * }, * }); * ``` */ class TimeChart extends pulumi.CustomResource { /** * Get an existing TimeChart 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 TimeChart(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of TimeChart. 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'] === TimeChart.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["axesIncludeZero"] = state ? state.axesIncludeZero : undefined; resourceInputs["axesPrecision"] = state ? state.axesPrecision : undefined; resourceInputs["axisLeft"] = state ? state.axisLeft : undefined; resourceInputs["axisRight"] = state ? state.axisRight : undefined; resourceInputs["colorBy"] = state ? state.colorBy : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["disableSampling"] = state ? state.disableSampling : undefined; resourceInputs["endTime"] = state ? state.endTime : undefined; resourceInputs["eventOptions"] = state ? state.eventOptions : undefined; resourceInputs["histogramOptions"] = state ? state.histogramOptions : undefined; resourceInputs["legendFieldsToHides"] = state ? state.legendFieldsToHides : undefined; resourceInputs["legendOptionsFields"] = state ? state.legendOptionsFields : undefined; resourceInputs["maxDelay"] = state ? state.maxDelay : undefined; resourceInputs["minimumResolution"] = state ? state.minimumResolution : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["onChartLegendDimension"] = state ? state.onChartLegendDimension : undefined; resourceInputs["plotType"] = state ? state.plotType : undefined; resourceInputs["programText"] = state ? state.programText : undefined; resourceInputs["showDataMarkers"] = state ? state.showDataMarkers : undefined; resourceInputs["showEventLines"] = state ? state.showEventLines : undefined; resourceInputs["stacked"] = state ? state.stacked : undefined; resourceInputs["startTime"] = state ? state.startTime : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["timeRange"] = state ? state.timeRange : 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["axesIncludeZero"] = args ? args.axesIncludeZero : undefined; resourceInputs["axesPrecision"] = args ? args.axesPrecision : undefined; resourceInputs["axisLeft"] = args ? args.axisLeft : undefined; resourceInputs["axisRight"] = args ? args.axisRight : undefined; resourceInputs["colorBy"] = args ? args.colorBy : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["disableSampling"] = args ? args.disableSampling : undefined; resourceInputs["endTime"] = args ? args.endTime : undefined; resourceInputs["eventOptions"] = args ? args.eventOptions : undefined; resourceInputs["histogramOptions"] = args ? args.histogramOptions : undefined; resourceInputs["legendFieldsToHides"] = args ? args.legendFieldsToHides : undefined; resourceInputs["legendOptionsFields"] = args ? args.legendOptionsFields : undefined; resourceInputs["maxDelay"] = args ? args.maxDelay : undefined; resourceInputs["minimumResolution"] = args ? args.minimumResolution : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["onChartLegendDimension"] = args ? args.onChartLegendDimension : undefined; resourceInputs["plotType"] = args ? args.plotType : undefined; resourceInputs["programText"] = args ? args.programText : undefined; resourceInputs["showDataMarkers"] = args ? args.showDataMarkers : undefined; resourceInputs["showEventLines"] = args ? args.showEventLines : undefined; resourceInputs["stacked"] = args ? args.stacked : undefined; resourceInputs["startTime"] = args ? args.startTime : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timeRange"] = args ? args.timeRange : 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(TimeChart.__pulumiType, name, resourceInputs, opts); } } exports.TimeChart = TimeChart; /** @internal */ TimeChart.__pulumiType = 'signalfx:index/timeChart:TimeChart'; //# sourceMappingURL=timeChart.js.map