1. Packages
  2. Databricks
  3. API Docs
  4. MetastoreProvider
Databricks v1.36.0 published on Friday, Apr 19, 2024 by Pulumi

databricks.MetastoreProvider

Explore with Pulumi AI

databricks logo
Databricks v1.36.0 published on Friday, Apr 19, 2024 by Pulumi

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

    In Delta Sharing, a provider is an entity that shares data with a recipient. Within a metastore, Unity Catalog provides the ability to create a provider which contains a list of shares that have been shared with you.

    A databricks.MetastoreProvider is contained within databricks.Metastore and can contain a list of shares that have been shared with you.

    Note that Databricks to Databricks sharing automatically creates the provider.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const dbprovider = new databricks.MetastoreProvider("dbprovider", {
        name: "terraform-test-provider",
        comment: "made by terraform 2",
        authenticationType: "TOKEN",
        recipientProfileStr: JSON.stringify({
            shareCredentialsVersion: 1,
            bearerToken: "token",
            endpoint: "endpoint",
            expirationTime: "expiration-time",
        }),
    });
    
    import pulumi
    import json
    import pulumi_databricks as databricks
    
    dbprovider = databricks.MetastoreProvider("dbprovider",
        name="terraform-test-provider",
        comment="made by terraform 2",
        authentication_type="TOKEN",
        recipient_profile_str=json.dumps({
            "shareCredentialsVersion": 1,
            "bearerToken": "token",
            "endpoint": "endpoint",
            "expirationTime": "expiration-time",
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"shareCredentialsVersion": 1,
    			"bearerToken":             "token",
    			"endpoint":                "endpoint",
    			"expirationTime":          "expiration-time",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = databricks.NewMetastoreProvider(ctx, "dbprovider", &databricks.MetastoreProviderArgs{
    			Name:                pulumi.String("terraform-test-provider"),
    			Comment:             pulumi.String("made by terraform 2"),
    			AuthenticationType:  pulumi.String("TOKEN"),
    			RecipientProfileStr: pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var dbprovider = new Databricks.MetastoreProvider("dbprovider", new()
        {
            Name = "terraform-test-provider",
            Comment = "made by terraform 2",
            AuthenticationType = "TOKEN",
            RecipientProfileStr = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["shareCredentialsVersion"] = 1,
                ["bearerToken"] = "token",
                ["endpoint"] = "endpoint",
                ["expirationTime"] = "expiration-time",
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.MetastoreProvider;
    import com.pulumi.databricks.MetastoreProviderArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 dbprovider = new MetastoreProvider("dbprovider", MetastoreProviderArgs.builder()        
                .name("terraform-test-provider")
                .comment("made by terraform 2")
                .authenticationType("TOKEN")
                .recipientProfileStr(serializeJson(
                    jsonObject(
                        jsonProperty("shareCredentialsVersion", 1),
                        jsonProperty("bearerToken", "token"),
                        jsonProperty("endpoint", "endpoint"),
                        jsonProperty("expirationTime", "expiration-time")
                    )))
                .build());
    
        }
    }
    
    resources:
      dbprovider:
        type: databricks:MetastoreProvider
        properties:
          name: terraform-test-provider
          comment: made by terraform 2
          authenticationType: TOKEN
          recipientProfileStr:
            fn::toJSON:
              shareCredentialsVersion: 1
              bearerToken: token
              endpoint: endpoint
              expirationTime: expiration-time
    

    The following resources are used in the same context:

    • databricks.getTables data to list tables within Unity Catalog.
    • databricks.getSchemas data to list schemas within Unity Catalog.
    • databricks.getCatalogs data to list catalogs within Unity Catalog.

    Create MetastoreProvider Resource

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

    Constructor syntax

    new MetastoreProvider(name: string, args: MetastoreProviderArgs, opts?: CustomResourceOptions);
    @overload
    def MetastoreProvider(resource_name: str,
                          args: MetastoreProviderArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetastoreProvider(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          authentication_type: Optional[str] = None,
                          recipient_profile_str: Optional[str] = None,
                          comment: Optional[str] = None,
                          name: Optional[str] = None)
    func NewMetastoreProvider(ctx *Context, name string, args MetastoreProviderArgs, opts ...ResourceOption) (*MetastoreProvider, error)
    public MetastoreProvider(string name, MetastoreProviderArgs args, CustomResourceOptions? opts = null)
    public MetastoreProvider(String name, MetastoreProviderArgs args)
    public MetastoreProvider(String name, MetastoreProviderArgs args, CustomResourceOptions options)
    
    type: databricks:MetastoreProvider
    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 MetastoreProviderArgs
    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 MetastoreProviderArgs
    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 MetastoreProviderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetastoreProviderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetastoreProviderArgs
    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 metastoreProviderResource = new Databricks.MetastoreProvider("metastoreProviderResource", new()
    {
        AuthenticationType = "string",
        RecipientProfileStr = "string",
        Comment = "string",
        Name = "string",
    });
    
    example, err := databricks.NewMetastoreProvider(ctx, "metastoreProviderResource", &databricks.MetastoreProviderArgs{
    	AuthenticationType:  pulumi.String("string"),
    	RecipientProfileStr: pulumi.String("string"),
    	Comment:             pulumi.String("string"),
    	Name:                pulumi.String("string"),
    })
    
    var metastoreProviderResource = new MetastoreProvider("metastoreProviderResource", MetastoreProviderArgs.builder()        
        .authenticationType("string")
        .recipientProfileStr("string")
        .comment("string")
        .name("string")
        .build());
    
    metastore_provider_resource = databricks.MetastoreProvider("metastoreProviderResource",
        authentication_type="string",
        recipient_profile_str="string",
        comment="string",
        name="string")
    
    const metastoreProviderResource = new databricks.MetastoreProvider("metastoreProviderResource", {
        authenticationType: "string",
        recipientProfileStr: "string",
        comment: "string",
        name: "string",
    });
    
    type: databricks:MetastoreProvider
    properties:
        authenticationType: string
        comment: string
        name: string
        recipientProfileStr: string
    

    MetastoreProvider 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 MetastoreProvider resource accepts the following input properties:

    AuthenticationType string
    The delta sharing authentication type. Valid values are TOKEN.
    RecipientProfileStr string
    This is the json file that is created from a recipient url.
    Comment string
    Description about the provider.
    Name string
    Name of provider. Change forces creation of a new resource.
    AuthenticationType string
    The delta sharing authentication type. Valid values are TOKEN.
    RecipientProfileStr string
    This is the json file that is created from a recipient url.
    Comment string
    Description about the provider.
    Name string
    Name of provider. Change forces creation of a new resource.
    authenticationType String
    The delta sharing authentication type. Valid values are TOKEN.
    recipientProfileStr String
    This is the json file that is created from a recipient url.
    comment String
    Description about the provider.
    name String
    Name of provider. Change forces creation of a new resource.
    authenticationType string
    The delta sharing authentication type. Valid values are TOKEN.
    recipientProfileStr string
    This is the json file that is created from a recipient url.
    comment string
    Description about the provider.
    name string
    Name of provider. Change forces creation of a new resource.
    authentication_type str
    The delta sharing authentication type. Valid values are TOKEN.
    recipient_profile_str str
    This is the json file that is created from a recipient url.
    comment str
    Description about the provider.
    name str
    Name of provider. Change forces creation of a new resource.
    authenticationType String
    The delta sharing authentication type. Valid values are TOKEN.
    recipientProfileStr String
    This is the json file that is created from a recipient url.
    comment String
    Description about the provider.
    name String
    Name of provider. Change forces creation of a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MetastoreProvider 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 MetastoreProvider Resource

    Get an existing MetastoreProvider 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?: MetastoreProviderState, opts?: CustomResourceOptions): MetastoreProvider
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            authentication_type: Optional[str] = None,
            comment: Optional[str] = None,
            name: Optional[str] = None,
            recipient_profile_str: Optional[str] = None) -> MetastoreProvider
    func GetMetastoreProvider(ctx *Context, name string, id IDInput, state *MetastoreProviderState, opts ...ResourceOption) (*MetastoreProvider, error)
    public static MetastoreProvider Get(string name, Input<string> id, MetastoreProviderState? state, CustomResourceOptions? opts = null)
    public static MetastoreProvider get(String name, Output<String> id, MetastoreProviderState 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:
    AuthenticationType string
    The delta sharing authentication type. Valid values are TOKEN.
    Comment string
    Description about the provider.
    Name string
    Name of provider. Change forces creation of a new resource.
    RecipientProfileStr string
    This is the json file that is created from a recipient url.
    AuthenticationType string
    The delta sharing authentication type. Valid values are TOKEN.
    Comment string
    Description about the provider.
    Name string
    Name of provider. Change forces creation of a new resource.
    RecipientProfileStr string
    This is the json file that is created from a recipient url.
    authenticationType String
    The delta sharing authentication type. Valid values are TOKEN.
    comment String
    Description about the provider.
    name String
    Name of provider. Change forces creation of a new resource.
    recipientProfileStr String
    This is the json file that is created from a recipient url.
    authenticationType string
    The delta sharing authentication type. Valid values are TOKEN.
    comment string
    Description about the provider.
    name string
    Name of provider. Change forces creation of a new resource.
    recipientProfileStr string
    This is the json file that is created from a recipient url.
    authentication_type str
    The delta sharing authentication type. Valid values are TOKEN.
    comment str
    Description about the provider.
    name str
    Name of provider. Change forces creation of a new resource.
    recipient_profile_str str
    This is the json file that is created from a recipient url.
    authenticationType String
    The delta sharing authentication type. Valid values are TOKEN.
    comment String
    Description about the provider.
    name String
    Name of provider. Change forces creation of a new resource.
    recipientProfileStr String
    This is the json file that is created from a recipient url.

    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.36.0 published on Friday, Apr 19, 2024 by Pulumi