UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

109 lines 4.87 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.CseRuleTuningExpression = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a CSE Rule Tuning Expression. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const ruleTuningExpression = new sumologic.CseRuleTuningExpression("rule_tuning_expression", { * name: "New Rule Tuning Name", * description: "New Rule Tuning Description", * expression: "accountId = 1234", * enabled: true, * exclude: true, * isGlobal: false, * ruleIds: ["LEGACY-S00084"], * }); * ``` * * ## Import * * Rule tuning expression can be imported using the field id, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/cseRuleTuningExpression:CseRuleTuningExpression rule_tuning_expression id * ``` */ class CseRuleTuningExpression extends pulumi.CustomResource { /** * Get an existing CseRuleTuningExpression 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 CseRuleTuningExpression(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of CseRuleTuningExpression. 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'] === CseRuleTuningExpression.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["exclude"] = state ? state.exclude : undefined; resourceInputs["expression"] = state ? state.expression : undefined; resourceInputs["isGlobal"] = state ? state.isGlobal : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["ruleIds"] = state ? state.ruleIds : 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.exclude === undefined) && !opts.urn) { throw new Error("Missing required property 'exclude'"); } if ((!args || args.expression === undefined) && !opts.urn) { throw new Error("Missing required property 'expression'"); } if ((!args || args.isGlobal === undefined) && !opts.urn) { throw new Error("Missing required property 'isGlobal'"); } if ((!args || args.ruleIds === undefined) && !opts.urn) { throw new Error("Missing required property 'ruleIds'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["exclude"] = args ? args.exclude : undefined; resourceInputs["expression"] = args ? args.expression : undefined; resourceInputs["isGlobal"] = args ? args.isGlobal : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["ruleIds"] = args ? args.ruleIds : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CseRuleTuningExpression.__pulumiType, name, resourceInputs, opts); } } exports.CseRuleTuningExpression = CseRuleTuningExpression; /** @internal */ CseRuleTuningExpression.__pulumiType = 'sumologic:index/cseRuleTuningExpression:CseRuleTuningExpression'; //# sourceMappingURL=cseRuleTuningExpression.js.map