UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

87 lines 3.13 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.Collector = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages Grafana Fleet Management collectors. * * * [Official documentation](https://grafana.com/docs/grafana-cloud/send-data/fleet-management/) * * [API documentation](https://grafana.com/docs/grafana-cloud/send-data/fleet-management/api-reference/collector-api/) * * Step-by-step guide * * Required access policy scopes: * * * fleet-management:read * * fleet-management:write * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.fleetmanagement.Collector("test", { * id: "my_collector", * remoteAttributes: { * env: "PROD", * owner: "TEAM-A", * }, * enabled: true, * }); * ``` * * ## Import * * ```sh * terraform import grafana_fleet_management_collector.name "{{ id }}" * ``` */ class Collector extends pulumi.CustomResource { /** * Get an existing Collector 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 Collector(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Collector. 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'] === Collector.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["collectorType"] = state?.collectorType; resourceInputs["enabled"] = state?.enabled; resourceInputs["remoteAttributes"] = state?.remoteAttributes; } else { const args = argsOrState; resourceInputs["collectorType"] = args?.collectorType; resourceInputs["enabled"] = args?.enabled; resourceInputs["remoteAttributes"] = args?.remoteAttributes; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Collector.__pulumiType, name, resourceInputs, opts); } } exports.Collector = Collector; /** @internal */ Collector.__pulumiType = 'grafana:fleetManagement/collector:Collector'; //# sourceMappingURL=collector.js.map