@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
99 lines • 3.94 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.Folder = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides the ability to create, read, delete, update, and manage of folders.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const folder = new sumologic.Folder("folder", {
* name: "test-folder",
* description: "A test folder",
* parentId: "<personal folder id>",
* });
* ```
*
* ## Import
*
* ### Timeouts
*
* `sumologic_folder` provides the following [Timeouts](/docs/configuration/resources.html#timeouts) configuration options:
*
* - `delete` - (Default `1 minute`) Used for waiting for the deletion job to be successful
*
* Additional data provided in state
*
* - `created_at` - (Computed) When the folder was created.
*
* - `created_by` - (Computed) Who created the folder.
*
* - `modified_at` - (Computed) When was the folder last modified.
*
* - `modified_by` - (Computed) The ID of the user who modified the folder last.
*
* - `item_type` - (Computed) What the type of the content item is (will obviously be "Folder").
*
* - `permissions` - (Computed) List of permissions the user has on the content item.
*
* - `children` - (Computed) A list of all the content items in the created folder (can be folders or other content items).
*/
class Folder extends pulumi.CustomResource {
/**
* Get an existing Folder 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 Folder(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Folder. 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'] === Folder.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["parentId"] = state ? state.parentId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.description === undefined) && !opts.urn) {
throw new Error("Missing required property 'description'");
}
if ((!args || args.parentId === undefined) && !opts.urn) {
throw new Error("Missing required property 'parentId'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["parentId"] = args ? args.parentId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Folder.__pulumiType, name, resourceInputs, opts);
}
}
exports.Folder = Folder;
/** @internal */
Folder.__pulumiType = 'sumologic:index/folder:Folder';
//# sourceMappingURL=folder.js.map