UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

89 lines 3.85 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.Team = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * * [Official documentation](https://grafana.com/docs/grafana/latest/administration/team-management/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/team/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * * const test_team = new grafana.Team("test-team", { * email: "teamemail@example.com", * members: ["viewer-01@example.com"], * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/team:Team team_name {{team_id}} # To use the default provider org * ``` * * ```sh * $ pulumi import grafana:index/team:Team team_name {{org_id}}:{{team_id}} # When "org_id" is set on the resource * ``` */ class Team extends pulumi.CustomResource { /** * Get an existing Team 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 Team(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Team. 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'] === Team.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["email"] = state ? state.email : undefined; resourceInputs["ignoreExternallySyncedMembers"] = state ? state.ignoreExternallySyncedMembers : undefined; resourceInputs["members"] = state ? state.members : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["orgId"] = state ? state.orgId : undefined; resourceInputs["preferences"] = state ? state.preferences : undefined; resourceInputs["teamId"] = state ? state.teamId : undefined; resourceInputs["teamSync"] = state ? state.teamSync : undefined; } else { const args = argsOrState; resourceInputs["email"] = args ? args.email : undefined; resourceInputs["ignoreExternallySyncedMembers"] = args ? args.ignoreExternallySyncedMembers : undefined; resourceInputs["members"] = args ? args.members : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["orgId"] = args ? args.orgId : undefined; resourceInputs["preferences"] = args ? args.preferences : undefined; resourceInputs["teamSync"] = args ? args.teamSync : undefined; resourceInputs["teamId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Team.__pulumiType, name, resourceInputs, opts); } } exports.Team = Team; /** @internal */ Team.__pulumiType = 'grafana:index/team:Team'; //# sourceMappingURL=team.js.map