UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

121 lines 5.46 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.InstalledCollector = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const installedCollector = new sumologic.InstalledCollector("installed_collector", { * name: "test-mac", * category: "macos/test", * ephemeral: true, * fields: { * key: "value", * }, * }); * ``` * * ## Import * * Collectors can be imported using the collector id, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/installedCollector:InstalledCollector test 1234567890 * ``` * * Collectors can also be imported using the collector name, which is unique per Sumo Logic account, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/installedCollector:InstalledCollector test my_test_collector * ``` * * [1]: https://help.sumologic.com/03Send-Data/Installed-Collectors/01About-Installed-Collectors * * [2]: https://en.wikipedia.org/wiki/Tz_database * * [3]: https://help.sumologic.com/Manage/Fields * * [4]: https://www.terraform.io/docs/configuration/resources.html#prevent_destroy * * [5]:https://help.sumologic.com/03Send-Data/Installed-Collectors/05Reference-Information-for-Collector-Installation/11Set-a-Collector-as-Ephemeral */ class InstalledCollector extends pulumi.CustomResource { /** * Get an existing InstalledCollector 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 InstalledCollector(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of InstalledCollector. 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'] === InstalledCollector.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["alive"] = state ? state.alive : undefined; resourceInputs["category"] = state ? state.category : undefined; resourceInputs["collectorVersion"] = state ? state.collectorVersion : undefined; resourceInputs["cutoffTimestamp"] = state ? state.cutoffTimestamp : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["ephemeral"] = state ? state.ephemeral : undefined; resourceInputs["fields"] = state ? state.fields : undefined; resourceInputs["hostName"] = state ? state.hostName : undefined; resourceInputs["lastSeenAlive"] = state ? state.lastSeenAlive : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["sourceSyncMode"] = state ? state.sourceSyncMode : undefined; resourceInputs["targetCpu"] = state ? state.targetCpu : undefined; resourceInputs["timezone"] = state ? state.timezone : undefined; } else { const args = argsOrState; if ((!args || args.ephemeral === undefined) && !opts.urn) { throw new Error("Missing required property 'ephemeral'"); } resourceInputs["category"] = args ? args.category : undefined; resourceInputs["cutoffTimestamp"] = args ? args.cutoffTimestamp : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["ephemeral"] = args ? args.ephemeral : undefined; resourceInputs["fields"] = args ? args.fields : undefined; resourceInputs["hostName"] = args ? args.hostName : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["sourceSyncMode"] = args ? args.sourceSyncMode : undefined; resourceInputs["targetCpu"] = args ? args.targetCpu : undefined; resourceInputs["timezone"] = args ? args.timezone : undefined; resourceInputs["alive"] = undefined /*out*/; resourceInputs["collectorVersion"] = undefined /*out*/; resourceInputs["lastSeenAlive"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(InstalledCollector.__pulumiType, name, resourceInputs, opts); } } exports.InstalledCollector = InstalledCollector; /** @internal */ InstalledCollector.__pulumiType = 'sumologic:index/installedCollector:InstalledCollector'; //# sourceMappingURL=installedCollector.js.map