UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

136 lines 4.69 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.getMlflowModelOutput = exports.getMlflowModel = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute in order to prevent _default auth: cannot configure default credentials_ errors. * * Retrieves the settings of databricks.MlflowModel by name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const thisMlflowModel = new databricks.MlflowModel("this", { * name: "My MLflow Model", * description: "My MLflow model description", * tags: [ * { * key: "key1", * value: "value1", * }, * { * key: "key2", * value: "value2", * }, * ], * }); * const _this = databricks.getMlflowModel({ * name: "My MLflow Model", * }); * export const model = _this; * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = databricks.getMlflowModel({ * name: "My MLflow Model with multiple versions", * }); * const thisModelServing = new databricks.ModelServing("this", { * name: "model-serving-endpoint", * config: { * servedModels: [{ * name: "model_serving_prod", * modelName: _this.then(_this => _this.name), * modelVersion: _this.then(_this => _this.latestVersions?.[0]?.version), * workloadSize: "Small", * scaleToZeroEnabled: true, * }], * }, * }); * ``` */ function getMlflowModel(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("databricks:index/getMlflowModel:getMlflowModel", { "description": args.description, "latestVersions": args.latestVersions, "name": args.name, "permissionLevel": args.permissionLevel, "tags": args.tags, "userId": args.userId, }, opts); } exports.getMlflowModel = getMlflowModel; /** * > **Note** If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add dependsOn attribute in order to prevent _default auth: cannot configure default credentials_ errors. * * Retrieves the settings of databricks.MlflowModel by name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const thisMlflowModel = new databricks.MlflowModel("this", { * name: "My MLflow Model", * description: "My MLflow model description", * tags: [ * { * key: "key1", * value: "value1", * }, * { * key: "key2", * value: "value2", * }, * ], * }); * const _this = databricks.getMlflowModel({ * name: "My MLflow Model", * }); * export const model = _this; * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const _this = databricks.getMlflowModel({ * name: "My MLflow Model with multiple versions", * }); * const thisModelServing = new databricks.ModelServing("this", { * name: "model-serving-endpoint", * config: { * servedModels: [{ * name: "model_serving_prod", * modelName: _this.then(_this => _this.name), * modelVersion: _this.then(_this => _this.latestVersions?.[0]?.version), * workloadSize: "Small", * scaleToZeroEnabled: true, * }], * }, * }); * ``` */ function getMlflowModelOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("databricks:index/getMlflowModel:getMlflowModel", { "description": args.description, "latestVersions": args.latestVersions, "name": args.name, "permissionLevel": args.permissionLevel, "tags": args.tags, "userId": args.userId, }, opts); } exports.getMlflowModelOutput = getMlflowModelOutput; //# sourceMappingURL=getMlflowModel.js.map