UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

92 lines 3.53 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.Skill = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a Grafana Assistant skill. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const example = new grafana.assistant.Skill("example", { * name: "Deploy readiness check", * commandName: "deploy-readiness", * body: `1. Check deployment pipeline status. * 2. Verify SLO error budget before promoting. * `, * scope: "tenant", * }); * ``` * * ## Import * * ```sh * terraform import grafana_assistant_skill.name "{{ id }}" * ``` */ class Skill extends pulumi.CustomResource { /** * Get an existing Skill 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 Skill(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Skill. 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'] === Skill.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowedTools"] = state?.allowedTools; resourceInputs["body"] = state?.body; resourceInputs["commandName"] = state?.commandName; resourceInputs["contextItems"] = state?.contextItems; resourceInputs["includeInKnowledgebase"] = state?.includeInKnowledgebase; resourceInputs["name"] = state?.name; resourceInputs["scope"] = state?.scope; } else { const args = argsOrState; if (args?.body === undefined && !opts.urn) { throw new Error("Missing required property 'body'"); } if (args?.scope === undefined && !opts.urn) { throw new Error("Missing required property 'scope'"); } resourceInputs["allowedTools"] = args?.allowedTools; resourceInputs["body"] = args?.body; resourceInputs["commandName"] = args?.commandName; resourceInputs["contextItems"] = args?.contextItems; resourceInputs["includeInKnowledgebase"] = args?.includeInKnowledgebase; resourceInputs["name"] = args?.name; resourceInputs["scope"] = args?.scope; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Skill.__pulumiType, name, resourceInputs, opts); } } exports.Skill = Skill; /** @internal */ Skill.__pulumiType = 'grafana:assistant/skill:Skill'; //# sourceMappingURL=skill.js.map