pulumi-logtail
Version:
A Pulumi provider for managing Logtail log management and analytics resources, dynamically bridged from the Terraform Logtail provider with support for sources, metrics, and log aggregation.
94 lines • 5.86 kB
JavaScript
;
// *** 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.Source = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
class Source extends pulumi.CustomResource {
/**
* Get an existing Source 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 Source(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Source. 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'] === Source.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["customBucket"] = state ? state.customBucket : undefined;
resourceInputs["dataRegion"] = state ? state.dataRegion : undefined;
resourceInputs["ingestingHost"] = state ? state.ingestingHost : undefined;
resourceInputs["ingestingPaused"] = state ? state.ingestingPaused : undefined;
resourceInputs["liveTailPattern"] = state ? state.liveTailPattern : undefined;
resourceInputs["logsRetention"] = state ? state.logsRetention : undefined;
resourceInputs["metricsRetention"] = state ? state.metricsRetention : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["platform"] = state ? state.platform : undefined;
resourceInputs["scrapeFrequencySecs"] = state ? state.scrapeFrequencySecs : undefined;
resourceInputs["scrapeRequestBasicAuthPassword"] = state ? state.scrapeRequestBasicAuthPassword : undefined;
resourceInputs["scrapeRequestBasicAuthUser"] = state ? state.scrapeRequestBasicAuthUser : undefined;
resourceInputs["scrapeRequestHeaders"] = state ? state.scrapeRequestHeaders : undefined;
resourceInputs["scrapeUrls"] = state ? state.scrapeUrls : undefined;
resourceInputs["sourceGroupId"] = state ? state.sourceGroupId : undefined;
resourceInputs["tableName"] = state ? state.tableName : undefined;
resourceInputs["teamName"] = state ? state.teamName : undefined;
resourceInputs["token"] = state ? state.token : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
resourceInputs["vrlTransformation"] = state ? state.vrlTransformation : undefined;
}
else {
const args = argsOrState;
if ((!args || args.platform === undefined) && !opts.urn) {
throw new Error("Missing required property 'platform'");
}
resourceInputs["customBucket"] = args ? args.customBucket : undefined;
resourceInputs["dataRegion"] = args ? args.dataRegion : undefined;
resourceInputs["ingestingPaused"] = args ? args.ingestingPaused : undefined;
resourceInputs["liveTailPattern"] = args ? args.liveTailPattern : undefined;
resourceInputs["logsRetention"] = args ? args.logsRetention : undefined;
resourceInputs["metricsRetention"] = args ? args.metricsRetention : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["platform"] = args ? args.platform : undefined;
resourceInputs["scrapeFrequencySecs"] = args ? args.scrapeFrequencySecs : undefined;
resourceInputs["scrapeRequestBasicAuthPassword"] = (args === null || args === void 0 ? void 0 : args.scrapeRequestBasicAuthPassword) ? pulumi.secret(args.scrapeRequestBasicAuthPassword) : undefined;
resourceInputs["scrapeRequestBasicAuthUser"] = args ? args.scrapeRequestBasicAuthUser : undefined;
resourceInputs["scrapeRequestHeaders"] = args ? args.scrapeRequestHeaders : undefined;
resourceInputs["scrapeUrls"] = args ? args.scrapeUrls : undefined;
resourceInputs["sourceGroupId"] = args ? args.sourceGroupId : undefined;
resourceInputs["teamName"] = args ? args.teamName : undefined;
resourceInputs["vrlTransformation"] = args ? args.vrlTransformation : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["ingestingHost"] = undefined /*out*/;
resourceInputs["tableName"] = undefined /*out*/;
resourceInputs["token"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["scrapeRequestBasicAuthPassword"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(Source.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
}
}
exports.Source = Source;
/** @internal */
Source.__pulumiType = 'logtail:index/source:Source';
//# sourceMappingURL=source.js.map