@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
97 lines • 4.14 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.CseContextAction = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides a Sumologic CSE Context Action.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const contextAction = new sumologic.CseContextAction("context_action", {
* name: "Context Action Name",
* type: "URL",
* template: "https://bar.com/?q={{value}}",
* iocTypes: ["IP_ADDRESS"],
* entityTypes: ["_hostname"],
* recordFields: ["request_url"],
* allRecordFields: false,
* enabled: true,
* });
* ```
*
* ## Import
*
* Context Action can be imported using the field id, e.g.:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/cseContextAction:CseContextAction context_action id
* ```
*/
class CseContextAction extends pulumi.CustomResource {
/**
* Get an existing CseContextAction 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 CseContextAction(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of CseContextAction. 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'] === CseContextAction.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allRecordFields"] = state ? state.allRecordFields : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["entityTypes"] = state ? state.entityTypes : undefined;
resourceInputs["iocTypes"] = state ? state.iocTypes : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["recordFields"] = state ? state.recordFields : undefined;
resourceInputs["template"] = state ? state.template : undefined;
resourceInputs["type"] = state ? state.type : undefined;
}
else {
const args = argsOrState;
if ((!args || args.iocTypes === undefined) && !opts.urn) {
throw new Error("Missing required property 'iocTypes'");
}
resourceInputs["allRecordFields"] = args ? args.allRecordFields : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["entityTypes"] = args ? args.entityTypes : undefined;
resourceInputs["iocTypes"] = args ? args.iocTypes : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["recordFields"] = args ? args.recordFields : undefined;
resourceInputs["template"] = args ? args.template : undefined;
resourceInputs["type"] = args ? args.type : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(CseContextAction.__pulumiType, name, resourceInputs, opts);
}
}
exports.CseContextAction = CseContextAction;
/** @internal */
CseContextAction.__pulumiType = 'sumologic:index/cseContextAction:CseContextAction';
//# sourceMappingURL=cseContextAction.js.map