@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
162 lines (161 loc) • 6.11 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* This resource allows you to create [Models in Unity Catalog](https://docs.databricks.com/en/mlflow/models-in-uc.html) in Databricks.
*
* > This resource 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 _this = new databricks.RegisteredModel("this", {
* name: "my_model",
* catalogName: "main",
* schemaName: "default",
* });
* ```
*
* ## Access Control
*
* * databricks.Grants can be used to grant principals `ALL_PRIVILEGES`, `APPLY_TAG`, and `EXECUTE` privileges.
*
* ## Related Resources
*
* The following resources are often used in the same context:
*
* * databricks.ModelServing to serve this model on a Databricks serving endpoint.
* * databricks.MlflowExperiment to manage [MLflow experiments](https://docs.databricks.com/data/data-sources/mlflow-experiment.html) in Databricks.
* * databricks.Schema to manage schemas within Unity Catalog.
* * databricks.Catalog to manage catalogs within Unity Catalog.
*
* ## Import
*
* The registered model resource can be imported using the full (3-level) name of the model.
*
* hcl
*
* import {
*
* to = databricks_registered_model.this
*
* id = "<catalog_name>.<schema_name>.<model_name>"
*
* }
*
* Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/registeredModel:RegisteredModel this <catalog_name>.<schema_name>.<model_name>
* ```
*/
export declare class RegisteredModel extends pulumi.CustomResource {
/**
* Get an existing RegisteredModel 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: string, id: pulumi.Input<pulumi.ID>, state?: RegisteredModelState, opts?: pulumi.CustomResourceOptions): RegisteredModel;
/**
* Returns true if the given object is an instance of RegisteredModel. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is RegisteredModel;
/**
* The name of the catalog where the schema and the registered model reside. *Change of this parameter forces recreation of the resource.*
*/
readonly catalogName: pulumi.Output<string>;
/**
* The comment attached to the registered model.
*/
readonly comment: pulumi.Output<string | undefined>;
/**
* The name of the registered model. *Change of this parameter forces recreation of the resource.*
*/
readonly name: pulumi.Output<string>;
/**
* Name of the registered model owner.
*/
readonly owner: pulumi.Output<string>;
/**
* The name of the schema where the registered model resides. *Change of this parameter forces recreation of the resource.*
*/
readonly schemaName: pulumi.Output<string>;
/**
* The storage location under which model version data files are stored. *Change of this parameter forces recreation of the resource.*
*/
readonly storageLocation: pulumi.Output<string>;
/**
* Create a RegisteredModel resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: RegisteredModelArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RegisteredModel resources.
*/
export interface RegisteredModelState {
/**
* The name of the catalog where the schema and the registered model reside. *Change of this parameter forces recreation of the resource.*
*/
catalogName?: pulumi.Input<string>;
/**
* The comment attached to the registered model.
*/
comment?: pulumi.Input<string>;
/**
* The name of the registered model. *Change of this parameter forces recreation of the resource.*
*/
name?: pulumi.Input<string>;
/**
* Name of the registered model owner.
*/
owner?: pulumi.Input<string>;
/**
* The name of the schema where the registered model resides. *Change of this parameter forces recreation of the resource.*
*/
schemaName?: pulumi.Input<string>;
/**
* The storage location under which model version data files are stored. *Change of this parameter forces recreation of the resource.*
*/
storageLocation?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a RegisteredModel resource.
*/
export interface RegisteredModelArgs {
/**
* The name of the catalog where the schema and the registered model reside. *Change of this parameter forces recreation of the resource.*
*/
catalogName: pulumi.Input<string>;
/**
* The comment attached to the registered model.
*/
comment?: pulumi.Input<string>;
/**
* The name of the registered model. *Change of this parameter forces recreation of the resource.*
*/
name?: pulumi.Input<string>;
/**
* Name of the registered model owner.
*/
owner?: pulumi.Input<string>;
/**
* The name of the schema where the registered model resides. *Change of this parameter forces recreation of the resource.*
*/
schemaName: pulumi.Input<string>;
/**
* The storage location under which model version data files are stored. *Change of this parameter forces recreation of the resource.*
*/
storageLocation?: pulumi.Input<string>;
}