@pulumi/sumologic
Version:
A Pulumi package for creating and managing sumologic cloud resources.
127 lines • 5.84 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.SloFolder = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Provides the ability to create, read, delete, and update folders for SLO's.
*
* ## Example SLO Folder
*
* NOTE: SLO folders are considered a different resource from Library content and monitor folders.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const tfSloFolder = new sumologic.SloFolder("tf_slo_folder", {
* name: "Terraform Managed SLO's",
* description: "A folder for SLO's managed by terraform.",
* });
* ```
*
* ## Example Nested SLO Folders
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sumologic from "@pulumi/sumologic";
*
* const tfPaymentsTeamRootFolder = new sumologic.SloFolder("tf_payments_team_root_folder", {
* name: "Security Team SLOs",
* description: "SLO's payments services.",
* });
* const tfPaymentsTeamProdFolder = new sumologic.SloFolder("tf_payments_team_prod_folder", {
* name: "Production SLOs",
* description: "SLOs for the Payments service on Production Environment.",
* parentId: tfPaymentsTeamRootFolder.id,
* });
* const tfPaymentsTeamStagFolder = new sumologic.SloFolder("tf_payments_team_stag_folder", {
* name: "Staging SLOs",
* description: "SLOs for the payments service on Staging Environment.",
* parentId: tfPaymentsTeamRootFolder.id,
* });
* ```
*
* ## Import
*
* SLO folders can be imported using the SLO folder identifier, such as:
*
* shell
*
* ```sh
* $ pulumi import sumologic:index/sloFolder:SloFolder tf_slo_folder_1 0000000000ABC123
* ```
*/
class SloFolder extends pulumi.CustomResource {
/**
* Get an existing SloFolder 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 SloFolder(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SloFolder. 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'] === SloFolder.__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["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["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(SloFolder.__pulumiType, name, resourceInputs, opts);
}
}
exports.SloFolder = SloFolder;
/** @internal */
SloFolder.__pulumiType = 'sumologic:index/sloFolder:SloFolder';
//# sourceMappingURL=sloFolder.js.map