UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

124 lines 5.39 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.CseCustomInsight = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Sumo Logic CSE Custom Insight. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const customInsight = new sumologic.CseCustomInsight("custom_insight", { * description: "Insight description", * enabled: true, * ordered: true, * name: "Custom Insight Example", * ruleIds: [ * "MATCH-S00001", * "THRESHOLD-U00005", * ], * severity: "HIGH", * signalMatchStrategy: "ENTITY", * dynamicSeverities: [{ * minimumSignalSeverity: 8, * insightSeverity: "CRITICAL", * }], * signalNames: [ * "Some Signal Name", * "Wildcard Signal Name *", * ], * tags: ["_mitreAttackTactic:TA0009"], * }); * ``` * * ## Import * * Custom Insights can be imported using the field id, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/cseCustomInsight:CseCustomInsight custom_insight id * ``` */ class CseCustomInsight extends pulumi.CustomResource { /** * Get an existing CseCustomInsight 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 CseCustomInsight(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of CseCustomInsight. 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'] === CseCustomInsight.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["dynamicSeverities"] = state ? state.dynamicSeverities : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["ordered"] = state ? state.ordered : undefined; resourceInputs["ruleIds"] = state ? state.ruleIds : undefined; resourceInputs["severity"] = state ? state.severity : undefined; resourceInputs["signalMatchStrategy"] = state ? state.signalMatchStrategy : undefined; resourceInputs["signalNames"] = state ? state.signalNames : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; if ((!args || args.description === undefined) && !opts.urn) { throw new Error("Missing required property 'description'"); } if ((!args || args.enabled === undefined) && !opts.urn) { throw new Error("Missing required property 'enabled'"); } if ((!args || args.ordered === undefined) && !opts.urn) { throw new Error("Missing required property 'ordered'"); } if ((!args || args.severity === undefined) && !opts.urn) { throw new Error("Missing required property 'severity'"); } if ((!args || args.tags === undefined) && !opts.urn) { throw new Error("Missing required property 'tags'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["dynamicSeverities"] = args ? args.dynamicSeverities : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["ordered"] = args ? args.ordered : undefined; resourceInputs["ruleIds"] = args ? args.ruleIds : undefined; resourceInputs["severity"] = args ? args.severity : undefined; resourceInputs["signalMatchStrategy"] = args ? args.signalMatchStrategy : undefined; resourceInputs["signalNames"] = args ? args.signalNames : undefined; resourceInputs["tags"] = args ? args.tags : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CseCustomInsight.__pulumiType, name, resourceInputs, opts); } } exports.CseCustomInsight = CseCustomInsight; /** @internal */ CseCustomInsight.__pulumiType = 'sumologic:index/cseCustomInsight:CseCustomInsight'; //# sourceMappingURL=cseCustomInsight.js.map