UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

106 lines 6.38 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.ConnectionsMetricsEndpointScrapeJob = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.connections.MetricsEndpointScrapeJob("test", { * stackId: "1", * name: "my-scrape-job", * enabled: true, * authenticationMethod: "basic", * authenticationBasicUsername: "my-username", * authenticationBasicPassword: "my-password", * url: "https://grafana.com/metrics", * scrapeIntervalSeconds: 120, * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/connectionsMetricsEndpointScrapeJob:ConnectionsMetricsEndpointScrapeJob name "{{ stack_id }}:{{ name }}" * ``` * * @deprecated grafana.index/connectionsmetricsendpointscrapejob.ConnectionsMetricsEndpointScrapeJob has been deprecated in favor of grafana.connections/metricsendpointscrapejob.MetricsEndpointScrapeJob */ class ConnectionsMetricsEndpointScrapeJob extends pulumi.CustomResource { /** * Get an existing ConnectionsMetricsEndpointScrapeJob 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) { pulumi.log.warn("ConnectionsMetricsEndpointScrapeJob is deprecated: grafana.index/connectionsmetricsendpointscrapejob.ConnectionsMetricsEndpointScrapeJob has been deprecated in favor of grafana.connections/metricsendpointscrapejob.MetricsEndpointScrapeJob"); return new ConnectionsMetricsEndpointScrapeJob(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ConnectionsMetricsEndpointScrapeJob. 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'] === ConnectionsMetricsEndpointScrapeJob.__pulumiType; } /** @deprecated grafana.index/connectionsmetricsendpointscrapejob.ConnectionsMetricsEndpointScrapeJob has been deprecated in favor of grafana.connections/metricsendpointscrapejob.MetricsEndpointScrapeJob */ constructor(name, argsOrState, opts) { pulumi.log.warn("ConnectionsMetricsEndpointScrapeJob is deprecated: grafana.index/connectionsmetricsendpointscrapejob.ConnectionsMetricsEndpointScrapeJob has been deprecated in favor of grafana.connections/metricsendpointscrapejob.MetricsEndpointScrapeJob"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authenticationBasicPassword"] = state ? state.authenticationBasicPassword : undefined; resourceInputs["authenticationBasicUsername"] = state ? state.authenticationBasicUsername : undefined; resourceInputs["authenticationBearerToken"] = state ? state.authenticationBearerToken : undefined; resourceInputs["authenticationMethod"] = state ? state.authenticationMethod : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["scrapeIntervalSeconds"] = state ? state.scrapeIntervalSeconds : undefined; resourceInputs["stackId"] = state ? state.stackId : undefined; resourceInputs["url"] = state ? state.url : undefined; } else { const args = argsOrState; if ((!args || args.authenticationMethod === undefined) && !opts.urn) { throw new Error("Missing required property 'authenticationMethod'"); } if ((!args || args.stackId === undefined) && !opts.urn) { throw new Error("Missing required property 'stackId'"); } if ((!args || args.url === undefined) && !opts.urn) { throw new Error("Missing required property 'url'"); } resourceInputs["authenticationBasicPassword"] = (args === null || args === void 0 ? void 0 : args.authenticationBasicPassword) ? pulumi.secret(args.authenticationBasicPassword) : undefined; resourceInputs["authenticationBasicUsername"] = args ? args.authenticationBasicUsername : undefined; resourceInputs["authenticationBearerToken"] = (args === null || args === void 0 ? void 0 : args.authenticationBearerToken) ? pulumi.secret(args.authenticationBearerToken) : undefined; resourceInputs["authenticationMethod"] = args ? args.authenticationMethod : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["scrapeIntervalSeconds"] = args ? args.scrapeIntervalSeconds : undefined; resourceInputs["stackId"] = args ? args.stackId : undefined; resourceInputs["url"] = args ? args.url : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["authenticationBasicPassword", "authenticationBearerToken"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ConnectionsMetricsEndpointScrapeJob.__pulumiType, name, resourceInputs, opts); } } exports.ConnectionsMetricsEndpointScrapeJob = ConnectionsMetricsEndpointScrapeJob; /** @internal */ ConnectionsMetricsEndpointScrapeJob.__pulumiType = 'grafana:index/connectionsMetricsEndpointScrapeJob:ConnectionsMetricsEndpointScrapeJob'; //# sourceMappingURL=connectionsMetricsEndpointScrapeJob.js.map