@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
136 lines • 4.3 kB
JavaScript
;
// *** 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.getMlflowModelOutput = exports.getMlflowModel = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Retrieves the settings of databricks.MlflowModel by name.
*
* > This data source can only be used with a workspace-level provider!
*
* ## 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;
/**
* Retrieves the settings of databricks.MlflowModel by name.
*
* > This data source can only be used with a workspace-level provider!
*
* ## 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