UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

109 lines 4.71 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.MlflowModel = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to create [MLflow models](https://docs.databricks.com/applications/mlflow/models.html) in Databricks. * * > This documentation covers the Workspace Model Registry. Databricks recommends using Models in Unity Catalog. Models in Unity Catalog provides centralized model governance, cross-workspace access, lineage, and deployment. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const test = new databricks.MlflowModel("test", { * name: "My MLflow Model", * description: "My MLflow model description", * tags: [ * { * key: "key1", * value: "value1", * }, * { * key: "key2", * value: "value2", * }, * ], * }); * ``` * * ## Access Control * * * databricks.Permissions can control which groups or individual users can *Read*, *Edit*, *Manage Staging Versions*, *Manage Production Versions*, and *Manage* individual models. * * ## Related Resources * * The following resources are often used in the same context: * * * databricks.RegisteredModel to create [Models in Unity Catalog](https://docs.databricks.com/en/mlflow/models-in-uc.html) in Databricks. * * End to end workspace management guide. * * databricks.ModelServing to serve this model on a Databricks serving endpoint. * * databricks.Directory to manage directories in [Databricks Workspace](https://docs.databricks.com/workspace/workspace-objects.html). * * databricks.MlflowExperiment to manage [MLflow experiments](https://docs.databricks.com/data/data-sources/mlflow-experiment.html) in Databricks. * * databricks.Notebook to manage [Databricks Notebooks](https://docs.databricks.com/notebooks/index.html). * * databricks.Notebook data to export a notebook from Databricks Workspace. * * databricks.Repo to manage [Databricks Repos](https://docs.databricks.com/repos.html). * * ## Import * * The model resource can be imported using the name * * bash * * ```sh * $ pulumi import databricks:index/mlflowModel:MlflowModel this <name> * ``` */ class MlflowModel extends pulumi.CustomResource { /** * Get an existing MlflowModel 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 MlflowModel(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MlflowModel. 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'] === MlflowModel.__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["registeredModelId"] = state ? state.registeredModelId : undefined; resourceInputs["tags"] = state ? state.tags : undefined; } else { const args = argsOrState; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["registeredModelId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MlflowModel.__pulumiType, name, resourceInputs, opts); } } exports.MlflowModel = MlflowModel; /** @internal */ MlflowModel.__pulumiType = 'databricks:index/mlflowModel:MlflowModel'; //# sourceMappingURL=mlflowModel.js.map