UNPKG

@pulumi/scm

Version:

A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1

125 lines 4.47 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** 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"); /** * Folder resource * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scm from "@pulumi/scm"; * * // * // Creates a folder under the "All Firewalls" aka "ngfw-shared" folder * // * const scmFolderExample = new scm.Folder("scm_folder_example", { * name: "scm_folder_example", * parent: "ngfw-shared", * description: "Managed by Pulumi", * }); * // * // Creates a folder under the "scm_folder_example" folder created beforehand * // * const scmNestedFolderExample = new scm.Folder("scm_nested_folder_example", { * name: "scm_nested_folder_example", * parent: "scm_folder_example", * description: "Managed by Pulumi", * }, { * dependsOn: [scmFolderExample], * }); * // * // Creates a snippet that will be associated to a folder * // * const scmSnippetExample = new scm.Snippet("scm_snippet_example", { * name: "scm_snippet_example", * description: "Managed by Pulumi", * }); * // * // Creates a folder with an attached snippet * // * const scmFolderWithSnippets = new scm.Folder("scm_folder_with_snippets", { * name: "scm_folder_with_snippets", * parent: "ngfw-shared", * description: "Managed by Pulumi", * snippets: [scmSnippetExample.name], * }); * // * // Creates a label that will be associated to a folder * // * const scmLabelExample = new scm.Label("scm_label_example", { * name: "scm_label_example", * description: "Managed by Pulumi", * }); * // * // Creates a folder with an attached label * // * const scmFolderWithLabel = new scm.Folder("scm_folder_with_label", { * name: "scm_folder_with_label", * parent: "ngfw-shared", * description: "Managed by Pulumi", * labels: [scmLabelExample.name], * }, { * dependsOn: [scmLabelExample], * }); * ``` */ 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, { ...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?.description; resourceInputs["labels"] = state?.labels; resourceInputs["name"] = state?.name; resourceInputs["parent"] = state?.parent; resourceInputs["snippets"] = state?.snippets; resourceInputs["tfid"] = state?.tfid; } else { const args = argsOrState; if (args?.parent === undefined && !opts.urn) { throw new Error("Missing required property 'parent'"); } resourceInputs["description"] = args?.description; resourceInputs["labels"] = args?.labels; resourceInputs["name"] = args?.name; resourceInputs["parent"] = args?.parent; resourceInputs["snippets"] = args?.snippets; resourceInputs["tfid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Folder.__pulumiType, name, resourceInputs, opts); } } exports.Folder = Folder; /** @internal */ Folder.__pulumiType = 'scm:index/folder:Folder'; //# sourceMappingURL=folder.js.map