1. Packages
  2. Databricks
  3. API Docs
  4. RegisteredModel
Databricks v1.38.0 published on Monday, Apr 29, 2024 by Pulumi

databricks.RegisteredModel

Explore with Pulumi AI

databricks logo
Databricks v1.38.0 published on Monday, Apr 29, 2024 by Pulumi

    Note This resource could be only used with workspace-level provider!

    This resource allows you to create Models in Unity Catalog in Databricks.

    Example Usage

    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",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.RegisteredModel("this",
        name="my_model",
        catalog_name="main",
        schema_name="default")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databricks.NewRegisteredModel(ctx, "this", &databricks.RegisteredModelArgs{
    			Name:        pulumi.String("my_model"),
    			CatalogName: pulumi.String("main"),
    			SchemaName:  pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Databricks.RegisteredModel("this", new()
        {
            Name = "my_model",
            CatalogName = "main",
            SchemaName = "default",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.RegisteredModel;
    import com.pulumi.databricks.RegisteredModelArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var this_ = new RegisteredModel("this", RegisteredModelArgs.builder()        
                .name("my_model")
                .catalogName("main")
                .schemaName("default")
                .build());
    
        }
    }
    
    resources:
      this:
        type: databricks:RegisteredModel
        properties:
          name: my_model
          catalogName: main
          schemaName: default
    

    Access Control

    • databricks.Grants can be used to grant principals ALL_PRIVILEGES, APPLY_TAG, and EXECUTE privileges.

    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 in Databricks.
    • databricks.Table data to manage tables within Unity Catalog.
    • databricks.Schema data to manage schemas within Unity Catalog.
    • databricks.Catalog data to manage catalogs within Unity Catalog.

    Create RegisteredModel Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RegisteredModel(name: string, args: RegisteredModelArgs, opts?: CustomResourceOptions);
    @overload
    def RegisteredModel(resource_name: str,
                        args: RegisteredModelArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def RegisteredModel(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        catalog_name: Optional[str] = None,
                        schema_name: Optional[str] = None,
                        comment: Optional[str] = None,
                        name: Optional[str] = None,
                        owner: Optional[str] = None,
                        storage_location: Optional[str] = None)
    func NewRegisteredModel(ctx *Context, name string, args RegisteredModelArgs, opts ...ResourceOption) (*RegisteredModel, error)
    public RegisteredModel(string name, RegisteredModelArgs args, CustomResourceOptions? opts = null)
    public RegisteredModel(String name, RegisteredModelArgs args)
    public RegisteredModel(String name, RegisteredModelArgs args, CustomResourceOptions options)
    
    type: databricks:RegisteredModel
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args RegisteredModelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RegisteredModelArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RegisteredModelArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegisteredModelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RegisteredModelArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var registeredModelResource = new Databricks.RegisteredModel("registeredModelResource", new()
    {
        CatalogName = "string",
        SchemaName = "string",
        Comment = "string",
        Name = "string",
        Owner = "string",
        StorageLocation = "string",
    });
    
    example, err := databricks.NewRegisteredModel(ctx, "registeredModelResource", &databricks.RegisteredModelArgs{
    	CatalogName:     pulumi.String("string"),
    	SchemaName:      pulumi.String("string"),
    	Comment:         pulumi.String("string"),
    	Name:            pulumi.String("string"),
    	Owner:           pulumi.String("string"),
    	StorageLocation: pulumi.String("string"),
    })
    
    var registeredModelResource = new RegisteredModel("registeredModelResource", RegisteredModelArgs.builder()        
        .catalogName("string")
        .schemaName("string")
        .comment("string")
        .name("string")
        .owner("string")
        .storageLocation("string")
        .build());
    
    registered_model_resource = databricks.RegisteredModel("registeredModelResource",
        catalog_name="string",
        schema_name="string",
        comment="string",
        name="string",
        owner="string",
        storage_location="string")
    
    const registeredModelResource = new databricks.RegisteredModel("registeredModelResource", {
        catalogName: "string",
        schemaName: "string",
        comment: "string",
        name: "string",
        owner: "string",
        storageLocation: "string",
    });
    
    type: databricks:RegisteredModel
    properties:
        catalogName: string
        comment: string
        name: string
        owner: string
        schemaName: string
        storageLocation: string
    

    RegisteredModel Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The RegisteredModel resource accepts the following input properties:

    CatalogName string
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    SchemaName string
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    Comment string
    The comment attached to the registered model.
    Name string
    The name of the registered model. Change of this parameter forces recreation of the resource.
    Owner string
    Name of the registered model owner.
    StorageLocation string
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    CatalogName string
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    SchemaName string
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    Comment string
    The comment attached to the registered model.
    Name string
    The name of the registered model. Change of this parameter forces recreation of the resource.
    Owner string
    Name of the registered model owner.
    StorageLocation string
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    catalogName String
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    schemaName String
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    comment String
    The comment attached to the registered model.
    name String
    The name of the registered model. Change of this parameter forces recreation of the resource.
    owner String
    Name of the registered model owner.
    storageLocation String
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    catalogName string
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    schemaName string
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    comment string
    The comment attached to the registered model.
    name string
    The name of the registered model. Change of this parameter forces recreation of the resource.
    owner string
    Name of the registered model owner.
    storageLocation string
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    catalog_name str
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    schema_name str
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    comment str
    The comment attached to the registered model.
    name str
    The name of the registered model. Change of this parameter forces recreation of the resource.
    owner str
    Name of the registered model owner.
    storage_location str
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    catalogName String
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    schemaName String
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    comment String
    The comment attached to the registered model.
    name String
    The name of the registered model. Change of this parameter forces recreation of the resource.
    owner String
    Name of the registered model owner.
    storageLocation String
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RegisteredModel resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RegisteredModel Resource

    Get an existing RegisteredModel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RegisteredModelState, opts?: CustomResourceOptions): RegisteredModel
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            catalog_name: Optional[str] = None,
            comment: Optional[str] = None,
            name: Optional[str] = None,
            owner: Optional[str] = None,
            schema_name: Optional[str] = None,
            storage_location: Optional[str] = None) -> RegisteredModel
    func GetRegisteredModel(ctx *Context, name string, id IDInput, state *RegisteredModelState, opts ...ResourceOption) (*RegisteredModel, error)
    public static RegisteredModel Get(string name, Input<string> id, RegisteredModelState? state, CustomResourceOptions? opts = null)
    public static RegisteredModel get(String name, Output<String> id, RegisteredModelState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CatalogName string
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    Comment string
    The comment attached to the registered model.
    Name string
    The name of the registered model. Change of this parameter forces recreation of the resource.
    Owner string
    Name of the registered model owner.
    SchemaName string
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    StorageLocation string
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    CatalogName string
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    Comment string
    The comment attached to the registered model.
    Name string
    The name of the registered model. Change of this parameter forces recreation of the resource.
    Owner string
    Name of the registered model owner.
    SchemaName string
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    StorageLocation string
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    catalogName String
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    comment String
    The comment attached to the registered model.
    name String
    The name of the registered model. Change of this parameter forces recreation of the resource.
    owner String
    Name of the registered model owner.
    schemaName String
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    storageLocation String
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    catalogName string
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    comment string
    The comment attached to the registered model.
    name string
    The name of the registered model. Change of this parameter forces recreation of the resource.
    owner string
    Name of the registered model owner.
    schemaName string
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    storageLocation string
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    catalog_name str
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    comment str
    The comment attached to the registered model.
    name str
    The name of the registered model. Change of this parameter forces recreation of the resource.
    owner str
    Name of the registered model owner.
    schema_name str
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    storage_location str
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.
    catalogName String
    The name of the catalog where the schema and the registered model reside. Change of this parameter forces recreation of the resource.
    comment String
    The comment attached to the registered model.
    name String
    The name of the registered model. Change of this parameter forces recreation of the resource.
    owner String
    Name of the registered model owner.
    schemaName String
    The name of the schema where the registered model resides. Change of this parameter forces recreation of the resource.
    storageLocation String
    The storage location under which model version data files are stored. Change of this parameter forces recreation of the resource.

    Import

    The registered model resource can be imported using the full (3-level) name of the model.

    bash

    $ pulumi import databricks:index/registeredModel:RegisteredModel this <catalog_name.schema_name.model_name>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.38.0 published on Monday, Apr 29, 2024 by Pulumi