UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

99 lines 4.59 kB
"use strict"; // *** 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.NotebookMountStorage = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manage storages mounted to the notebook resource within HuaweiCloud. A maximum of 10 storages can be mounted. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const config = new pulumi.Config(); * const notebookId = config.requireObject("notebookId"); * const uriParallelObs = config.requireObject("uriParallelObs"); * const test = new huaweicloud.modelarts.NotebookMountStorage("test", { * notebookId: notebookId, * storagePath: uriParallelObs, * localMountDirectory: "/data/test/", * }); * ``` * * ## Import * * The mount storage can be imported by `id`, It is composed of the ID of notebook and mount ID, separated by a slash. * * For example, bash * * ```sh * $ pulumi import huaweicloud:ModelArts/notebookMountStorage:NotebookMountStorage test b11b407c-e604-4e8d-8bc4-92398320b847/4e206d3c-6831-4267-b93d-e236105cda38 * ``` */ class NotebookMountStorage extends pulumi.CustomResource { /** * Get an existing NotebookMountStorage 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 NotebookMountStorage(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of NotebookMountStorage. 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'] === NotebookMountStorage.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["localMountDirectory"] = state ? state.localMountDirectory : undefined; resourceInputs["mountId"] = state ? state.mountId : undefined; resourceInputs["notebookId"] = state ? state.notebookId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["storagePath"] = state ? state.storagePath : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.localMountDirectory === undefined) && !opts.urn) { throw new Error("Missing required property 'localMountDirectory'"); } if ((!args || args.notebookId === undefined) && !opts.urn) { throw new Error("Missing required property 'notebookId'"); } if ((!args || args.storagePath === undefined) && !opts.urn) { throw new Error("Missing required property 'storagePath'"); } resourceInputs["localMountDirectory"] = args ? args.localMountDirectory : undefined; resourceInputs["notebookId"] = args ? args.notebookId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["storagePath"] = args ? args.storagePath : undefined; resourceInputs["mountId"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(NotebookMountStorage.__pulumiType, name, resourceInputs, opts); } } exports.NotebookMountStorage = NotebookMountStorage; /** @internal */ NotebookMountStorage.__pulumiType = 'huaweicloud:ModelArts/notebookMountStorage:NotebookMountStorage'; //# sourceMappingURL=notebookMountStorage.js.map