@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
134 lines • 5.64 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.CseLogMapping = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a Sumologic CSE Log Mapping.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const logMapping = new sumologic.CseLogMapping("log_mapping", {
* name: "New Log Mapping",
* productGuid: "003d35b3-3ba8-4e93-8776-e5810b4e243e",
* recordType: "Audit",
* enabled: true,
* relatesEntities: true,
* skippedValues: ["skipped"],
* fields: [{
* name: "action",
* value: "action",
* valueType: "constant",
* skippedValues: ["-"],
* defaultValue: "",
* format: "JSON",
* caseInsensitive: false,
* alternateValues: ["altValue"],
* timeZone: "UTC",
* splitDelimiter: ",",
* splitIndex: "0",
* fieldJoins: ["and"],
* joinDelimiter: "",
* formatParameters: ["param"],
* lookups: [{
* key: "tunnel-up",
* value: "true",
* }],
* }],
* structuredInputs: [{
* eventIdPattern: "vpn",
* logFormat: "JSON",
* product: "fortinate",
* vendor: "fortinate",
* }],
* });
* ```
*
* ## Import
*
* Log Mapping can be imported using the field id, e.g.:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/cseLogMapping:CseLogMapping log_mapping id
* ```
*/
class CseLogMapping extends pulumi.CustomResource {
/**
* Get an existing CseLogMapping 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 CseLogMapping(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of CseLogMapping. 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'] === CseLogMapping.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["fields"] = state ? state.fields : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["parentId"] = state ? state.parentId : undefined;
resourceInputs["productGuid"] = state ? state.productGuid : undefined;
resourceInputs["recordType"] = state ? state.recordType : undefined;
resourceInputs["relatesEntities"] = state ? state.relatesEntities : undefined;
resourceInputs["skippedValues"] = state ? state.skippedValues : undefined;
resourceInputs["structuredInputs"] = state ? state.structuredInputs : undefined;
resourceInputs["unstructuredFields"] = state ? state.unstructuredFields : undefined;
}
else {
const args = argsOrState;
if ((!args || args.enabled === undefined) && !opts.urn) {
throw new Error("Missing required property 'enabled'");
}
if ((!args || args.fields === undefined) && !opts.urn) {
throw new Error("Missing required property 'fields'");
}
if ((!args || args.productGuid === undefined) && !opts.urn) {
throw new Error("Missing required property 'productGuid'");
}
if ((!args || args.recordType === undefined) && !opts.urn) {
throw new Error("Missing required property 'recordType'");
}
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["fields"] = args ? args.fields : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["parentId"] = args ? args.parentId : undefined;
resourceInputs["productGuid"] = args ? args.productGuid : undefined;
resourceInputs["recordType"] = args ? args.recordType : undefined;
resourceInputs["relatesEntities"] = args ? args.relatesEntities : undefined;
resourceInputs["skippedValues"] = args ? args.skippedValues : undefined;
resourceInputs["structuredInputs"] = args ? args.structuredInputs : undefined;
resourceInputs["unstructuredFields"] = args ? args.unstructuredFields : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CseLogMapping.__pulumiType, name, resourceInputs, opts);
}
}
exports.CseLogMapping = CseLogMapping;
/** @internal */
CseLogMapping.__pulumiType = 'sumologic:index/cseLogMapping:CseLogMapping';
//# sourceMappingURL=cseLogMapping.js.map