@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
112 lines • 5.83 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.MonitorFolder = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides the ability to create, read, delete, and update folders for [Monitors](https://help.sumologic.com/?cid=10020).
* > If Fine Grain Permission (FGP) feature is enabled with Monitors Content at one's Sumo Logic account, one can also set those permission details under this monitor folder resource. For further details about FGP, please see this [Monitor Permission document](https://help.sumologic.com/Visualizations-and-Alerts/Alerts/Monitors#configure-permissions-to-monitors-folders).
*
* ## Example Monitor Folder
*
* NOTE: Monitor folders are considered a different resource from Library content folders.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const tfMonitorFolder1 = new sumologic.MonitorFolder("tf_monitor_folder_1", {
* name: "Terraform Managed Monitors",
* description: "A folder for monitors managed by terraform.",
* });
* ```
*
* ## Import
*
* Monitor folders can be imported using the monitor folder identifier, such as:
*
* hcl
*
* ```sh
* $ pulumi import sumologic:index/monitorFolder:MonitorFolder tf_monitor_folder_1 0000000000ABC123
* ```
*
* [1]: https://help.sumologic.com/?cid=10020
*
* [2]: https://help.sumologic.com/Visualizations-and-Alerts/Alerts/Monitors#configure-permissions-to-monitors-folders
*/
class MonitorFolder extends pulumi.CustomResource {
/**
* Get an existing MonitorFolder 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 MonitorFolder(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of MonitorFolder. 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'] === MonitorFolder.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["contentType"] = state ? state.contentType : undefined;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["createdBy"] = state ? state.createdBy : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["isLocked"] = state ? state.isLocked : undefined;
resourceInputs["isMutable"] = state ? state.isMutable : undefined;
resourceInputs["isSystem"] = state ? state.isSystem : undefined;
resourceInputs["modifiedAt"] = state ? state.modifiedAt : undefined;
resourceInputs["modifiedBy"] = state ? state.modifiedBy : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["objPermissions"] = state ? state.objPermissions : undefined;
resourceInputs["parentId"] = state ? state.parentId : undefined;
resourceInputs["postRequestMap"] = state ? state.postRequestMap : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["version"] = state ? state.version : undefined;
}
else {
const args = argsOrState;
if ((!args || args.description === undefined) && !opts.urn) {
throw new Error("Missing required property 'description'");
}
resourceInputs["contentType"] = args ? args.contentType : undefined;
resourceInputs["createdAt"] = args ? args.createdAt : undefined;
resourceInputs["createdBy"] = args ? args.createdBy : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["isLocked"] = args ? args.isLocked : undefined;
resourceInputs["isMutable"] = args ? args.isMutable : undefined;
resourceInputs["isSystem"] = args ? args.isSystem : undefined;
resourceInputs["modifiedAt"] = args ? args.modifiedAt : undefined;
resourceInputs["modifiedBy"] = args ? args.modifiedBy : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["objPermissions"] = args ? args.objPermissions : undefined;
resourceInputs["parentId"] = args ? args.parentId : undefined;
resourceInputs["postRequestMap"] = args ? args.postRequestMap : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["version"] = args ? args.version : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(MonitorFolder.__pulumiType, name, resourceInputs, opts);
}
}
exports.MonitorFolder = MonitorFolder;
/** @internal */
MonitorFolder.__pulumiType = 'sumologic:index/monitorFolder:MonitorFolder';
//# sourceMappingURL=monitorFolder.js.map