UNPKG

@pulumi/harness

Version:

A Pulumi package for creating and managing Harness resources.

121 lines 4.67 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.FileStoreFolder = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for creating folders in Harness. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * // Create folder * const example = new harness.platform.FileStoreFolder("example", { * orgId: "org_id", * projectId: "project_id", * identifier: "identifier", * name: "name", * description: "description", * tags: [ * "foo:bar", * "baz:qux", * ], * parentIdentifier: "parent_identifier", * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Import account level folder * * ```sh * $ pulumi import harness:platform/fileStoreFolder:FileStoreFolder example <identifier> * ``` * * Import org level folder * * ```sh * $ pulumi import harness:platform/fileStoreFolder:FileStoreFolder example <org_id>/<identifier> * ``` * * Import org level folder * * ```sh * $ pulumi import harness:platform/fileStoreFolder:FileStoreFolder example <org_id>/<project_id>/<identifier> * ``` */ class FileStoreFolder extends pulumi.CustomResource { /** * Get an existing FileStoreFolder 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 FileStoreFolder(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of FileStoreFolder. 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'] === FileStoreFolder.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createdBies"] = state?.createdBies; resourceInputs["description"] = state?.description; resourceInputs["identifier"] = state?.identifier; resourceInputs["lastModifiedAt"] = state?.lastModifiedAt; resourceInputs["lastModifiedBies"] = state?.lastModifiedBies; resourceInputs["name"] = state?.name; resourceInputs["orgId"] = state?.orgId; resourceInputs["parentIdentifier"] = state?.parentIdentifier; resourceInputs["path"] = state?.path; resourceInputs["projectId"] = state?.projectId; resourceInputs["tags"] = state?.tags; } else { const args = argsOrState; if (args?.identifier === undefined && !opts.urn) { throw new Error("Missing required property 'identifier'"); } if (args?.parentIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'parentIdentifier'"); } resourceInputs["description"] = args?.description; resourceInputs["identifier"] = args?.identifier; resourceInputs["name"] = args?.name; resourceInputs["orgId"] = args?.orgId; resourceInputs["parentIdentifier"] = args?.parentIdentifier; resourceInputs["projectId"] = args?.projectId; resourceInputs["tags"] = args?.tags; resourceInputs["createdBies"] = undefined /*out*/; resourceInputs["lastModifiedAt"] = undefined /*out*/; resourceInputs["lastModifiedBies"] = undefined /*out*/; resourceInputs["path"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FileStoreFolder.__pulumiType, name, resourceInputs, opts); } } exports.FileStoreFolder = FileStoreFolder; /** @internal */ FileStoreFolder.__pulumiType = 'harness:platform/fileStoreFolder:FileStoreFolder'; //# sourceMappingURL=fileStoreFolder.js.map