UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

76 lines 3.56 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.OrganizationPreference = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/organization-management/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/preferences/#get-current-org-prefs) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * * const test = new grafana.OrganizationPreference("test", { * theme: "light", * timezone: "utc", * weekStart: "Tuesday", * }); * ``` */ class OrganizationPreference extends pulumi.CustomResource { /** * Get an existing OrganizationPreference 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 OrganizationPreference(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of OrganizationPreference. 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'] === OrganizationPreference.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["homeDashboardId"] = state ? state.homeDashboardId : undefined; resourceInputs["homeDashboardUid"] = state ? state.homeDashboardUid : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["theme"] = state ? state.theme : undefined; resourceInputs["timezone"] = state ? state.timezone : undefined; resourceInputs["weekStart"] = state ? state.weekStart : undefined; } else { const args = argsOrState; resourceInputs["homeDashboardId"] = args ? args.homeDashboardId : undefined; resourceInputs["homeDashboardUid"] = args ? args.homeDashboardUid : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["theme"] = args ? args.theme : undefined; resourceInputs["timezone"] = args ? args.timezone : undefined; resourceInputs["weekStart"] = args ? args.weekStart : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(OrganizationPreference.__pulumiType, name, resourceInputs, opts); } } exports.OrganizationPreference = OrganizationPreference; /** @internal */ OrganizationPreference.__pulumiType = 'grafana:index/organizationPreference:OrganizationPreference'; //# sourceMappingURL=organizationPreference.js.map