@pulumi/wavefront
Version:
A Pulumi package for creating and managing wavefront cloud resources.
92 lines • 4.66 kB
JavaScript
;
// *** 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.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.
*
* ## 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, Object.assign(Object.assign({}, 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 ? state.canModifies : undefined;
resourceInputs["canViews"] = state ? state.canViews : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["displayQueryParameters"] = state ? state.displayQueryParameters : undefined;
resourceInputs["displaySectionTableOfContents"] = state ? state.displaySectionTableOfContents : undefined;
resourceInputs["eventFilterType"] = state ? state.eventFilterType : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["parameterDetails"] = state ? state.parameterDetails : undefined;
resourceInputs["sections"] = state ? state.sections : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["url"] = state ? state.url : undefined;
}
else {
const args = argsOrState;
if ((!args || args.description === undefined) && !opts.urn) {
throw new Error("Missing required property 'description'");
}
if ((!args || args.sections === undefined) && !opts.urn) {
throw new Error("Missing required property 'sections'");
}
if ((!args || args.tags === undefined) && !opts.urn) {
throw new Error("Missing required property 'tags'");
}
if ((!args || args.url === undefined) && !opts.urn) {
throw new Error("Missing required property 'url'");
}
resourceInputs["canModifies"] = args ? args.canModifies : undefined;
resourceInputs["canViews"] = args ? args.canViews : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["displayQueryParameters"] = args ? args.displayQueryParameters : undefined;
resourceInputs["displaySectionTableOfContents"] = args ? args.displaySectionTableOfContents : undefined;
resourceInputs["eventFilterType"] = args ? args.eventFilterType : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["parameterDetails"] = args ? args.parameterDetails : undefined;
resourceInputs["sections"] = args ? args.sections : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["url"] = args ? args.url : undefined;
}
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