@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
140 lines • 7.65 kB
JavaScript
;
// *** 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.CseOutlierRule = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## layout: "sumologic"
*
* page_title: "SumoLogic: sumologic.CseOutlierRule"
* description: |-
* Provides a CSE Outlier Rule
* ---
*
* # sumologic.CseOutlierRule
* Provides a Sumo Logic CSE [Outlier Rule](https://help.sumologic.com/docs/cse/rules/write-outlier-rule/).
*
* ## Import
*
* Outlier rules can be imported using the field id, e.g.:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/cseOutlierRule:CseOutlierRule outlier_rule id
* ```
*/
class CseOutlierRule extends pulumi.CustomResource {
/**
* Get an existing CseOutlierRule 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 CseOutlierRule(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of CseOutlierRule. 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'] === CseOutlierRule.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["aggregationFunctions"] = state ? state.aggregationFunctions : undefined;
resourceInputs["baselineWindowSize"] = state ? state.baselineWindowSize : undefined;
resourceInputs["descriptionExpression"] = state ? state.descriptionExpression : undefined;
resourceInputs["deviationThreshold"] = state ? state.deviationThreshold : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["entitySelectors"] = state ? state.entitySelectors : undefined;
resourceInputs["floorValue"] = state ? state.floorValue : undefined;
resourceInputs["groupByFields"] = state ? state.groupByFields : undefined;
resourceInputs["isPrototype"] = state ? state.isPrototype : undefined;
resourceInputs["matchExpression"] = state ? state.matchExpression : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["nameExpression"] = state ? state.nameExpression : undefined;
resourceInputs["retentionWindowSize"] = state ? state.retentionWindowSize : undefined;
resourceInputs["severity"] = state ? state.severity : undefined;
resourceInputs["summaryExpression"] = state ? state.summaryExpression : undefined;
resourceInputs["suppressionWindowSize"] = state ? state.suppressionWindowSize : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["windowSize"] = state ? state.windowSize : undefined;
}
else {
const args = argsOrState;
if ((!args || args.aggregationFunctions === undefined) && !opts.urn) {
throw new Error("Missing required property 'aggregationFunctions'");
}
if ((!args || args.baselineWindowSize === undefined) && !opts.urn) {
throw new Error("Missing required property 'baselineWindowSize'");
}
if ((!args || args.descriptionExpression === undefined) && !opts.urn) {
throw new Error("Missing required property 'descriptionExpression'");
}
if ((!args || args.deviationThreshold === undefined) && !opts.urn) {
throw new Error("Missing required property 'deviationThreshold'");
}
if ((!args || args.enabled === undefined) && !opts.urn) {
throw new Error("Missing required property 'enabled'");
}
if ((!args || args.entitySelectors === undefined) && !opts.urn) {
throw new Error("Missing required property 'entitySelectors'");
}
if ((!args || args.floorValue === undefined) && !opts.urn) {
throw new Error("Missing required property 'floorValue'");
}
if ((!args || args.matchExpression === undefined) && !opts.urn) {
throw new Error("Missing required property 'matchExpression'");
}
if ((!args || args.nameExpression === undefined) && !opts.urn) {
throw new Error("Missing required property 'nameExpression'");
}
if ((!args || args.retentionWindowSize === undefined) && !opts.urn) {
throw new Error("Missing required property 'retentionWindowSize'");
}
if ((!args || args.severity === undefined) && !opts.urn) {
throw new Error("Missing required property 'severity'");
}
if ((!args || args.windowSize === undefined) && !opts.urn) {
throw new Error("Missing required property 'windowSize'");
}
resourceInputs["aggregationFunctions"] = args ? args.aggregationFunctions : undefined;
resourceInputs["baselineWindowSize"] = args ? args.baselineWindowSize : undefined;
resourceInputs["descriptionExpression"] = args ? args.descriptionExpression : undefined;
resourceInputs["deviationThreshold"] = args ? args.deviationThreshold : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["entitySelectors"] = args ? args.entitySelectors : undefined;
resourceInputs["floorValue"] = args ? args.floorValue : undefined;
resourceInputs["groupByFields"] = args ? args.groupByFields : undefined;
resourceInputs["isPrototype"] = args ? args.isPrototype : undefined;
resourceInputs["matchExpression"] = args ? args.matchExpression : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["nameExpression"] = args ? args.nameExpression : undefined;
resourceInputs["retentionWindowSize"] = args ? args.retentionWindowSize : undefined;
resourceInputs["severity"] = args ? args.severity : undefined;
resourceInputs["summaryExpression"] = args ? args.summaryExpression : undefined;
resourceInputs["suppressionWindowSize"] = args ? args.suppressionWindowSize : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["windowSize"] = args ? args.windowSize : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CseOutlierRule.__pulumiType, name, resourceInputs, opts);
}
}
exports.CseOutlierRule = CseOutlierRule;
/** @internal */
CseOutlierRule.__pulumiType = 'sumologic:index/cseOutlierRule:CseOutlierRule';
//# sourceMappingURL=cseOutlierRule.js.map